commit 834b5cb08bbf0f4fbc1992a72327dfc2c0a31796
parent 316b57e37eb10cc127526886f58f6cad24916bf1
Author: Quentin Carbonneaux <quentin@c9x.me>
Date: Tue, 5 Feb 2019 14:53:58 +0100
fix a bad bug in regalloc boilerplate
That was silly... I believe qbe still
managed to work because bitsets are only
used inside a basic block where rcopy()
is not used.
Diffstat:
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/rega.c b/rega.c
@@ -50,8 +50,11 @@ sethint(int t, int r)
static void
rcopy(RMap *ma, RMap *mb)
{
- memcpy(ma, mb, sizeof *ma);
+ memcpy(ma->t, mb->t, sizeof ma->t);
+ memcpy(ma->r, mb->r, sizeof ma->r);
+ memcpy(ma->w, mb->w, sizeof ma->w);
bscopy(ma->b, mb->b);
+ ma->n = mb->n;
}
static int