Mercurial > hg > graal-jvmci-8
comparison src/cpu/x86/vm/c1_LIRGenerator_x86.cpp @ 2002:ac637b7220d1
6985015: C1 needs to support compressed oops
Summary: This change implements compressed oops for C1 for x64 and sparc. The changes are mostly on the codegen level, with a few exceptions when we do access things outside of the heap that are uncompressed from the IR. Compressed oops are now also enabled with tiered.
Reviewed-by: twisti, kvn, never, phh
author | iveresov |
---|---|
date | Tue, 30 Nov 2010 23:23:40 -0800 |
parents | f95d63e2154a |
children | 0cb042fd2d4b |
comparison
equal
deleted
inserted
replaced
1972:f95d63e2154a | 2002:ac637b7220d1 |
---|---|
1149 stub = new SimpleExceptionStub(Runtime1::throw_incompatible_class_change_error_id, LIR_OprFact::illegalOpr, info_for_exception); | 1149 stub = new SimpleExceptionStub(Runtime1::throw_incompatible_class_change_error_id, LIR_OprFact::illegalOpr, info_for_exception); |
1150 } else { | 1150 } else { |
1151 stub = new SimpleExceptionStub(Runtime1::throw_class_cast_exception_id, obj.result(), info_for_exception); | 1151 stub = new SimpleExceptionStub(Runtime1::throw_class_cast_exception_id, obj.result(), info_for_exception); |
1152 } | 1152 } |
1153 LIR_Opr reg = rlock_result(x); | 1153 LIR_Opr reg = rlock_result(x); |
1154 LIR_Opr tmp3 = LIR_OprFact::illegalOpr; | |
1155 if (!x->klass()->is_loaded() || UseCompressedOops) { | |
1156 tmp3 = new_register(objectType); | |
1157 } | |
1154 __ checkcast(reg, obj.result(), x->klass(), | 1158 __ checkcast(reg, obj.result(), x->klass(), |
1155 new_register(objectType), new_register(objectType), | 1159 new_register(objectType), new_register(objectType), tmp3, |
1156 !x->klass()->is_loaded() ? new_register(objectType) : LIR_OprFact::illegalOpr, | |
1157 x->direct_compare(), info_for_exception, patching_info, stub, | 1160 x->direct_compare(), info_for_exception, patching_info, stub, |
1158 x->profiled_method(), x->profiled_bci()); | 1161 x->profiled_method(), x->profiled_bci()); |
1159 } | 1162 } |
1160 | 1163 |
1161 | 1164 |
1168 if ((!x->klass()->is_loaded() || PatchALot)) { | 1171 if ((!x->klass()->is_loaded() || PatchALot)) { |
1169 // must do this before locking the destination register as an oop register | 1172 // must do this before locking the destination register as an oop register |
1170 patching_info = state_for(x, x->state_before()); | 1173 patching_info = state_for(x, x->state_before()); |
1171 } | 1174 } |
1172 obj.load_item(); | 1175 obj.load_item(); |
1176 LIR_Opr tmp3 = LIR_OprFact::illegalOpr; | |
1177 if (!x->klass()->is_loaded() || UseCompressedOops) { | |
1178 tmp3 = new_register(objectType); | |
1179 } | |
1173 __ instanceof(reg, obj.result(), x->klass(), | 1180 __ instanceof(reg, obj.result(), x->klass(), |
1174 new_register(objectType), new_register(objectType), | 1181 new_register(objectType), new_register(objectType), tmp3, |
1175 !x->klass()->is_loaded() ? new_register(objectType) : LIR_OprFact::illegalOpr, | |
1176 x->direct_compare(), patching_info, x->profiled_method(), x->profiled_bci()); | 1182 x->direct_compare(), patching_info, x->profiled_method(), x->profiled_bci()); |
1177 } | 1183 } |
1178 | 1184 |
1179 | 1185 |
1180 void LIRGenerator::do_If(If* x) { | 1186 void LIRGenerator::do_If(If* x) { |