@@ -3756,6 +3756,7 @@ void emitter::emitIns_R(instruction ins, emitAttr attr, regNumber reg, insOpts o
37563756// gtFlags - DEBUG only gtFlags.
37573757//
37583758void emitter::emitIns_Add_Add_Tls_Reloc(emitAttr attr,
3759+ regNumber targetReg,
37593760 regNumber reg,
37603761 ssize_t imm DEBUGARG(GenTreeFlags gtFlags /* = GTF_EMPTY */))
37613762{
@@ -3777,7 +3778,7 @@ void emitter::emitIns_Add_Add_Tls_Reloc(emitAttr attr,
37773778 id->idInsOpt(INS_OPTS_LSL12);
37783779 id->idAddr()->iiaAddr = (BYTE*)imm;
37793780
3780- id->idReg1(reg );
3781+ id->idReg1(targetReg );
37813782 id->idReg2(reg);
37823783
37833784 // Since this is relocation, set to 8 byte size.
@@ -3804,7 +3805,7 @@ void emitter::emitIns_Add_Add_Tls_Reloc(emitAttr attr,
38043805 id->idInsFmt(fmt);
38053806 id->idAddr()->iiaAddr = (BYTE*)imm;
38063807
3807- id->idReg1(reg );
3808+ id->idReg1(targetReg );
38083809 id->idReg2(reg);
38093810
38103811 // Since this is relocation, set to 8 byte size.
@@ -11349,7 +11350,7 @@ size_t emitter::emitOutputInstr(insGroup* ig, instrDesc* id, BYTE** dp)
1134911350 else
1135011351 {
1135111352 // This is second "add" of "add/add" pair
11352- emitRecordRelocation(odst, id->idAddr()->iiaAddr, IMAGE_REL_ARM64_SECREL_LOW12L );
11353+ emitRecordRelocation(odst, id->idAddr()->iiaAddr, IMAGE_REL_ARM64_SECREL_LOW12A );
1135311354 }
1135411355 }
1135511356 else
@@ -13539,13 +13540,32 @@ void emitter::emitDispInsHelp(
1353913540 if (id->idIsReloc())
1354013541 {
1354113542 assert(ins == INS_add);
13542- printf("[LOW RELOC ");
13543+
13544+ if (emitComp->IsTargetAbi(CORINFO_NATIVEAOT_ABI) && TargetOS::IsWindows && id->idIsTlsGD())
13545+ {
13546+ printf("[HIGH RELOC ");
13547+ }
13548+ else
13549+ {
13550+ printf("[LOW RELOC ");
13551+ }
13552+
1354313553 emitDispImm((ssize_t)id->idAddr()->iiaAddr, false);
1354413554 printf("]");
1354513555 }
1354613556 else
1354713557 {
13548- emitDispImmOptsLSL(emitGetInsSC(id), insOptsLSL12(id->idInsOpt()), 12);
13558+ if (emitComp->IsTargetAbi(CORINFO_NATIVEAOT_ABI) && TargetOS::IsWindows && id->idIsTlsGD())
13559+ {
13560+ assert(ins == INS_add);
13561+ printf("[LOW RELOC ");
13562+ emitDispImm((ssize_t)id->idAddr()->iiaAddr, false);
13563+ printf("]");
13564+ }
13565+ else
13566+ {
13567+ emitDispImmOptsLSL(emitGetInsSC(id), insOptsLSL12(id->idInsOpt()), 12);
13568+ }
1354913569 }
1355013570 break;
1355113571
0 commit comments