]> git.ipfire.org Git - thirdparty/qemu.git/commit - tcg/mips/tcg-target.c
tcg/mips: fix add2
authorAurelien Jarno <aurelien@aurel32.net>
Fri, 31 Jul 2015 14:38:25 +0000 (16:38 +0200)
committerAurelien Jarno <aurelien@aurel32.net>
Sat, 1 Aug 2015 07:39:50 +0000 (09:39 +0200)
commitc99d69694af4ed15b33e3f7c2e3ef6972c14358d
tree085e49e9c5c949390e61753fdf7597fc5788e6bd
parent3c8691f568f49bf623dcb2850464d4156d95e61b
tcg/mips: fix add2

The add2 code in the tcg_out_addsub2 function doesn't take into account
the case where rl == al == bl. In that case we can't compute the carry
after the addition. As it corresponds to a multiplication by 2, the
carry bit is the bit 31.

While this is a corner case, this prevents x86-64 guests to boot on a
MIPS host.

Cc: qemu-stable@nongnu.org
Reviewed-by: Richard Henderson <rth@twiddle.net>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
tcg/mips/tcg-target.c