Statistics
| Branch: | Revision:

root / tcg / i386 @ feature-archipelago

Name Size
tcg-target.c 76.3 kB
tcg-target.h 4.8 kB

Latest revisions

# Date Author Comment
774d566c 02/21/2014 12:39 pm Peter Maydell

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 without
the __cpuid() function we use, which means that commit 9d2eec20
broke the build for those platforms. Fix this by tightening up...

a1b29c9a 02/17/2014 06:12 pm Richard Henderson

tcg/i386: Move TCG_CT_CONST_* to tcg-target.c

These are not needed by users of tcg-target.h. No need to recompile
when we adjust them.

Reviewed-by: Paolo Bonzini <>
Reviewed-by: Aurelien Jarno <>
Signed-off-by: Richard Henderson <>

ecc7e843 02/17/2014 06:12 pm Richard Henderson

tcg/i386: Add tcg_out_vex_modrm

Prepare for emitting BMI insns which require VEX encoding.

Reviewed-by: Paolo Bonzini <>
Reviewed-by: Aurelien Jarno <>
Signed-off-by: Richard Henderson <>

9d2eec20 02/17/2014 06:12 pm Richard Henderson

tcg/i386: Use ANDN instruction

Note that the optimizer cannot simplify ANDC X,Y,C to AND X,Y,~C
so we must handle constants in the implementation of andc.

Reviewed-by: Paolo Bonzini <>
Signed-off-by: Richard Henderson <>

6399ab33 02/17/2014 06:12 pm Richard Henderson

tcg/i386: Use SHLX/SHRX/SARX instructions

These three-operand shift instructions do not require the shift count
to 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...

2d23d5ed 01/26/2014 01:21 am Aurelien Jarno

tcg/i386: cleanup useless #ifdef

TCG_TARGET_HAS_movcond_i32 is always defined to 1 in tcg-target.h, so
remove the corresponding #ifdef #endif sequence, left from a previous
refactoring.

Signed-off-by: Aurelien Jarno <>
Signed-off-by: Richard Henderson <>

085bb5bb 01/26/2014 01:19 am Aurelien Jarno

tcg/i386: use movbe instruction in qemu_ldst routines

The movbe instruction has been added on some Intel Atom CPUs and on
recent Intel Haswell CPUs. It allows to load/store a value and at the
same time bswap it.

This patch detects the avaibility of this instruction and when available...

2a113775 01/26/2014 12:12 am Aurelien Jarno

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 that
P_EXT and P_EXT38 have neighbouring values.

Signed-off-by: Aurelien Jarno <>...

c9d78213 01/26/2014 12:12 am Aurelien Jarno

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 defeat
the purpose of a constant.

Fix that by using a conditional expression operator instead of a shift....

8589467f 12/21/2013 05:41 pm Aurelien Jarno

tcg/i386: fix a comment

The comments apply to 8-bit stores, not 8-byte stores.

Reviewed-by: Richard Henderson <>
Signed-off-by: Aurelien Jarno <>

View revisions

Also available in: Atom