diff options
| -rw-r--r-- | src/lj_asm_arm.h | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/lj_asm_arm.h b/src/lj_asm_arm.h index 618bc5b7..e865850d 100644 --- a/src/lj_asm_arm.h +++ b/src/lj_asm_arm.h | |||
| @@ -358,8 +358,6 @@ static void asm_gencall(ASMState *as, const CCallInfo *ci, IRRef *args) | |||
| 358 | if (irt_isfp(ir->t)) { | 358 | if (irt_isfp(ir->t)) { |
| 359 | RegSet of = as->freeset; | 359 | RegSet of = as->freeset; |
| 360 | Reg src; | 360 | Reg src; |
| 361 | /* Workaround to protect argument GPRs from being used for remat. */ | ||
| 362 | as->freeset &= ~RSET_RANGE(REGARG_FIRSTGPR, REGARG_LASTGPR+1); | ||
| 363 | if (!LJ_ABI_SOFTFP && !(ci->flags & CCI_VARARG)) { | 361 | if (!LJ_ABI_SOFTFP && !(ci->flags & CCI_VARARG)) { |
| 364 | if (irt_isnum(ir->t)) { | 362 | if (irt_isnum(ir->t)) { |
| 365 | if (fpr <= REGARG_LASTFPR) { | 363 | if (fpr <= REGARG_LASTFPR) { |
| @@ -377,10 +375,15 @@ static void asm_gencall(ASMState *as, const CCallInfo *ci, IRRef *args) | |||
| 377 | fprodd = fpr++; | 375 | fprodd = fpr++; |
| 378 | continue; | 376 | continue; |
| 379 | } | 377 | } |
| 378 | /* Workaround to protect argument GPRs from being used for remat. */ | ||
| 379 | as->freeset &= ~RSET_RANGE(REGARG_FIRSTGPR, REGARG_LASTGPR+1); | ||
| 380 | src = ra_alloc1(as, ref, RSET_FPR); /* May alloc GPR to remat FPR. */ | 380 | src = ra_alloc1(as, ref, RSET_FPR); /* May alloc GPR to remat FPR. */ |
| 381 | as->freeset |= (of & RSET_RANGE(REGARG_FIRSTGPR, REGARG_LASTGPR+1)); | ||
| 381 | fprodd = 0; | 382 | fprodd = 0; |
| 382 | goto stackfp; | 383 | goto stackfp; |
| 383 | } | 384 | } |
| 385 | /* Workaround to protect argument GPRs from being used for remat. */ | ||
| 386 | as->freeset &= ~RSET_RANGE(REGARG_FIRSTGPR, REGARG_LASTGPR+1); | ||
| 384 | src = ra_alloc1(as, ref, RSET_FPR); /* May alloc GPR to remat FPR. */ | 387 | src = ra_alloc1(as, ref, RSET_FPR); /* May alloc GPR to remat FPR. */ |
| 385 | as->freeset |= (of & RSET_RANGE(REGARG_FIRSTGPR, REGARG_LASTGPR+1)); | 388 | as->freeset |= (of & RSET_RANGE(REGARG_FIRSTGPR, REGARG_LASTGPR+1)); |
| 386 | if (irt_isnum(ir->t)) gpr = (gpr+1) & ~1u; | 389 | if (irt_isnum(ir->t)) gpr = (gpr+1) & ~1u; |
