Mercurial > hg > graal-jvmci-8
comparison src/cpu/sparc/vm/relocInfo_sparc.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 |
---|---|
85 case Assembler::branch_op: | 85 case Assembler::branch_op: |
86 { | 86 { |
87 #ifdef _LP64 | 87 #ifdef _LP64 |
88 jint inst2; | 88 jint inst2; |
89 guarantee(Assembler::inv_op2(inst)==Assembler::sethi_op2, "must be sethi"); | 89 guarantee(Assembler::inv_op2(inst)==Assembler::sethi_op2, "must be sethi"); |
90 if (format() != 0) { | |
91 assert(type() == relocInfo::oop_type, "only narrow oops case"); | |
92 jint np = oopDesc::encode_heap_oop((oop)x); | |
93 inst &= ~Assembler::hi22(-1); | |
94 inst |= Assembler::hi22((intptr_t)np); | |
95 ip->set_long_at(0, inst); | |
96 inst2 = ip->long_at( NativeInstruction::nop_instruction_size ); | |
97 guarantee(Assembler::inv_op(inst2)==Assembler::arith_op, "arith op"); | |
98 ip->set_long_at(NativeInstruction::nop_instruction_size, ip->set_data32_simm13( inst2, (intptr_t)np)); | |
99 break; | |
100 } | |
90 ip->set_data64_sethi( ip->addr_at(0), (intptr_t)x ); | 101 ip->set_data64_sethi( ip->addr_at(0), (intptr_t)x ); |
91 #ifdef COMPILER2 | 102 #ifdef COMPILER2 |
92 // [RGV] Someone must have missed putting in a reloc entry for the | 103 // [RGV] Someone must have missed putting in a reloc entry for the |
93 // add in compiler2. | 104 // add in compiler2. |
94 inst2 = ip->long_at( NativeMovConstReg::add_offset ); | 105 inst2 = ip->long_at( NativeMovConstReg::add_offset ); |