mirror of
git://c9x.me/qbe.git
synced 2026-04-05 18:09:47 +00:00
rv64: handle slots in jnz
This commit is contained in:
parent
6a2dca8b99
commit
112cc1b824
@ -444,7 +444,7 @@ rv64_emitfn(Fn *fn, FILE *f)
|
|||||||
static int id0;
|
static int id0;
|
||||||
int lbl, neg, off, frame, *pr, r;
|
int lbl, neg, off, frame, *pr, r;
|
||||||
Blk *b, *s;
|
Blk *b, *s;
|
||||||
Ins *i;
|
Ins *i, ii;
|
||||||
|
|
||||||
emitfnlnk(fn->name, &fn->lnk, f);
|
emitfnlnk(fn->name, &fn->lnk, f);
|
||||||
|
|
||||||
@ -549,6 +549,11 @@ rv64_emitfn(Fn *fn, FILE *f)
|
|||||||
b->s2 = s;
|
b->s2 = s;
|
||||||
neg = 1;
|
neg = 1;
|
||||||
}
|
}
|
||||||
|
if (rtype(b->jmp.arg) == RSlot) {
|
||||||
|
ii.arg[0] = b->jmp.arg;
|
||||||
|
emitf("lw t6, %M0", &ii, fn, f);
|
||||||
|
b->jmp.arg = TMP(T6);
|
||||||
|
}
|
||||||
assert(isreg(b->jmp.arg));
|
assert(isreg(b->jmp.arg));
|
||||||
fprintf(f,
|
fprintf(f,
|
||||||
"\tb%sz %s, .L%d\n",
|
"\tb%sz %s, .L%d\n",
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user