comparison 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
comparison
equal deleted inserted replaced
163:885ed790ecf0 164:c436414a719e
28 28
29 void Relocation::pd_set_data_value(address x, intptr_t o) { 29 void Relocation::pd_set_data_value(address x, intptr_t o) {
30 #ifdef AMD64 30 #ifdef AMD64
31 x += o; 31 x += o;
32 typedef Assembler::WhichOperand WhichOperand; 32 typedef Assembler::WhichOperand WhichOperand;
33 WhichOperand which = (WhichOperand) format(); // that is, disp32 or imm64, call32 33 WhichOperand which = (WhichOperand) format(); // that is, disp32 or imm64, call32, narrow oop
34 assert(which == Assembler::disp32_operand || 34 assert(which == Assembler::disp32_operand ||
35 which == Assembler::narrow_oop_operand ||
35 which == Assembler::imm64_operand, "format unpacks ok"); 36 which == Assembler::imm64_operand, "format unpacks ok");
36 if (which == Assembler::imm64_operand) { 37 if (which == Assembler::imm64_operand) {
37 *pd_address_in_code() = x; 38 *pd_address_in_code() = x;
39 } else if (which == Assembler::narrow_oop_operand) {
40 address disp = Assembler::locate_operand(addr(), which);
41 *(int32_t*) disp = oopDesc::encode_heap_oop((oop)x);
38 } else { 42 } else {
39 // Note: Use runtime_call_type relocations for call32_operand. 43 // Note: Use runtime_call_type relocations for call32_operand.
40 address ip = addr(); 44 address ip = addr();
41 address disp = Assembler::locate_operand(ip, which); 45 address disp = Assembler::locate_operand(ip, which);
42 address next_ip = Assembler::locate_next_instruction(ip); 46 address next_ip = Assembler::locate_next_instruction(ip);