Mercurial > hg > truffle
diff src/cpu/x86/vm/relocInfo_x86.cpp @ 164:c436414a719e
6703890: Compressed Oops: add LoadNKlass node to generate narrow oops (32-bits) compare instructions
Summary: Add LoadNKlass and CMoveN nodes, use CmpN and ConN nodes to generate narrow oops compare instructions.
Reviewed-by: never, rasbold
author | kvn |
---|---|
date | Wed, 21 May 2008 13:46:23 -0700 |
parents | a61af66fc99e |
children | d1605aabd0a1 |
line wrap: on
line diff
--- a/src/cpu/x86/vm/relocInfo_x86.cpp Wed May 21 10:45:07 2008 -0700 +++ b/src/cpu/x86/vm/relocInfo_x86.cpp Wed May 21 13:46:23 2008 -0700 @@ -30,11 +30,15 @@ #ifdef AMD64 x += o; typedef Assembler::WhichOperand WhichOperand; - WhichOperand which = (WhichOperand) format(); // that is, disp32 or imm64, call32 + WhichOperand which = (WhichOperand) format(); // that is, disp32 or imm64, call32, narrow oop assert(which == Assembler::disp32_operand || + which == Assembler::narrow_oop_operand || which == Assembler::imm64_operand, "format unpacks ok"); if (which == Assembler::imm64_operand) { *pd_address_in_code() = x; + } else if (which == Assembler::narrow_oop_operand) { + address disp = Assembler::locate_operand(addr(), which); + *(int32_t*) disp = oopDesc::encode_heap_oop((oop)x); } else { // Note: Use runtime_call_type relocations for call32_operand. address ip = addr();