MIPS: Fix register allocation in assembly of HREF.

Reported by Jakub Piotr Cłapa.
master
Mike Pall 2021-10-02 16:52:57 +02:00
parent 1811c4b0f1
commit d3294fa63b
1 changed files with 5 additions and 3 deletions

View File

@ -643,9 +643,11 @@ static void asm_href(ASMState *as, IRIns *ir)
if (irt_isnum(kt)) {
key = ra_alloc1(as, refkey, RSET_FPR);
tmpnum = ra_scratch(as, rset_exclude(RSET_FPR, key));
} else if (!irt_ispri(kt)) {
key = ra_alloc1(as, refkey, allow);
rset_clear(allow, key);
} else {
if (!irt_ispri(kt)) {
key = ra_alloc1(as, refkey, allow);
rset_clear(allow, key);
}
type = ra_allock(as, irt_toitype(irkey->t), allow);
rset_clear(allow, type);
}