diff options
| author | Mike Pall <mike> | 2021-10-02 16:52:57 +0200 |
|---|---|---|
| committer | Mike Pall <mike> | 2021-10-02 16:52:57 +0200 |
| commit | d3294fa63b344173db68dd612c6d3801631e28d4 (patch) | |
| tree | 4f33b471bc1bba353d2a760c8b8f8547dfaddf51 | |
| parent | 1811c4b0f18d4a6e4ebc0a305a564e9339a36d05 (diff) | |
| download | luajit-d3294fa63b344173db68dd612c6d3801631e28d4.tar.gz luajit-d3294fa63b344173db68dd612c6d3801631e28d4.tar.bz2 luajit-d3294fa63b344173db68dd612c6d3801631e28d4.zip | |
MIPS: Fix register allocation in assembly of HREF.
Reported by Jakub Piotr Cłapa.
| -rw-r--r-- | src/lj_asm_mips.h | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/lj_asm_mips.h b/src/lj_asm_mips.h index b55596e6..ee81e5e0 100644 --- a/src/lj_asm_mips.h +++ b/src/lj_asm_mips.h | |||
| @@ -643,9 +643,11 @@ static void asm_href(ASMState *as, IRIns *ir) | |||
| 643 | if (irt_isnum(kt)) { | 643 | if (irt_isnum(kt)) { |
| 644 | key = ra_alloc1(as, refkey, RSET_FPR); | 644 | key = ra_alloc1(as, refkey, RSET_FPR); |
| 645 | tmpnum = ra_scratch(as, rset_exclude(RSET_FPR, key)); | 645 | tmpnum = ra_scratch(as, rset_exclude(RSET_FPR, key)); |
| 646 | } else if (!irt_ispri(kt)) { | 646 | } else { |
| 647 | key = ra_alloc1(as, refkey, allow); | 647 | if (!irt_ispri(kt)) { |
| 648 | rset_clear(allow, key); | 648 | key = ra_alloc1(as, refkey, allow); |
| 649 | rset_clear(allow, key); | ||
| 650 | } | ||
| 649 | type = ra_allock(as, irt_toitype(irkey->t), allow); | 651 | type = ra_allock(as, irt_toitype(irkey->t), allow); |
| 650 | rset_clear(allow, type); | 652 | rset_clear(allow, type); |
| 651 | } | 653 | } |
