|
From: Ivo R. <ir...@so...> - 2017-10-12 23:09:57
|
https://sourceware.org/git/gitweb.cgi?p=valgrind.git;h=966b228b274207865fe785c4da2638e3b76c8096 commit 966b228b274207865fe785c4da2638e3b76c8096 Author: Ivo Raisr <iv...@iv...> Date: Fri Oct 13 01:08:57 2017 +0200 Follow up to 90e405b81b8f49121240db713620a173b988abfb (MOV coalescing). Clone the register allocator state properly. Diff: --- VEX/priv/host_generic_reg_alloc3.c | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/VEX/priv/host_generic_reg_alloc3.c b/VEX/priv/host_generic_reg_alloc3.c index 5a604a6..d8e5302 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; |