tcg/i386: Fix build for systems without working cpuid.h (MacOSX, Win32)
Win32 doesn't have a cpuid.h, and MacOSX may have one but withoutthe __cpuid() function we use, which means that commit 9d2eec20broke the build for those platforms. Fix this by tightening up...
tcg/i386: Move TCG_CT_CONST_* to tcg-target.c
These are not needed by users of tcg-target.h. No need to recompilewhen we adjust them.
Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>Reviewed-by: Aurelien Jarno <aurelien@aurel32.net>Signed-off-by: Richard Henderson <rth@twiddle.net>
tcg/i386: Add tcg_out_vex_modrm
Prepare for emitting BMI insns which require VEX encoding.
tcg/i386: Use ANDN instruction
Note that the optimizer cannot simplify ANDC X,Y,C to AND X,Y,~Cso we must handle constants in the implementation of andc.
Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>Signed-off-by: Richard Henderson <rth@twiddle.net>
tcg/i386: Use SHLX/SHRX/SARX instructions
These three-operand shift instructions do not require the shift countto be placed into ECX. This reduces the number of mov insns required,with the mere addition of a new register constraint.
Don't attempt to get rid of the matching constraint, as that's impossible...
tcg/i386: cleanup useless #ifdef
TCG_TARGET_HAS_movcond_i32 is always defined to 1 in tcg-target.h, soremove the corresponding #ifdef #endif sequence, left from a previousrefactoring.
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>Signed-off-by: Richard Henderson <rth@twiddle.net>
tcg/i386: use movbe instruction in qemu_ldst routines
The movbe instruction has been added on some Intel Atom CPUs and onrecent Intel Haswell CPUs. It allows to load/store a value and at thesame time bswap it.
This patch detects the avaibility of this instruction and when available...
tcg/i386: add support for three-byte opcodes
Add support for three-byte opcodes, starting with the 0x0f 0x38 prefix.Use P_EXT38 as the new constant, and shift all other constants so thatP_EXT and P_EXT38 have neighbouring values.
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>...
tcg/i386: remove hardcoded P_REXW value
P_REXW is defined has a constant at the beginning of i386/tcg-target.c,but the corresponding bit is later used in a harcoded way, which defeatthe purpose of a constant.
Fix that by using a conditional expression operator instead of a shift....
tcg/i386: fix a comment
The comments apply to 8-bit stores, not 8-byte stores.
Reviewed-by: Richard Henderson <rth@twiddle.net>Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
View revisions
Also available in: Atom