comparison src/cpu/sparc/vm/relocInfo_sparc.cpp @ 6848:8e47bac5643a

7054512: Compress class pointers after perm gen removal Summary: support of compress class pointers in the compilers. Reviewed-by: kvn, twisti
author roland
date Tue, 09 Oct 2012 10:11:38 +0200
parents da91efe96a93
children f0c2369fda5a
comparison
equal deleted inserted replaced
6847:65d07d9ee446 6848:8e47bac5643a
95 { 95 {
96 #ifdef _LP64 96 #ifdef _LP64
97 jint inst2; 97 jint inst2;
98 guarantee(Assembler::inv_op2(inst)==Assembler::sethi_op2, "must be sethi"); 98 guarantee(Assembler::inv_op2(inst)==Assembler::sethi_op2, "must be sethi");
99 if (format() != 0) { 99 if (format() != 0) {
100 assert(type() == relocInfo::oop_type, "only narrow oops case"); 100 assert(type() == relocInfo::oop_type || type() == relocInfo::metadata_type, "only narrow oops or klasses case");
101 jint np = oopDesc::encode_heap_oop((oop)x); 101 jint np = type() == relocInfo::oop_type ? oopDesc::encode_heap_oop((oop)x) : oopDesc::encode_klass((Klass*)x);
102 inst &= ~Assembler::hi22(-1); 102 inst &= ~Assembler::hi22(-1);
103 inst |= Assembler::hi22((intptr_t)np); 103 inst |= Assembler::hi22((intptr_t)np);
104 if (verify_only) { 104 if (verify_only) {
105 assert(ip->long_at(0) == inst, "instructions must match"); 105 assert(ip->long_at(0) == inst, "instructions must match");
106 } else { 106 } else {