TCG x86/x86-64: use move with zero-extend for loads/stores
authoraurel32 <aurel32@c046a42c-6fe2-441c-8c8c-71466251a162>
Sat, 13 Dec 2008 18:57:21 +0000 (18:57 +0000)
committeraurel32 <aurel32@c046a42c-6fe2-441c-8c8c-71466251a162>
Sat, 13 Dec 2008 18:57:21 +0000 (18:57 +0000)
commit9db3ba4db28bae33d053752819c004ad28680bcc
tree2d599da19ddd30ee474988d2f380ff07e980f5bb
parent13412c9d2fce7c402e93a08177abdbc593208140
TCG x86/x86-64: use move with zero-extend for loads/stores

Starting with version 4.3, gcc returns the result of a function in
rax/eax/ax/al instead of rax/eax, depending of the return type. As
a consequence we should use a zero extend moe in TCG loads/stores.

See http://gcc.gnu.org/ml/gcc/2008-01/msg00052.html for more details.

A big thanks to malc who founds the problem and wrote the x86 patch.

Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6011 c046a42c-6fe2-441c-8c8c-71466251a162
tcg/i386/tcg-target.c
tcg/x86_64/tcg-target.c