aboutsummaryrefslogtreecommitdiff
path: root/rega.c
diff options
context:
space:
mode:
authorMichael Forney <[email protected]>2022-02-12 02:27:47 -0800
committerQuentin Carbonneaux <[email protected]>2022-02-17 22:35:22 +0100
commit3b75357e2bd14d6222bd9e3fb8b6894239ff2ae3 (patch)
treecf3dd51530481041ae16621d0668b5684bd61ee3 /rega.c
parent630127c68b872dcb7ddb22079f91f001b73945fc (diff)
Revert "skip jump arguments in rega"
This reverts commit 028534d9897079bf64559dca0402bc59a956ce46. riscv64 will have jump arguments with type RTmp.
Diffstat (limited to 'rega.c')
-rw-r--r--rega.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/rega.c b/rega.c
index 0359d2b..dd77a75 100644
--- a/rega.c
+++ b/rega.c
@@ -359,9 +359,10 @@ doblk(Blk *b, RMap *cur)
Mem *m;
Ref *ra[4];
- assert(rtype(b->jmp.arg) != RTmp);
for (r=0; bsiter(b->out, &r) && r<Tmp0; r++)
radd(cur, r, r);
+ if (rtype(b->jmp.arg) == RTmp)
+ b->jmp.arg = ralloc(cur, b->jmp.arg.val);
curi = &insb[NIns];
for (i1=&b->ins[b->nins]; i1!=b->ins;) {
emiti(*--i1);