Skip to content

Commit d06fb08

Browse files
authored
Handle more than 64 registers - Part 5 (#103188)
* first cut * make clrjit/clrjit_universal_arm64_x64 working, introduce SRBM_* * make clrjit_universal_arm_x64 build * make everything else build * fix some static asserts * jit format * minor static assert fix * Remove RegMaskTP_NONE * fix some build errors * jit format * some more fixes * Use regMaskTP for kill RefPositions * fix a typo * Fix build errors for riscv64/loongarch64 * try to fix gcc errors * jit format * Revert "try to fix gcc errors" This reverts commit b68f2d3. * fix gcc build failure * minor code cleanup * review comments
1 parent 9e2b018 commit d06fb08

File tree

17 files changed

+369
-281
lines changed

17 files changed

+369
-281
lines changed

src/coreclr/jit/codegenxarch.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8852,7 +8852,7 @@ void CodeGen::genCreateAndStoreGCInfoX64(unsigned codeSize, unsigned prologSize
88528852
// -saved bool for synchronized methods
88538853

88548854
// slots for ret address + FP + EnC callee-saves
8855-
int preservedAreaSize = (2 + genCountBits((uint64_t)RBM_ENC_CALLEE_SAVED)) * REGSIZE_BYTES;
8855+
int preservedAreaSize = (2 + genCountBits(RBM_ENC_CALLEE_SAVED)) * REGSIZE_BYTES;
88568856

88578857
if (compiler->info.compFlags & CORINFO_FLG_SYNCH)
88588858
{

src/coreclr/jit/compiler.h

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8317,14 +8317,14 @@ class Compiler
83178317
return reg;
83188318
}
83198319

8320-
_regMask_enum GetRegMask() const
8320+
regMaskTP GetRegMask() const
83218321
{
83228322
return regMask;
83238323
}
83248324

83258325
private:
8326-
regNumber reg;
8327-
_regMask_enum regMask;
8326+
regNumber reg;
8327+
regMaskTP regMask;
83288328
};
83298329

83308330
VirtualStubParamInfo* virtualStubParamInfo;
@@ -9943,7 +9943,8 @@ class Compiler
99439943
// On these platforms we assume the register that the target is
99449944
// passed in is preserved by the validator and take care to get the
99459945
// target from the register for the call (even in debug mode).
9946-
static_assert_no_msg((RBM_VALIDATE_INDIRECT_CALL_TRASH & (1 << REG_VALIDATE_INDIRECT_CALL_ADDR)) == 0);
9946+
static_assert_no_msg((RBM_VALIDATE_INDIRECT_CALL_TRASH & regMaskTP(1 << REG_VALIDATE_INDIRECT_CALL_ADDR)) ==
9947+
RBM_NONE);
99479948
if (JitConfig.JitForceControlFlowGuard())
99489949
return true;
99499950

src/coreclr/jit/emit.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8787,7 +8787,7 @@ void emitter::emitRecordGCcall(BYTE* codePos, unsigned char callInstrSize)
87878787
callDsc* call;
87888788

87898789
#ifdef JIT32_GCENCODER
8790-
unsigned regs = (unsigned)(emitThisGCrefRegs | emitThisByrefRegs) & ~RBM_INTRET;
8790+
unsigned regs = (unsigned)((emitThisGCrefRegs | emitThisByrefRegs) & ~RBM_INTRET).GetIntRegSet();
87918791

87928792
// The JIT32 GCInfo encoder allows us to (as the comment previously here said):
87938793
// "Bail if this is a totally boring call", but the GCInfoEncoder/Decoder interface
@@ -10062,7 +10062,7 @@ void emitter::emitStackPopLargeStk(BYTE* addr, bool isCall, unsigned char callIn
1006210062
// of callee-saved registers only).
1006310063
for (unsigned calleeSavedRegIdx = 0; calleeSavedRegIdx < CNT_CALL_GC_REGS; calleeSavedRegIdx++)
1006410064
{
10065-
regMaskSmall calleeSavedRbm = raRbmCalleeSaveOrder[calleeSavedRegIdx];
10065+
regMaskTP calleeSavedRbm = raRbmCalleeSaveOrder[calleeSavedRegIdx];
1006610066
if (emitThisGCrefRegs & calleeSavedRbm)
1006710067
{
1006810068
gcrefRegs |= (1 << calleeSavedRegIdx);

src/coreclr/jit/emitarm.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6867,9 +6867,9 @@ void emitter::emitDispRegmask(int imm, bool encodedPC_LR)
68676867
}
68686868
else
68696869
{
6870-
hasPC = (imm & RBM_PC) != 0;
6871-
hasLR = (imm & RBM_LR) != 0;
6872-
imm &= ~(RBM_PC | RBM_LR);
6870+
hasPC = (imm & SRBM_PC) != 0;
6871+
hasLR = (imm & SRBM_LR) != 0;
6872+
imm &= ~(SRBM_PC | SRBM_LR);
68736873
}
68746874

68756875
regNumber reg = REG_R0;

src/coreclr/jit/emitinl.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -403,8 +403,8 @@ inline ssize_t emitter::emitGetInsAmdAny(const instrDesc* id) const
403403

404404
/*static*/ inline unsigned emitter::emitDecodeCallGCregs(instrDesc* id)
405405
{
406-
unsigned regmask = 0;
407-
unsigned encodeMask;
406+
regMaskTP regmask = RBM_NONE;
407+
unsigned encodeMask;
408408

409409
#ifdef TARGET_X86
410410
assert(REGNUM_BITS >= 3);
@@ -568,7 +568,7 @@ inline ssize_t emitter::emitGetInsAmdAny(const instrDesc* id) const
568568
NYI("unknown target");
569569
#endif
570570

571-
return regmask;
571+
return (unsigned int)regmask.getLow();
572572
}
573573

574574
#ifdef TARGET_XARCH

src/coreclr/jit/gcencode.cpp

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4471,8 +4471,8 @@ void GCInfo::gcMakeRegPtrTable(
44714471
assert(call->u1.cdArgMask == 0 && call->cdArgCnt == 0);
44724472

44734473
// Other than that, we just have to deal with the regmasks.
4474-
regMaskSmall gcrefRegMask = call->cdGCrefRegs & RBM_CALL_GC_REGS;
4475-
regMaskSmall byrefRegMask = call->cdByrefRegs & RBM_CALL_GC_REGS;
4474+
regMaskSmall gcrefRegMask = call->cdGCrefRegs & RBM_CALL_GC_REGS.GetIntRegSet();
4475+
regMaskSmall byrefRegMask = call->cdByrefRegs & RBM_CALL_GC_REGS.GetIntRegSet();
44764476

44774477
assert((gcrefRegMask & byrefRegMask) == 0);
44784478

@@ -4558,9 +4558,11 @@ void GCInfo::gcMakeRegPtrTable(
45584558
{
45594559
// This is a true call site.
45604560

4561-
regMaskSmall gcrefRegMask = genRegMaskFromCalleeSavedMask(genRegPtrTemp->rpdCallGCrefRegs);
4561+
regMaskSmall gcrefRegMask =
4562+
genRegMaskFromCalleeSavedMask(genRegPtrTemp->rpdCallGCrefRegs).GetIntRegSet();
45624563

4563-
regMaskSmall byrefRegMask = genRegMaskFromCalleeSavedMask(genRegPtrTemp->rpdCallByrefRegs);
4564+
regMaskSmall byrefRegMask =
4565+
genRegMaskFromCalleeSavedMask(genRegPtrTemp->rpdCallByrefRegs).GetIntRegSet();
45644566

45654567
assert((gcrefRegMask & byrefRegMask) == 0);
45664568

src/coreclr/jit/lsra.cpp

Lines changed: 53 additions & 55 deletions
Original file line numberDiff line numberDiff line change
@@ -243,7 +243,7 @@ SingleTypeRegSet LinearScan::allRegs(RegisterType rt)
243243
SingleTypeRegSet LinearScan::allByteRegs()
244244
{
245245
#ifdef TARGET_X86
246-
return availableIntRegs & RBM_BYTE_REGS;
246+
return availableIntRegs & RBM_BYTE_REGS.GetIntRegSet();
247247
#else
248248
return availableIntRegs;
249249
#endif
@@ -265,7 +265,7 @@ SingleTypeRegSet LinearScan::allSIMDRegs()
265265
SingleTypeRegSet LinearScan::lowSIMDRegs()
266266
{
267267
#if defined(TARGET_AMD64)
268-
return (availableFloatRegs & RBM_LOWFLOAT);
268+
return (availableFloatRegs & RBM_LOWFLOAT.GetFloatRegSet());
269269
#else
270270
return availableFloatRegs;
271271
#endif
@@ -278,7 +278,11 @@ void LinearScan::updateNextFixedRef(RegRecord* regRecord, RefPosition* nextRefPo
278278
RefPosition* kill = nextKill;
279279
while ((kill != nullptr) && (kill->nodeLocation < nextLocation))
280280
{
281+
#ifdef HAS_MORE_THAN_64_REGISTERS
282+
if (kill->killRegisterAssignment.IsRegNumInMask(regRecord->regNum))
283+
#else
281284
if ((kill->registerAssignment & genSingleTypeRegMask(regRecord->regNum)) != RBM_NONE)
285+
#endif
282286
{
283287
nextLocation = kill->nodeLocation;
284288
break;
@@ -449,11 +453,7 @@ SingleTypeRegSet LinearScan::internalFloatRegCandidates()
449453
}
450454
else
451455
{
452-
#ifdef TARGET_AMD64
453456
return RBM_FLT_CALLEE_TRASH.GetFloatRegSet();
454-
#else
455-
return RBM_FLT_CALLEE_TRASH;
456-
#endif // TARGET_AMD64
457457
}
458458
}
459459

@@ -526,34 +526,32 @@ SingleTypeRegSet LinearScan::getConstrainedRegMask(RefPosition* refPosition,
526526
#if defined(TARGET_AMD64)
527527
#ifdef UNIX_AMD64_ABI
528528
// On System V the RDI and RSI are not callee saved. Use R12 ans R13 as callee saved registers.
529-
static const SingleTypeRegSet LsraLimitSmallIntSet =
530-
(RBM_EAX | RBM_ECX | RBM_EBX | RBM_ETW_FRAMED_EBP | RBM_R12 | RBM_R13);
529+
static const regMaskTP LsraLimitSmallIntSet = (RBM_EAX | RBM_ECX | RBM_EBX | RBM_ETW_FRAMED_EBP | RBM_R12 | RBM_R13);
531530
#else // !UNIX_AMD64_ABI
532531
// On Windows Amd64 use the RDI and RSI as callee saved registers.
533-
static const SingleTypeRegSet LsraLimitSmallIntSet =
534-
(RBM_EAX | RBM_ECX | RBM_EBX | RBM_ETW_FRAMED_EBP | RBM_ESI | RBM_EDI);
532+
static const regMaskTP LsraLimitSmallIntSet = (RBM_EAX | RBM_ECX | RBM_EBX | RBM_ETW_FRAMED_EBP | RBM_ESI | RBM_EDI);
535533
#endif // !UNIX_AMD64_ABI
536-
static const SingleTypeRegSet LsraLimitSmallFPSet = (RBM_XMM0 | RBM_XMM1 | RBM_XMM2 | RBM_XMM6 | RBM_XMM7);
537-
static const SingleTypeRegSet LsraLimitUpperSimdSet =
534+
static const regMaskTP LsraLimitSmallFPSet = (RBM_XMM0 | RBM_XMM1 | RBM_XMM2 | RBM_XMM6 | RBM_XMM7);
535+
static const regMaskTP LsraLimitUpperSimdSet =
538536
(RBM_XMM16 | RBM_XMM17 | RBM_XMM18 | RBM_XMM19 | RBM_XMM20 | RBM_XMM21 | RBM_XMM22 | RBM_XMM23 | RBM_XMM24 |
539537
RBM_XMM25 | RBM_XMM26 | RBM_XMM27 | RBM_XMM28 | RBM_XMM29 | RBM_XMM30 | RBM_XMM31);
540538
#elif defined(TARGET_ARM)
541539
// On ARM, we may need two registers to set up the target register for a virtual call, so we need
542540
// to have at least the maximum number of arg registers, plus 2.
543-
static const SingleTypeRegSet LsraLimitSmallIntSet = (RBM_R0 | RBM_R1 | RBM_R2 | RBM_R3 | RBM_R4 | RBM_R5);
544-
static const SingleTypeRegSet LsraLimitSmallFPSet = (RBM_F0 | RBM_F1 | RBM_F2 | RBM_F16 | RBM_F17);
541+
static const regMaskTP LsraLimitSmallIntSet = (RBM_R0 | RBM_R1 | RBM_R2 | RBM_R3 | RBM_R4 | RBM_R5);
542+
static const regMaskTP LsraLimitSmallFPSet = (RBM_F0 | RBM_F1 | RBM_F2 | RBM_F16 | RBM_F17);
545543
#elif defined(TARGET_ARM64)
546-
static const SingleTypeRegSet LsraLimitSmallIntSet = (RBM_R0 | RBM_R1 | RBM_R2 | RBM_R19 | RBM_R20);
547-
static const SingleTypeRegSet LsraLimitSmallFPSet = (RBM_V0 | RBM_V1 | RBM_V2 | RBM_V8 | RBM_V9);
544+
static const regMaskTP LsraLimitSmallIntSet = (RBM_R0 | RBM_R1 | RBM_R2 | RBM_R19 | RBM_R20);
545+
static const regMaskTP LsraLimitSmallFPSet = (RBM_V0 | RBM_V1 | RBM_V2 | RBM_V8 | RBM_V9);
548546
#elif defined(TARGET_X86)
549-
static const SingleTypeRegSet LsraLimitSmallIntSet = (RBM_EAX | RBM_ECX | RBM_EDI);
550-
static const SingleTypeRegSet LsraLimitSmallFPSet = (RBM_XMM0 | RBM_XMM1 | RBM_XMM2 | RBM_XMM6 | RBM_XMM7);
547+
static const regMaskTP LsraLimitSmallIntSet = (RBM_EAX | RBM_ECX | RBM_EDI);
548+
static const regMaskTP LsraLimitSmallFPSet = (RBM_XMM0 | RBM_XMM1 | RBM_XMM2 | RBM_XMM6 | RBM_XMM7);
551549
#elif defined(TARGET_LOONGARCH64)
552-
static const SingleTypeRegSet LsraLimitSmallIntSet = (RBM_T1 | RBM_T3 | RBM_A0 | RBM_A1 | RBM_T0);
553-
static const SingleTypeRegSet LsraLimitSmallFPSet = (RBM_F0 | RBM_F1 | RBM_F2 | RBM_F8 | RBM_F9);
550+
static const regMaskTP LsraLimitSmallIntSet = (RBM_T1 | RBM_T3 | RBM_A0 | RBM_A1 | RBM_T0);
551+
static const regMaskTP LsraLimitSmallFPSet = (RBM_F0 | RBM_F1 | RBM_F2 | RBM_F8 | RBM_F9);
554552
#elif defined(TARGET_RISCV64)
555-
static const SingleTypeRegSet LsraLimitSmallIntSet = (RBM_T1 | RBM_T3 | RBM_A0 | RBM_A1 | RBM_T0);
556-
static const SingleTypeRegSet LsraLimitSmallFPSet = (RBM_F0 | RBM_F1 | RBM_F2 | RBM_F8 | RBM_F9);
553+
static const regMaskTP LsraLimitSmallIntSet = (RBM_T1 | RBM_T3 | RBM_A0 | RBM_A1 | RBM_T0);
554+
static const regMaskTP LsraLimitSmallFPSet = (RBM_F0 | RBM_F1 | RBM_F2 | RBM_F8 | RBM_F9);
557555
#else
558556
#error Unsupported or unset target architecture
559557
#endif // target
@@ -596,37 +594,37 @@ SingleTypeRegSet LinearScan::stressLimitRegs(RefPosition* refPosition, RegisterT
596594
case LSRA_LIMIT_CALLEE:
597595
if (!compiler->opts.compDbgEnC)
598596
{
599-
mask = getConstrainedRegMask(refPosition, regType, mask, RBM_CALLEE_SAVED, minRegCount);
597+
mask = getConstrainedRegMask(refPosition, regType, mask, RBM_CALLEE_SAVED.GetRegSetForType(regType),
598+
minRegCount);
600599
}
601600
break;
602601

603602
case LSRA_LIMIT_CALLER:
604603
{
605-
#ifdef TARGET_XARCH
606604
mask = getConstrainedRegMask(refPosition, regType, mask, RBM_CALLEE_TRASH.GetRegSetForType(regType),
607605
minRegCount);
608-
#else
609-
mask = getConstrainedRegMask(refPosition, regType, mask, RBM_CALLEE_TRASH, minRegCount);
610-
#endif // TARGET_AMD64
611606
}
612607
break;
613608

614609
case LSRA_LIMIT_SMALL_SET:
615610
if ((mask & LsraLimitSmallIntSet) != RBM_NONE)
616611
{
617-
mask = getConstrainedRegMask(refPosition, regType, mask, LsraLimitSmallIntSet, minRegCount);
612+
mask = getConstrainedRegMask(refPosition, regType, mask,
613+
LsraLimitSmallIntSet.GetRegSetForType(regType), minRegCount);
618614
}
619615
else if ((mask & LsraLimitSmallFPSet) != RBM_NONE)
620616
{
621-
mask = getConstrainedRegMask(refPosition, regType, mask, LsraLimitSmallFPSet, minRegCount);
617+
mask = getConstrainedRegMask(refPosition, regType, mask,
618+
LsraLimitSmallFPSet.GetRegSetForType(regType), minRegCount);
622619
}
623620
break;
624621

625622
#if defined(TARGET_AMD64)
626623
case LSRA_LIMIT_UPPER_SIMD_SET:
627624
if ((mask & LsraLimitUpperSimdSet) != RBM_NONE)
628625
{
629-
mask = getConstrainedRegMask(refPosition, regType, mask, LsraLimitUpperSimdSet, minRegCount);
626+
mask = getConstrainedRegMask(refPosition, regType, mask,
627+
LsraLimitUpperSimdSet.GetRegSetForType(regType), minRegCount);
630628
}
631629
break;
632630
#endif
@@ -847,39 +845,43 @@ LinearScan::LinearScan(Compiler* theCompiler)
847845
// Note: one known reason why we exclude LR is because NativeAOT has dependency on not
848846
// using LR as a GPR. See: https://github.com/dotnet/runtime/issues/101932
849847
// Once that is addressed, we may consider allowing LR in availableIntRegs.
850-
availableIntRegs = ((RBM_ALLINT & ~(RBM_PR | RBM_FP | RBM_LR) & ~compiler->codeGen->regSet.rsMaskResvd.getLow()));
848+
availableIntRegs =
849+
(RBM_ALLINT & ~(RBM_PR | RBM_FP | RBM_LR) & ~compiler->codeGen->regSet.rsMaskResvd).GetIntRegSet();
851850
#elif defined(TARGET_LOONGARCH64) || defined(TARGET_RISCV64)
852-
availableIntRegs = (RBM_ALLINT & ~(RBM_FP | RBM_RA) & ~compiler->codeGen->regSet.rsMaskResvd.getLow());
851+
availableIntRegs = (RBM_ALLINT & ~(RBM_FP | RBM_RA) & ~compiler->codeGen->regSet.rsMaskResvd).GetIntRegSet();
853852
#else
854-
availableIntRegs = (RBM_ALLINT & ~compiler->codeGen->regSet.rsMaskResvd.getLow());
853+
availableIntRegs = (RBM_ALLINT & ~compiler->codeGen->regSet.rsMaskResvd).GetIntRegSet();
855854
#endif
856855

857856
#if ETW_EBP_FRAMED
858-
availableIntRegs &= ~RBM_FPBASE;
857+
availableIntRegs &= ~RBM_FPBASE.GetIntRegSet();
859858
#endif // ETW_EBP_FRAMED
860859

861860
#ifdef TARGET_AMD64
862861
availableFloatRegs = RBM_ALLFLOAT.GetFloatRegSet();
863862
availableDoubleRegs = RBM_ALLDOUBLE.GetFloatRegSet();
864863
#else
865-
availableFloatRegs = RBM_ALLFLOAT;
866-
availableDoubleRegs = RBM_ALLDOUBLE;
864+
availableFloatRegs = RBM_ALLFLOAT.GetFloatRegSet();
865+
availableDoubleRegs = RBM_ALLDOUBLE.GetFloatRegSet();
867866
#endif
868867

869-
#if defined(TARGET_XARCH)
868+
#if defined(TARGET_XARCH) || defined(TARGET_ARM64)
870869
availableMaskRegs = RBM_ALLMASK.GetPredicateRegSet();
871-
#elif defined(TARGET_ARM64)
872-
availableMaskRegs = RBM_ALLMASK;
873870
#endif
874871

875872
#if defined(TARGET_AMD64) || defined(TARGET_ARM64)
876873
if (compiler->opts.compDbgEnC)
877874
{
878875
// When the EnC option is set we have an exact set of registers that we always save
879876
// that are also available in future versions.
880-
availableIntRegs &= ~RBM_INT_CALLEE_SAVED | RBM_ENC_CALLEE_SAVED;
877+
availableIntRegs &= (~RBM_INT_CALLEE_SAVED | RBM_ENC_CALLEE_SAVED).GetIntRegSet();
878+
#if defined(UNIX_AMD64_ABI)
881879
availableFloatRegs &= ~RBM_FLT_CALLEE_SAVED;
882880
availableDoubleRegs &= ~RBM_FLT_CALLEE_SAVED;
881+
#else
882+
availableFloatRegs &= ~RBM_FLT_CALLEE_SAVED.GetFloatRegSet();
883+
availableDoubleRegs &= ~RBM_FLT_CALLEE_SAVED.GetFloatRegSet();
884+
#endif // UNIX_AMD64_ABI
883885
#if defined(TARGET_XARCH)
884886
availableMaskRegs &= ~RBM_MSK_CALLEE_SAVED;
885887
#endif // TARGET_XARCH
@@ -889,8 +891,8 @@ LinearScan::LinearScan(Compiler* theCompiler)
889891
#if defined(TARGET_AMD64)
890892
if (compiler->canUseEvexEncoding())
891893
{
892-
availableFloatRegs |= RBM_HIGHFLOAT;
893-
availableDoubleRegs |= RBM_HIGHFLOAT;
894+
availableFloatRegs |= RBM_HIGHFLOAT.GetFloatRegSet();
895+
availableDoubleRegs |= RBM_HIGHFLOAT.GetFloatRegSet();
894896
}
895897
#endif
896898

@@ -2813,7 +2815,7 @@ void LinearScan::setFrameType()
28132815
SingleTypeRegSet removeMask = RBM_NONE;
28142816
if (frameType == FT_EBP_FRAME)
28152817
{
2816-
removeMask |= RBM_FPBASE;
2818+
removeMask |= RBM_FPBASE.GetIntRegSet();
28172819
}
28182820

28192821
compiler->rpFrameType = frameType;
@@ -2826,7 +2828,7 @@ void LinearScan::setFrameType()
28262828
compiler->codeGen->regSet.rsMaskResvd |= RBM_OPT_RSVD;
28272829
assert(REG_OPT_RSVD != REG_FP);
28282830
JITDUMP(" Reserved REG_OPT_RSVD (%s) due to large frame\n", getRegName(REG_OPT_RSVD));
2829-
removeMask |= RBM_OPT_RSVD;
2831+
removeMask |= RBM_OPT_RSVD.GetIntRegSet();
28302832
}
28312833
#endif // TARGET_ARMARCH || TARGET_RISCV64
28322834

@@ -4039,7 +4041,7 @@ void LinearScan::processKills(RefPosition* killRefPosition)
40394041
{
40404042
RefPosition* nextKill = killRefPosition->nextRefPosition;
40414043

4042-
regMaskTP killedRegs = killRefPosition->registerAssignment;
4044+
regMaskTP killedRegs = killRefPosition->getKillRegisterAssignment();
40434045
while (killedRegs.IsNonEmpty())
40444046
{
40454047
regNumber killedReg = genFirstRegNumFromMaskAndToggle(killedRegs);
@@ -4059,9 +4061,9 @@ void LinearScan::processKills(RefPosition* killRefPosition)
40594061
updateNextFixedRef(regRecord, regNextRefPos, nextKill);
40604062
}
40614063

4062-
regsBusyUntilKill &= ~killRefPosition->registerAssignment;
4064+
regsBusyUntilKill &= ~killRefPosition->getKillRegisterAssignment();
40634065
INDEBUG(dumpLsraAllocationEvent(LSRA_EVENT_KILL_REGS, nullptr, REG_NA, nullptr, NONE,
4064-
killRefPosition->registerAssignment));
4066+
killRefPosition->getKillRegisterAssignment()));
40654067
}
40664068

40674069
//------------------------------------------------------------------------
@@ -8811,7 +8813,7 @@ regNumber LinearScan::getTempRegForResolution(BasicBlock* fromBlock,
88118813
{
88128814
// Exclude any doubles for which the odd half isn't in freeRegs,
88138815
// and restrict down to just the even part of the even/odd pair.
8814-
freeRegs &= (freeRegs & RBM_ALLDOUBLE_HIGH) >> 1;
8816+
freeRegs &= (freeRegs & RBM_ALLDOUBLE_HIGH.GetFloatRegSet()) >> 1;
88158817
}
88168818
#endif
88178819

@@ -8822,13 +8824,9 @@ regNumber LinearScan::getTempRegForResolution(BasicBlock* fromBlock,
88228824
else
88238825
{
88248826
// Prefer a callee-trashed register if possible to prevent new prolog/epilog saves/restores.
8825-
if ((freeRegs & RBM_CALLEE_TRASH) != 0)
8827+
if ((freeRegs & RBM_CALLEE_TRASH.GetRegSetForType(type)) != 0)
88268828
{
8827-
#ifdef TARGET_XARCH
88288829
freeRegs &= RBM_CALLEE_TRASH.GetRegSetForType(type);
8829-
#else
8830-
freeRegs &= RBM_CALLEE_TRASH;
8831-
#endif
88328830
}
88338831

88348832
regNumber tempReg = genRegNumFromMask(genFindLowestBit(freeRegs), type);
@@ -13595,7 +13593,7 @@ SingleTypeRegSet LinearScan::RegisterSelection::select(Interval*
1359513593
// clause below creates a mask to do this.
1359613594
if (currentInterval->registerType == TYP_DOUBLE)
1359713595
{
13598-
candidates &= ~((busyRegs & RBM_ALLDOUBLE_HIGH) >> 1);
13596+
candidates &= ~((busyRegs & RBM_ALLDOUBLE_HIGH.GetFloatRegSet()) >> 1);
1359913597
}
1360013598
#endif // TARGET_ARM
1360113599

@@ -13918,7 +13916,7 @@ SingleTypeRegSet LinearScan::RegisterSelection::selectMinimal(
1391813916
// clause below creates a mask to do this.
1391913917
if (currentInterval->registerType == TYP_DOUBLE)
1392013918
{
13921-
candidates &= ~((busyRegs & RBM_ALLDOUBLE_HIGH) >> 1);
13919+
candidates &= ~((busyRegs & RBM_ALLDOUBLE_HIGH.GetFloatRegSet()) >> 1);
1392213920
}
1392313921
#endif // TARGET_ARM
1392413922

0 commit comments

Comments
 (0)