aboutsummaryrefslogtreecommitdiff
path: root/rega.c
diff options
context:
space:
mode:
authorRoland Paterson-Jones <[email protected]>2024-10-22 16:07:43 +0200
committerQuentin Carbonneaux <[email protected]>2025-03-14 09:47:05 +0100
commit434cf5fdc4ba027f0ac04cd198658860b6fc034a (patch)
tree0f2dff83f9295fa4836c79e316d1d168e8a94762 /rega.c
parentca928f6f8d18b4cf3acd1dd4b7443a5631c06af2 (diff)
idup(Ins **, Ins *, ulong) -> idup(Blk *, Ins *, ulong)
Always used this way and factors setting b->nins. Makes b->ins vector contract more obvious.
Diffstat (limited to 'rega.c')
-rw-r--r--rega.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/rega.c b/rega.c
index 8e601c9..ab98cd6 100644
--- a/rega.c
+++ b/rega.c
@@ -439,8 +439,7 @@ doblk(Blk *b, RMap *cur)
* the above loop must be changed */
}
}
- b->nins = &insb[NIns] - curi;
- idup(&b->ins, curi, b->nins);
+ idup(b, curi, &insb[NIns]-curi);
}
/* qsort() comparison function to peel
@@ -671,10 +670,9 @@ rega(Fn *fn)
blist = b1;
fn->nblk++;
strf(b1->name, "%s_%s", b->name, s->name);
- b1->nins = &insb[NIns] - curi;
- stmov += b1->nins;
+ stmov += &insb[NIns]-curi;
stblk += 1;
- idup(&b1->ins, curi, b1->nins);
+ idup(b1, curi, &insb[NIns]-curi);
b1->jmp.type = Jjmp;
b1->s1 = s;
**ps = b1;