comparison src/cpu/sparc/vm/templateTable_sparc.cpp @ 10169:e10e43e58e92

Merge
author dlong
date Wed, 24 Apr 2013 21:11:02 -0400
parents 9500809ceead
children 63e44cdabb91 46c544b8fbfc
comparison
equal deleted inserted replaced
10168:a6e09d6dd8e5 10169:e10e43e58e92
61 // Load and record the previous value. 61 // Load and record the previous value.
62 __ g1_write_barrier_pre(base, index, offset, 62 __ g1_write_barrier_pre(base, index, offset,
63 noreg /* pre_val */, 63 noreg /* pre_val */,
64 tmp, true /*preserve_o_regs*/); 64 tmp, true /*preserve_o_regs*/);
65 65
66 // G1 barrier needs uncompressed oop for region cross check.
67 Register new_val = val;
68 if (UseCompressedOops && val != G0) {
69 new_val = tmp;
70 __ mov(val, new_val);
71 }
72
66 if (index == noreg ) { 73 if (index == noreg ) {
67 assert(Assembler::is_simm13(offset), "fix this code"); 74 assert(Assembler::is_simm13(offset), "fix this code");
68 __ store_heap_oop(val, base, offset); 75 __ store_heap_oop(val, base, offset);
69 } else { 76 } else {
70 __ store_heap_oop(val, base, index); 77 __ store_heap_oop(val, base, index);
77 __ add(base, offset, base); 84 __ add(base, offset, base);
78 } else { 85 } else {
79 __ add(base, index, base); 86 __ add(base, index, base);
80 } 87 }
81 } 88 }
82 __ g1_write_barrier_post(base, val, tmp); 89 __ g1_write_barrier_post(base, new_val, tmp);
83 } 90 }
84 } 91 }
85 break; 92 break;
86 #endif // INCLUDE_ALL_GCS 93 #endif // INCLUDE_ALL_GCS
87 case BarrierSet::CardTableModRef: 94 case BarrierSet::CardTableModRef: