]> git.proxmox.com Git - qemu.git/commit - tcg/optimize.c
tcg/optimize: fix end of basic block detection
authorAurelien Jarno <aurelien@aurel32.net>
Wed, 19 Sep 2012 19:40:30 +0000 (21:40 +0200)
committerAurelien Jarno <aurelien@aurel32.net>
Wed, 19 Sep 2012 19:53:46 +0000 (21:53 +0200)
commita25506603914d706f4ac4c63d3b93b4f1227b9b4
treea71aac264d835124e662d94c8ef51d4040098f4f
parentbd277fa1966bc400f1b411f868f39125cda0c403
tcg/optimize: fix end of basic block detection

Commit e31b0a7c050711884ad570fe73df806520953618 fixed copy propagation on
32-bit host by restricting the copy between different types. This was the
wrong fix.

The real problem is that the all temps states should be reset at the end
of a basic block. This was done by adding such operations in the switch,
but brcond2 was forgotten (that's why the crash was only observed on 32-bit
hosts).

Fix that by looking at the TCG_OPF_BB_END instead. We need to keep the case
for op_set_label as temps might be modified through another path.

Cc: Blue Swirl <blauwirbel@gmail.com>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
tcg/optimize.c