@@ -391,8 +391,8 @@ void ZBarrierSetAssembler::store_barrier_fast(MacroAssembler* masm,
391391 if (rnew_zaddress != noreg) {
392392 // noreg means null; no need to color
393393 __ movptr (rnew_zpointer, rnew_zaddress);
394- __ relocate (barrier_Relocation::spec (), ZBarrierRelocationFormatLoadGoodBeforeShl);
395394 __ shlq (rnew_zpointer, barrier_Relocation::unpatched);
395+ __ relocate (barrier_Relocation::spec (), ZBarrierRelocationFormatLoadGoodAfterShX);
396396 __ orq_imm32 (rnew_zpointer, barrier_Relocation::unpatched);
397397 __ relocate (barrier_Relocation::spec (), ZBarrierRelocationFormatStoreGoodAfterOr);
398398 }
@@ -969,13 +969,13 @@ void ZBarrierSetAssembler::try_resolve_jobject_in_native(MacroAssembler* masm,
969969#define __ ce->masm ()->
970970
971971static void z_uncolor(LIR_Assembler* ce, LIR_Opr ref) {
972- __ relocate (barrier_Relocation::spec (), ZBarrierRelocationFormatLoadGoodBeforeShl);
973972 __ shrq (ref->as_register (), barrier_Relocation::unpatched);
973+ __ relocate (barrier_Relocation::spec (), ZBarrierRelocationFormatLoadGoodAfterShX);
974974}
975975
976976static void z_color (LIR_Assembler* ce, LIR_Opr ref) {
977- __ relocate (barrier_Relocation::spec (), ZBarrierRelocationFormatLoadGoodBeforeShl);
978977 __ shlq (ref->as_register (), barrier_Relocation::unpatched);
978+ __ relocate (barrier_Relocation::spec (), ZBarrierRelocationFormatLoadGoodAfterShX);
979979 __ orq_imm32 (ref->as_register (), barrier_Relocation::unpatched);
980980 __ relocate (barrier_Relocation::spec (), ZBarrierRelocationFormatStoreGoodAfterOr);
981981}
@@ -1278,8 +1278,8 @@ void ZBarrierSetAssembler::generate_c2_store_barrier_stub(MacroAssembler* masm,
12781278
12791279static int patch_barrier_relocation_offset (int format) {
12801280 switch (format) {
1281- case ZBarrierRelocationFormatLoadGoodBeforeShl :
1282- return 3 ;
1281+ case ZBarrierRelocationFormatLoadGoodAfterShX :
1282+ return - 1 ;
12831283
12841284 case ZBarrierRelocationFormatStoreGoodAfterCmp:
12851285 return -2 ;
@@ -1300,7 +1300,7 @@ static int patch_barrier_relocation_offset(int format) {
13001300
13011301static uint16_t patch_barrier_relocation_value (int format) {
13021302 switch (format) {
1303- case ZBarrierRelocationFormatLoadGoodBeforeShl :
1303+ case ZBarrierRelocationFormatLoadGoodAfterShX :
13041304 return (uint16_t )ZPointerLoadShift;
13051305
13061306 case ZBarrierRelocationFormatMarkBadAfterTest:
@@ -1327,7 +1327,7 @@ void ZBarrierSetAssembler::patch_barrier_relocation(address addr, int format) {
13271327 const int offset = patch_barrier_relocation_offset (format);
13281328 const uint16_t value = patch_barrier_relocation_value (format);
13291329 uint8_t * const patch_addr = (uint8_t *)addr + offset;
1330- if (format == ZBarrierRelocationFormatLoadGoodBeforeShl ) {
1330+ if (format == ZBarrierRelocationFormatLoadGoodAfterShX ) {
13311331 *patch_addr = (uint8_t )value;
13321332 } else {
13331333 *(uint16_t *)patch_addr = value;
0 commit comments