ARM64: More improvements to the generation of immediates.

This commit is contained in:
Mike Pall
2021-06-03 03:21:56 +02:00
parent a119497bec
commit 69138082a3
3 changed files with 12 additions and 16 deletions

View File

@@ -163,7 +163,7 @@ nopair:
/* Try to find an N-step delta relative to other consts with N < lim. */
static int emit_kdelta(ASMState *as, Reg rd, uint64_t k, int lim)
{
RegSet work = ~as->freeset & RSET_GPR;
RegSet work = (~as->freeset & RSET_GPR) | RID2RSET(RID_GL);
if (lim <= 1) return 0; /* Can't beat that. */
while (work) {
Reg r = rset_picktop(work);