From: Ivo Raisr Date: Thu, 12 Oct 2017 23:08:57 +0000 (+0200) Subject: Follow up to 90e405b81b8f49121240db713620a173b988abfb (MOV coalescing). X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=966b228b274207865fe785c4da2638e3b76c8096;p=thirdparty%2Fvalgrind.git Follow up to 90e405b81b8f49121240db713620a173b988abfb (MOV coalescing). Clone the register allocator state properly. --- diff --git a/VEX/priv/host_generic_reg_alloc3.c b/VEX/priv/host_generic_reg_alloc3.c index 5a604a63e5..d8e5302df6 100644 --- a/VEX/priv/host_generic_reg_alloc3.c +++ b/VEX/priv/host_generic_reg_alloc3.c @@ -484,12 +484,18 @@ static RegAllocState* clone_state(const RegAllocState* orig) } for (UInt v_idx = 0; v_idx < orig->n_vregs; v_idx++) { - st2->vregs[v_idx].live_after = orig->vregs[v_idx].live_after; - st2->vregs[v_idx].dead_before = orig->vregs[v_idx].dead_before; - st2->vregs[v_idx].reg_class = orig->vregs[v_idx].reg_class; - st2->vregs[v_idx].disp = orig->vregs[v_idx].disp; - st2->vregs[v_idx].rreg = orig->vregs[v_idx].rreg; - st2->vregs[v_idx].spill_offset = orig->vregs[v_idx].spill_offset; + const VRegState* v1_st = &orig->vregs[v_idx]; + VRegState* v2_st = &st2->vregs[v_idx]; + v2_st->live_after = v1_st->live_after; + v2_st->dead_before = v1_st->dead_before; + v2_st->reg_class = v1_st->reg_class; + v2_st->disp = v1_st->disp; + v2_st->rreg = v1_st->rreg; + v2_st->spill_offset = v1_st->spill_offset; + v2_st->coalescedTo = v1_st->coalescedTo; + v2_st->coalescedFirst = v1_st->coalescedFirst; + v2_st->effective_dead_before = v1_st->effective_dead_before; + } st2->n_rregs = orig->n_rregs;