comparison src/cpu/x86/vm/templateTable_x86_64.cpp @ 10102:f2e682ef3156

8012335: G1: Fix bug with compressed oops in template interpreter on x86 and sparc. Summary: In do_oop_store the uncompressed value of the oop being stored needs to be preserved and passed to g1_write_barrier_post. This is necessary for the heap region cross check to work correctly. Reviewed-by: coleenp, johnc Contributed-by: Martin Doerr <martin.doerr@sap.com>
author johnc
date Wed, 17 Apr 2013 10:57:02 -0700
parents db9981fd3124
children 9500809ceead
comparison
equal deleted inserted replaced
10101:df254344edf1 10102:f2e682ef3156
156 val != noreg /* tosca_live */, 156 val != noreg /* tosca_live */,
157 false /* expand_call */); 157 false /* expand_call */);
158 if (val == noreg) { 158 if (val == noreg) {
159 __ store_heap_oop_null(Address(rdx, 0)); 159 __ store_heap_oop_null(Address(rdx, 0));
160 } else { 160 } else {
161 // G1 barrier needs uncompressed oop for region cross check.
162 Register new_val = val;
163 if (UseCompressedOops) {
164 new_val = rbx;
165 __ movptr(new_val, val);
166 }
161 __ store_heap_oop(Address(rdx, 0), val); 167 __ store_heap_oop(Address(rdx, 0), val);
162 __ g1_write_barrier_post(rdx /* store_adr */, 168 __ g1_write_barrier_post(rdx /* store_adr */,
163 val /* new_val */, 169 new_val /* new_val */,
164 r15_thread /* thread */, 170 r15_thread /* thread */,
165 r8 /* tmp */, 171 r8 /* tmp */,
166 rbx /* tmp2 */); 172 rbx /* tmp2 */);
167 } 173 }
168
169 } 174 }
170 break; 175 break;
171 #endif // INCLUDE_ALL_GCS 176 #endif // INCLUDE_ALL_GCS
172 case BarrierSet::CardTableModRef: 177 case BarrierSet::CardTableModRef:
173 case BarrierSet::CardTableExtension: 178 case BarrierSet::CardTableExtension: