1.1 --- a/src/cpu/x86/vm/sharedRuntime_x86_32.cpp Fri Apr 30 04:27:25 2010 -0700 1.2 +++ b/src/cpu/x86/vm/sharedRuntime_x86_32.cpp Fri Apr 30 08:37:24 2010 -0700 1.3 @@ -503,34 +503,9 @@ 1.4 } 1.5 1.6 1.7 -// Helper function to put tags in interpreter stack. 1.8 -static void tag_stack(MacroAssembler *masm, const BasicType sig, int st_off) { 1.9 - if (TaggedStackInterpreter) { 1.10 - int tag_offset = st_off + Interpreter::expr_tag_offset_in_bytes(0); 1.11 - if (sig == T_OBJECT || sig == T_ARRAY) { 1.12 - __ movptr(Address(rsp, tag_offset), frame::TagReference); 1.13 - } else if (sig == T_LONG || sig == T_DOUBLE) { 1.14 - int next_tag_offset = st_off + Interpreter::expr_tag_offset_in_bytes(1); 1.15 - __ movptr(Address(rsp, next_tag_offset), frame::TagValue); 1.16 - __ movptr(Address(rsp, tag_offset), frame::TagValue); 1.17 - } else { 1.18 - __ movptr(Address(rsp, tag_offset), frame::TagValue); 1.19 - } 1.20 - } 1.21 -} 1.22 - 1.23 -// Double and long values with Tagged stacks are not contiguous. 1.24 static void move_c2i_double(MacroAssembler *masm, XMMRegister r, int st_off) { 1.25 - int next_off = st_off - Interpreter::stackElementSize(); 1.26 - if (TaggedStackInterpreter) { 1.27 - __ movdbl(Address(rsp, next_off), r); 1.28 - // Move top half up and put tag in the middle. 1.29 - __ movl(rdi, Address(rsp, next_off+wordSize)); 1.30 - __ movl(Address(rsp, st_off), rdi); 1.31 - tag_stack(masm, T_DOUBLE, next_off); 1.32 - } else { 1.33 - __ movdbl(Address(rsp, next_off), r); 1.34 - } 1.35 + int next_off = st_off - Interpreter::stackElementSize; 1.36 + __ movdbl(Address(rsp, next_off), r); 1.37 } 1.38 1.39 static void gen_c2i_adapter(MacroAssembler *masm, 1.40 @@ -560,7 +535,7 @@ 1.41 // Since all args are passed on the stack, total_args_passed * interpreter_ 1.42 // stack_element_size is the 1.43 // space we need. 1.44 - int extraspace = total_args_passed * Interpreter::stackElementSize(); 1.45 + int extraspace = total_args_passed * Interpreter::stackElementSize; 1.46 1.47 // Get return address 1.48 __ pop(rax); 1.49 @@ -578,8 +553,8 @@ 1.50 } 1.51 1.52 // st_off points to lowest address on stack. 1.53 - int st_off = ((total_args_passed - 1) - i) * Interpreter::stackElementSize(); 1.54 - int next_off = st_off - Interpreter::stackElementSize(); 1.55 + int st_off = ((total_args_passed - 1) - i) * Interpreter::stackElementSize; 1.56 + int next_off = st_off - Interpreter::stackElementSize; 1.57 1.58 // Say 4 args: 1.59 // i st_off 1.60 @@ -601,7 +576,6 @@ 1.61 if (!r_2->is_valid()) { 1.62 __ movl(rdi, Address(rsp, ld_off)); 1.63 __ movptr(Address(rsp, st_off), rdi); 1.64 - tag_stack(masm, sig_bt[i], st_off); 1.65 } else { 1.66 1.67 // ld_off == LSW, ld_off+VMRegImpl::stack_slot_size == MSW 1.68 @@ -619,13 +593,11 @@ 1.69 __ movptr(Address(rsp, st_off), rax); 1.70 #endif /* ASSERT */ 1.71 #endif // _LP64 1.72 - tag_stack(masm, sig_bt[i], next_off); 1.73 } 1.74 } else if (r_1->is_Register()) { 1.75 Register r = r_1->as_Register(); 1.76 if (!r_2->is_valid()) { 1.77 __ movl(Address(rsp, st_off), r); 1.78 - tag_stack(masm, sig_bt[i], st_off); 1.79 } else { 1.80 // long/double in gpr 1.81 NOT_LP64(ShouldNotReachHere()); 1.82 @@ -639,17 +611,14 @@ 1.83 __ movptr(Address(rsp, st_off), rax); 1.84 #endif /* ASSERT */ 1.85 __ movptr(Address(rsp, next_off), r); 1.86 - tag_stack(masm, sig_bt[i], next_off); 1.87 } else { 1.88 __ movptr(Address(rsp, st_off), r); 1.89 - tag_stack(masm, sig_bt[i], st_off); 1.90 } 1.91 } 1.92 } else { 1.93 assert(r_1->is_XMMRegister(), ""); 1.94 if (!r_2->is_valid()) { 1.95 __ movflt(Address(rsp, st_off), r_1->as_XMMRegister()); 1.96 - tag_stack(masm, sig_bt[i], st_off); 1.97 } else { 1.98 assert(sig_bt[i] == T_DOUBLE || sig_bt[i] == T_LONG, "wrong type"); 1.99 move_c2i_double(masm, r_1->as_XMMRegister(), st_off); 1.100 @@ -665,20 +634,9 @@ 1.101 } 1.102 1.103 1.104 -// For tagged stacks, double or long value aren't contiguous on the stack 1.105 -// so get them contiguous for the xmm load 1.106 static void move_i2c_double(MacroAssembler *masm, XMMRegister r, Register saved_sp, int ld_off) { 1.107 - int next_val_off = ld_off - Interpreter::stackElementSize(); 1.108 - if (TaggedStackInterpreter) { 1.109 - // use tag slot temporarily for MSW 1.110 - __ movptr(rsi, Address(saved_sp, ld_off)); 1.111 - __ movptr(Address(saved_sp, next_val_off+wordSize), rsi); 1.112 - __ movdbl(r, Address(saved_sp, next_val_off)); 1.113 - // restore tag 1.114 - __ movptr(Address(saved_sp, next_val_off+wordSize), frame::TagValue); 1.115 - } else { 1.116 - __ movdbl(r, Address(saved_sp, next_val_off)); 1.117 - } 1.118 + int next_val_off = ld_off - Interpreter::stackElementSize; 1.119 + __ movdbl(r, Address(saved_sp, next_val_off)); 1.120 } 1.121 1.122 static void gen_i2c_adapter(MacroAssembler *masm, 1.123 @@ -797,9 +755,9 @@ 1.124 assert(!regs[i].second()->is_valid() || regs[i].first()->next() == regs[i].second(), 1.125 "scrambled load targets?"); 1.126 // Load in argument order going down. 1.127 - int ld_off = (total_args_passed - i)*Interpreter::stackElementSize() + Interpreter::value_offset_in_bytes(); 1.128 + int ld_off = (total_args_passed - i) * Interpreter::stackElementSize; 1.129 // Point to interpreter value (vs. tag) 1.130 - int next_off = ld_off - Interpreter::stackElementSize(); 1.131 + int next_off = ld_off - Interpreter::stackElementSize; 1.132 // 1.133 // 1.134 // 1.135 @@ -2322,7 +2280,7 @@ 1.136 // this function returns the adjust size (in number of words) to a c2i adapter 1.137 // activation for use during deoptimization 1.138 int Deoptimization::last_frame_adjust(int callee_parameters, int callee_locals ) { 1.139 - return (callee_locals - callee_parameters) * Interpreter::stackElementWords(); 1.140 + return (callee_locals - callee_parameters) * Interpreter::stackElementWords; 1.141 } 1.142 1.143