]> git.ipfire.org Git - thirdparty/qemu.git/commit
tcg-i386: Remove "cb" output restriction from qemu_st8 for i386
authorRichard Henderson <rth@twiddle.net>
Wed, 4 Sep 2013 15:51:07 +0000 (08:51 -0700)
committerRichard Henderson <rth@twiddle.net>
Sat, 12 Oct 2013 23:19:19 +0000 (16:19 -0700)
commitb3e2bc500f5fe09763a107e2e28cb0e2d39ffb7c
tree46a6479cee93ddd3a821cb52af3f15420dac00bb
parent7352ee546ce0aba261d0e64595eae6e74e75e49d
tcg-i386: Remove "cb" output restriction from qemu_st8 for i386

Once we form a combined qemu_st_i32 opcode, we won't be able to
have separate constraints based on size.  This one is fairly easy
to work around, since eax is available as a scratch register.

When storing variable data, this tends to merely exchange one mov
for another.  E.g.

-:  mov    %esi,%ecx
...
-:  mov    %cl,(%edx)
+:  mov    %esi,%eax
+:  mov    %al,(%edx)

Where we do have a regression is when storing constant data, in which
we may load the constant into edi, when only ecx/ebx ought to be used.

The proper way to recover this regression is to allow constants as
arguments to qemu_st_i32, so that we never load the constant data into
a register at all, must less the wrong register.  TBD.

Signed-off-by: Richard Henderson <rth@twiddle.net>
tcg/i386/tcg-target.c