1308 |
1308 |
1309 void LIRGenerator::volatile_field_store(LIR_Opr value, LIR_Address* address, |
1309 void LIRGenerator::volatile_field_store(LIR_Opr value, LIR_Address* address, |
1310 CodeEmitInfo* info) { |
1310 CodeEmitInfo* info) { |
1311 if (value->is_double_cpu()) { |
1311 if (value->is_double_cpu()) { |
1312 assert(address->index()->is_illegal(), "should have a constant displacement"); |
1312 assert(address->index()->is_illegal(), "should have a constant displacement"); |
1313 LIR_Opr tmp = new_pointer_register(); |
1313 LIR_Address* store_addr = NULL; |
1314 add_large_constant(address->base(), address->disp(), tmp); |
1314 if (address->disp() != 0) { |
1315 __ volatile_store_mem_reg(value, new LIR_Address(tmp, (intx)0, address->type()), info); |
1315 LIR_Opr tmp = new_pointer_register(); |
|
1316 add_large_constant(address->base(), address->disp(), tmp); |
|
1317 store_addr = new LIR_Address(tmp, (intx)0, address->type()); |
|
1318 } else { |
|
1319 // address->disp() can be 0, if the address is referenced using the unsafe intrinsic |
|
1320 store_addr = address; |
|
1321 } |
|
1322 __ volatile_store_mem_reg(value, store_addr, info); |
1316 return; |
1323 return; |
1317 } |
1324 } |
1318 __ store(value, address, info, lir_patch_none); |
1325 __ store(value, address, info, lir_patch_none); |
1319 } |
1326 } |
1320 |
1327 |
1321 void LIRGenerator::volatile_field_load(LIR_Address* address, LIR_Opr result, |
1328 void LIRGenerator::volatile_field_load(LIR_Address* address, LIR_Opr result, |
1322 CodeEmitInfo* info) { |
1329 CodeEmitInfo* info) { |
1323 if (result->is_double_cpu()) { |
1330 if (result->is_double_cpu()) { |
1324 assert(address->index()->is_illegal(), "should have a constant displacement"); |
1331 assert(address->index()->is_illegal(), "should have a constant displacement"); |
1325 LIR_Opr tmp = new_pointer_register(); |
1332 LIR_Address* load_addr = NULL; |
1326 add_large_constant(address->base(), address->disp(), tmp); |
1333 if (address->disp() != 0) { |
1327 __ volatile_load_mem_reg(new LIR_Address(tmp, (intx)0, address->type()), result, info); |
1334 LIR_Opr tmp = new_pointer_register(); |
|
1335 add_large_constant(address->base(), address->disp(), tmp); |
|
1336 load_addr = new LIR_Address(tmp, (intx)0, address->type()); |
|
1337 } else { |
|
1338 // address->disp() can be 0, if the address is referenced using the unsafe intrinsic |
|
1339 load_addr = address; |
|
1340 } |
|
1341 __ volatile_load_mem_reg(load_addr, result, info); |
1328 return; |
1342 return; |
1329 } |
1343 } |
1330 __ load(address, result, info, lir_patch_none); |
1344 __ load(address, result, info, lir_patch_none); |
1331 } |
1345 } |