aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorQuentin Carbonneaux <[email protected]>2019-02-05 14:53:58 +0100
committerQuentin Carbonneaux <[email protected]>2019-02-05 14:53:58 +0100
commit834b5cb08bbf0f4fbc1992a72327dfc2c0a31796 (patch)
tree7371cf743137debb27ae60308b8ee717ab152004
parent316b57e37eb10cc127526886f58f6cad24916bf1 (diff)
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.
-rw-r--r--rega.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/rega.c b/rega.c
index 619b0e2..f087f3c 100644
--- 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