src/cpu/x86/vm/c1_LinearScan_x86.hpp

changeset 739
dc7f315e41f7
parent 435
a61af66fc99e
child 772
9ee9cf798b59
     1.1 --- a/src/cpu/x86/vm/c1_LinearScan_x86.hpp	Tue Aug 26 15:49:40 2008 -0700
     1.2 +++ b/src/cpu/x86/vm/c1_LinearScan_x86.hpp	Wed Aug 27 00:21:55 2008 -0700
     1.3 @@ -23,18 +23,29 @@
     1.4   */
     1.5  
     1.6  inline bool LinearScan::is_processed_reg_num(int reg_num) {
     1.7 +#ifndef _LP64
     1.8    // rsp and rbp (numbers 6 ancd 7) are ignored
     1.9    assert(FrameMap::rsp_opr->cpu_regnr() == 6, "wrong assumption below");
    1.10    assert(FrameMap::rbp_opr->cpu_regnr() == 7, "wrong assumption below");
    1.11    assert(reg_num >= 0, "invalid reg_num");
    1.12  
    1.13    return reg_num < 6 || reg_num > 7;
    1.14 +#else
    1.15 +  // rsp and rbp, r10, r15 (numbers 6 ancd 7) are ignored
    1.16 +  assert(FrameMap::r10_opr->cpu_regnr() == 12, "wrong assumption below");
    1.17 +  assert(FrameMap::r15_opr->cpu_regnr() == 13, "wrong assumption below");
    1.18 +  assert(FrameMap::rsp_opr->cpu_regnrLo() == 14, "wrong assumption below");
    1.19 +  assert(FrameMap::rbp_opr->cpu_regnrLo() == 15, "wrong assumption below");
    1.20 +  assert(reg_num >= 0, "invalid reg_num");
    1.21 +
    1.22 +  return reg_num < 12 || reg_num > 15;
    1.23 +#endif // _LP64
    1.24  }
    1.25  
    1.26  inline int LinearScan::num_physical_regs(BasicType type) {
    1.27    // Intel requires two cpu registers for long,
    1.28    // but requires only one fpu register for double
    1.29 -  if (type == T_LONG) {
    1.30 +  if (LP64_ONLY(false &&) type == T_LONG) {
    1.31      return 2;
    1.32    }
    1.33    return 1;

mercurial