Mercurial > hg > truffle
comparison src/cpu/x86/vm/interp_masm_x86_32.hpp @ 1930:2d26b0046e0d
Merge.
author | Thomas Wuerthinger <wuerthinger@ssw.jku.at> |
---|---|
date | Tue, 30 Nov 2010 14:53:30 +0100 |
parents | d5d065957597 |
children | f95d63e2154a |
comparison
equal
deleted
inserted
replaced
1484:6b7001391c97 | 1930:2d26b0046e0d |
---|---|
1 /* | 1 /* |
2 * Copyright 1997-2009 Sun Microsystems, Inc. All Rights Reserved. | 2 * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. |
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. | 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
4 * | 4 * |
5 * This code is free software; you can redistribute it and/or modify it | 5 * This code is free software; you can redistribute it and/or modify it |
6 * under the terms of the GNU General Public License version 2 only, as | 6 * under the terms of the GNU General Public License version 2 only, as |
7 * published by the Free Software Foundation. | 7 * published by the Free Software Foundation. |
14 * | 14 * |
15 * You should have received a copy of the GNU General Public License version | 15 * You should have received a copy of the GNU General Public License version |
16 * 2 along with this work; if not, write to the Free Software Foundation, | 16 * 2 along with this work; if not, write to the Free Software Foundation, |
17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. | 17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. |
18 * | 18 * |
19 * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, | 19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA |
20 * CA 95054 USA or visit www.sun.com if you need additional information or | 20 * or visit www.oracle.com if you need additional information or have any |
21 * have any questions. | 21 * questions. |
22 * | 22 * |
23 */ | 23 */ |
24 | 24 |
25 // This file specializes the assember with interpreter-specific macros | 25 // This file specializes the assember with interpreter-specific macros |
26 | 26 |
74 void get_constant_pool(Register reg) { get_method(reg); movptr(reg, Address(reg, methodOopDesc::constants_offset())); } | 74 void get_constant_pool(Register reg) { get_method(reg); movptr(reg, Address(reg, methodOopDesc::constants_offset())); } |
75 void get_constant_pool_cache(Register reg) { get_constant_pool(reg); movptr(reg, Address(reg, constantPoolOopDesc::cache_offset_in_bytes())); } | 75 void get_constant_pool_cache(Register reg) { get_constant_pool(reg); movptr(reg, Address(reg, constantPoolOopDesc::cache_offset_in_bytes())); } |
76 void get_cpool_and_tags(Register cpool, Register tags) { get_constant_pool(cpool); movptr(tags, Address(cpool, constantPoolOopDesc::tags_offset_in_bytes())); | 76 void get_cpool_and_tags(Register cpool, Register tags) { get_constant_pool(cpool); movptr(tags, Address(cpool, constantPoolOopDesc::tags_offset_in_bytes())); |
77 } | 77 } |
78 void get_unsigned_2_byte_index_at_bcp(Register reg, int bcp_offset); | 78 void get_unsigned_2_byte_index_at_bcp(Register reg, int bcp_offset); |
79 void get_cache_and_index_at_bcp(Register cache, Register index, int bcp_offset, bool giant_index = false); | 79 void get_cache_and_index_at_bcp(Register cache, Register index, int bcp_offset, size_t index_size = sizeof(u2)); |
80 void get_cache_entry_pointer_at_bcp(Register cache, Register tmp, int bcp_offset, bool giant_index = false); | 80 void get_cache_entry_pointer_at_bcp(Register cache, Register tmp, int bcp_offset, size_t index_size = sizeof(u2)); |
81 void get_cache_index_at_bcp(Register index, int bcp_offset, bool giant_index = false); | 81 void get_cache_index_at_bcp(Register index, int bcp_offset, size_t index_size = sizeof(u2)); |
82 | 82 |
83 // Expression stack | 83 // Expression stack |
84 void f2ieee(); // truncate ftos to 32bits | 84 void f2ieee(); // truncate ftos to 32bits |
85 void d2ieee(); // truncate dtos to 64bits | 85 void d2ieee(); // truncate dtos to 64bits |
86 | 86 |
87 void pop_ptr(Register r = rax); | 87 void pop_ptr(Register r = rax); |
88 void pop_ptr(Register r, Register tag); | |
89 void pop_i(Register r = rax); | 88 void pop_i(Register r = rax); |
90 void pop_l(Register lo = rax, Register hi = rdx); | 89 void pop_l(Register lo = rax, Register hi = rdx); |
91 void pop_f(); | 90 void pop_f(); |
92 void pop_d(); | 91 void pop_d(); |
93 void pop_ftos_to_rsp(); | |
94 void pop_dtos_to_rsp(); | |
95 | 92 |
96 void push_ptr(Register r = rax); | 93 void push_ptr(Register r = rax); |
97 void push_ptr(Register r, Register tag); | |
98 void push_i(Register r = rax); | 94 void push_i(Register r = rax); |
99 void push_l(Register lo = rax, Register hi = rdx); | 95 void push_l(Register lo = rax, Register hi = rdx); |
100 void push_d(Register r = rax); | 96 void push_d(Register r = rax); |
101 void push_f(); | 97 void push_f(); |
102 | 98 |
110 | 106 |
111 // These are dummies to prevent surprise implicit conversions to Register | 107 // These are dummies to prevent surprise implicit conversions to Register |
112 void pop(void* v ); // Add unimplemented ambiguous method | 108 void pop(void* v ); // Add unimplemented ambiguous method |
113 void push(void* v ); // Add unimplemented ambiguous method | 109 void push(void* v ); // Add unimplemented ambiguous method |
114 | 110 |
115 DEBUG_ONLY(void verify_stack_tag(frame::Tag t);) | 111 void empty_expression_stack() { |
116 | 112 movptr(rsp, Address(rbp, frame::interpreter_frame_monitor_block_top_offset * wordSize)); |
117 #endif // CC_INTERP | 113 // NULL last_sp until next java call |
118 | 114 movptr(Address(rbp, frame::interpreter_frame_last_sp_offset * wordSize), NULL_WORD); |
119 #ifndef CC_INTERP | |
120 | |
121 void empty_expression_stack() { | |
122 movptr(rsp, Address(rbp, frame::interpreter_frame_monitor_block_top_offset * wordSize)); | |
123 // NULL last_sp until next java call | |
124 movptr(Address(rbp, frame::interpreter_frame_last_sp_offset * wordSize), NULL_WORD); | |
125 } | 115 } |
126 | 116 |
127 // Tagged stack helpers for swap and dup | 117 // Helpers for swap and dup |
128 void load_ptr_and_tag(int n, Register val, Register tag); | 118 void load_ptr(int n, Register val); |
129 void store_ptr_and_tag(int n, Register val, Register tag); | 119 void store_ptr(int n, Register val); |
130 | |
131 // Tagged Local support | |
132 | |
133 void tag_local(frame::Tag tag, int n); | |
134 void tag_local(Register tag, int n); | |
135 void tag_local(frame::Tag tag, Register idx); | |
136 void tag_local(Register tag, Register idx); | |
137 | |
138 #ifdef ASSERT | |
139 void verify_local_tag(frame::Tag tag, int n); | |
140 void verify_local_tag(frame::Tag tag, Register idx); | |
141 #endif // ASSERT | |
142 | 120 |
143 // Super call_VM calls - correspond to MacroAssembler::call_VM(_leaf) calls | 121 // Super call_VM calls - correspond to MacroAssembler::call_VM(_leaf) calls |
144 void super_call_VM_leaf(address entry_point); | 122 void super_call_VM_leaf(address entry_point); |
145 void super_call_VM_leaf(address entry_point, Register arg_1); | 123 void super_call_VM_leaf(address entry_point, Register arg_1); |
146 void super_call_VM_leaf(address entry_point, Register arg_1, Register arg_2); | 124 void super_call_VM_leaf(address entry_point, Register arg_1, Register arg_2); |
205 void increment_mdp_data_at(Address data, bool decrement = false); | 183 void increment_mdp_data_at(Address data, bool decrement = false); |
206 void increment_mdp_data_at(Register mdp_in, int constant, | 184 void increment_mdp_data_at(Register mdp_in, int constant, |
207 bool decrement = false); | 185 bool decrement = false); |
208 void increment_mdp_data_at(Register mdp_in, Register reg, int constant, | 186 void increment_mdp_data_at(Register mdp_in, Register reg, int constant, |
209 bool decrement = false); | 187 bool decrement = false); |
188 void increment_mask_and_jump(Address counter_addr, | |
189 int increment, int mask, | |
190 Register scratch, bool preloaded, | |
191 Condition cond, Label* where); | |
210 void set_mdp_flag_at(Register mdp_in, int flag_constant); | 192 void set_mdp_flag_at(Register mdp_in, int flag_constant); |
211 void test_mdp_data_at(Register mdp_in, int offset, Register value, | 193 void test_mdp_data_at(Register mdp_in, int offset, Register value, |
212 Register test_value_out, | 194 Register test_value_out, |
213 Label& not_equal_continue); | 195 Label& not_equal_continue); |
214 | 196 |