src/cpu/x86/vm/sharedRuntime_x86_64.cpp

changeset 1861
2338d41fbd81
parent 1803
93767e6a2dfd
child 1907
c18cbe5936b8
child 1922
110501f54a99
     1.1 --- a/src/cpu/x86/vm/sharedRuntime_x86_64.cpp	Fri Apr 30 04:27:25 2010 -0700
     1.2 +++ b/src/cpu/x86/vm/sharedRuntime_x86_64.cpp	Fri Apr 30 08:37:24 2010 -0700
     1.3 @@ -452,22 +452,6 @@
     1.4    __ bind(L);
     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), (int32_t) 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), (int32_t) frame::TagValue);
    1.16 -      __ movptr(Address(rsp, tag_offset), (int32_t) frame::TagValue);
    1.17 -    } else {
    1.18 -      __ movptr(Address(rsp, tag_offset), (int32_t) frame::TagValue);
    1.19 -    }
    1.20 -  }
    1.21 -}
    1.22 -
    1.23  
    1.24  static void gen_c2i_adapter(MacroAssembler *masm,
    1.25                              int total_args_passed,
    1.26 @@ -489,7 +473,7 @@
    1.27    // we also account for the return address location since
    1.28    // we store it first rather than hold it in rax across all the shuffling
    1.29  
    1.30 -  int extraspace = (total_args_passed * Interpreter::stackElementSize()) + wordSize;
    1.31 +  int extraspace = (total_args_passed * Interpreter::stackElementSize) + wordSize;
    1.32  
    1.33    // stack is aligned, keep it that way
    1.34    extraspace = round_to(extraspace, 2*wordSize);
    1.35 @@ -513,9 +497,8 @@
    1.36      }
    1.37  
    1.38      // offset to start parameters
    1.39 -    int st_off   = (total_args_passed - i) * Interpreter::stackElementSize() +
    1.40 -                   Interpreter::value_offset_in_bytes();
    1.41 -    int next_off = st_off - Interpreter::stackElementSize();
    1.42 +    int st_off   = (total_args_passed - i) * Interpreter::stackElementSize;
    1.43 +    int next_off = st_off - Interpreter::stackElementSize;
    1.44  
    1.45      // Say 4 args:
    1.46      // i   st_off
    1.47 @@ -543,7 +526,6 @@
    1.48          // sign extend??
    1.49          __ movl(rax, Address(rsp, ld_off));
    1.50          __ movptr(Address(rsp, st_off), rax);
    1.51 -        tag_stack(masm, sig_bt[i], st_off);
    1.52  
    1.53        } else {
    1.54  
    1.55 @@ -560,10 +542,8 @@
    1.56            __ mov64(rax, CONST64(0xdeadffffdeadaaaa));
    1.57            __ movptr(Address(rsp, st_off), rax);
    1.58  #endif /* ASSERT */
    1.59 -          tag_stack(masm, sig_bt[i], next_off);
    1.60          } else {
    1.61            __ movq(Address(rsp, st_off), rax);
    1.62 -          tag_stack(masm, sig_bt[i], st_off);
    1.63          }
    1.64        }
    1.65      } else if (r_1->is_Register()) {
    1.66 @@ -572,7 +552,6 @@
    1.67          // must be only an int (or less ) so move only 32bits to slot
    1.68          // why not sign extend??
    1.69          __ movl(Address(rsp, st_off), r);
    1.70 -        tag_stack(masm, sig_bt[i], st_off);
    1.71        } else {
    1.72          // Two VMREgs|OptoRegs can be T_OBJECT, T_ADDRESS, T_DOUBLE, T_LONG
    1.73          // T_DOUBLE and T_LONG use two slots in the interpreter
    1.74 @@ -584,10 +563,8 @@
    1.75            __ movptr(Address(rsp, st_off), rax);
    1.76  #endif /* ASSERT */
    1.77            __ movq(Address(rsp, next_off), r);
    1.78 -          tag_stack(masm, sig_bt[i], next_off);
    1.79          } else {
    1.80            __ movptr(Address(rsp, st_off), r);
    1.81 -          tag_stack(masm, sig_bt[i], st_off);
    1.82          }
    1.83        }
    1.84      } else {
    1.85 @@ -595,7 +572,6 @@
    1.86        if (!r_2->is_valid()) {
    1.87          // only a float use just part of the slot
    1.88          __ movflt(Address(rsp, st_off), r_1->as_XMMRegister());
    1.89 -        tag_stack(masm, sig_bt[i], st_off);
    1.90        } else {
    1.91  #ifdef ASSERT
    1.92          // Overwrite the unused slot with known junk
    1.93 @@ -603,7 +579,6 @@
    1.94          __ movptr(Address(rsp, st_off), rax);
    1.95  #endif /* ASSERT */
    1.96          __ movdbl(Address(rsp, next_off), r_1->as_XMMRegister());
    1.97 -        tag_stack(masm, sig_bt[i], next_off);
    1.98        }
    1.99      }
   1.100    }
   1.101 @@ -688,9 +663,9 @@
   1.102      assert(!regs[i].second()->is_valid() || regs[i].first()->next() == regs[i].second(),
   1.103              "scrambled load targets?");
   1.104      // Load in argument order going down.
   1.105 -    int ld_off = (total_args_passed - i)*Interpreter::stackElementSize() + Interpreter::value_offset_in_bytes();
   1.106 +    int ld_off = (total_args_passed - i)*Interpreter::stackElementSize;
   1.107      // Point to interpreter value (vs. tag)
   1.108 -    int next_off = ld_off - Interpreter::stackElementSize();
   1.109 +    int next_off = ld_off - Interpreter::stackElementSize;
   1.110      //
   1.111      //
   1.112      //
   1.113 @@ -2535,7 +2510,7 @@
   1.114  // this function returns the adjust size (in number of words) to a c2i adapter
   1.115  // activation for use during deoptimization
   1.116  int Deoptimization::last_frame_adjust(int callee_parameters, int callee_locals ) {
   1.117 -  return (callee_locals - callee_parameters) * Interpreter::stackElementWords();
   1.118 +  return (callee_locals - callee_parameters) * Interpreter::stackElementWords;
   1.119  }
   1.120  
   1.121  

mercurial