comparison src/cpu/sparc/vm/c1_LIRGenerator_sparc.cpp @ 1572:87fc6aca31ab

6955349: C1: Make G1 barriers work with x64 Summary: This fixes G1 barriers in c1 on x64. Reviewed-by: never
author iveresov
date Thu, 27 May 2010 22:01:55 -0700
parents 323bd24c6520
children e9ff18c4ace7
comparison
equal deleted inserted replaced
1571:2d127394260e 1572:87fc6aca31ab
219 } 219 }
220 } 220 }
221 if (needs_card_mark) { 221 if (needs_card_mark) {
222 LIR_Opr ptr = new_pointer_register(); 222 LIR_Opr ptr = new_pointer_register();
223 __ add(base_opr, LIR_OprFact::intptrConst(offset), ptr); 223 __ add(base_opr, LIR_OprFact::intptrConst(offset), ptr);
224 return new LIR_Address(ptr, 0, type); 224 return new LIR_Address(ptr, type);
225 } else { 225 } else {
226 return new LIR_Address(base_opr, offset, type); 226 return new LIR_Address(base_opr, offset, type);
227 } 227 }
228 } 228 }
229 229
230 230
231 void LIRGenerator::increment_counter(address counter, int step) { 231 void LIRGenerator::increment_counter(address counter, int step) {
232 LIR_Opr pointer = new_pointer_register(); 232 LIR_Opr pointer = new_pointer_register();
233 __ move(LIR_OprFact::intptrConst(counter), pointer); 233 __ move(LIR_OprFact::intptrConst(counter), pointer);
234 LIR_Address* addr = new LIR_Address(pointer, 0, T_INT); 234 LIR_Address* addr = new LIR_Address(pointer, T_INT);
235 increment_counter(addr, step); 235 increment_counter(addr, step);
236 } 236 }
237 237
238 void LIRGenerator::increment_counter(LIR_Address* addr, int step) { 238 void LIRGenerator::increment_counter(LIR_Address* addr, int step) {
239 LIR_Opr temp = new_register(T_INT); 239 LIR_Opr temp = new_register(T_INT);
1157 } 1157 }
1158 LIR_Address* addr; 1158 LIR_Address* addr;
1159 if (type == T_ARRAY || type == T_OBJECT) { 1159 if (type == T_ARRAY || type == T_OBJECT) {
1160 LIR_Opr tmp = new_pointer_register(); 1160 LIR_Opr tmp = new_pointer_register();
1161 __ add(base_op, index_op, tmp); 1161 __ add(base_op, index_op, tmp);
1162 addr = new LIR_Address(tmp, 0, type); 1162 addr = new LIR_Address(tmp, type);
1163 } else { 1163 } else {
1164 addr = new LIR_Address(base_op, index_op, type); 1164 addr = new LIR_Address(base_op, index_op, type);
1165 } 1165 }
1166 1166
1167 if (is_obj) { 1167 if (is_obj) {