src/cpu/x86/vm/assembler_x86.cpp

changeset 1498
2f1ec89b9995
parent 1482
beb8f45ee9f0
parent 1495
323bd24c6520
child 1543
85f13cdfbc1d
     1.1 --- a/src/cpu/x86/vm/assembler_x86.cpp	Fri Nov 06 00:41:40 2009 -0800
     1.2 +++ b/src/cpu/x86/vm/assembler_x86.cpp	Tue Nov 10 17:00:18 2009 -0800
     1.3 @@ -2251,6 +2251,7 @@
     1.4    emit_byte(0x9D);
     1.5  }
     1.6  
     1.7 +#ifndef _LP64 // no 32bit push/pop on amd64
     1.8  void Assembler::popl(Address dst) {
     1.9    // NOTE: this will adjust stack by 8byte on 64bits
    1.10    InstructionMark im(this);
    1.11 @@ -2258,6 +2259,7 @@
    1.12    emit_byte(0x8F);
    1.13    emit_operand(rax, dst);
    1.14  }
    1.15 +#endif
    1.16  
    1.17  void Assembler::prefetch_prefix(Address src) {
    1.18    prefix(src);
    1.19 @@ -2428,6 +2430,7 @@
    1.20    emit_byte(0x9C);
    1.21  }
    1.22  
    1.23 +#ifndef _LP64 // no 32bit push/pop on amd64
    1.24  void Assembler::pushl(Address src) {
    1.25    // Note this will push 64bit on 64bit
    1.26    InstructionMark im(this);
    1.27 @@ -2435,6 +2438,7 @@
    1.28    emit_byte(0xFF);
    1.29    emit_operand(rsi, src);
    1.30  }
    1.31 +#endif
    1.32  
    1.33  void Assembler::pxor(XMMRegister dst, Address src) {
    1.34    NOT_LP64(assert(VM_Version::supports_sse2(), ""));
    1.35 @@ -5591,7 +5595,12 @@
    1.36  }
    1.37  
    1.38  void MacroAssembler::andpd(XMMRegister dst, AddressLiteral src) {
    1.39 -  andpd(dst, as_Address(src));
    1.40 +  if (reachable(src)) {
    1.41 +    andpd(dst, as_Address(src));
    1.42 +  } else {
    1.43 +    lea(rscratch1, src);
    1.44 +    andpd(dst, Address(rscratch1, 0));
    1.45 +  }
    1.46  }
    1.47  
    1.48  void MacroAssembler::andptr(Register dst, int32_t imm32) {
    1.49 @@ -6078,11 +6087,21 @@
    1.50  }
    1.51  
    1.52  void MacroAssembler::comisd(XMMRegister dst, AddressLiteral src) {
    1.53 -  comisd(dst, as_Address(src));
    1.54 +  if (reachable(src)) {
    1.55 +    comisd(dst, as_Address(src));
    1.56 +  } else {
    1.57 +    lea(rscratch1, src);
    1.58 +    comisd(dst, Address(rscratch1, 0));
    1.59 +  }
    1.60  }
    1.61  
    1.62  void MacroAssembler::comiss(XMMRegister dst, AddressLiteral src) {
    1.63 -  comiss(dst, as_Address(src));
    1.64 +  if (reachable(src)) {
    1.65 +    comiss(dst, as_Address(src));
    1.66 +  } else {
    1.67 +    lea(rscratch1, src);
    1.68 +    comiss(dst, Address(rscratch1, 0));
    1.69 +  }
    1.70  }
    1.71  
    1.72  

mercurial