The guest code might then select functions calling invalid
instructions.
E.G. giving:
vex x86->IR: unhandled instruction bytes: 0x66 0xF 0x3A 0xF
==13094== valgrind: Unrecognised instruction at address 0x496d4d3.
==13094== at 0x496D4D3: __mempcpy_ssse3 (memcpy-ssse3.S:771)
==13094== by 0x125E0B: ??? (in /bin/dash)
as the host hw cap is not SSE3 enabled, while the guest believes
SSE3 can be used.
So, change CPUID so as to report an SSE3 if the hw is SSE3,
and otherwise SSE1 or lower.
(an SSE2 cpu might be added later on)
git-svn-id: svn://svn.valgrind.org/vex/trunk@3153
extern void x86g_dirtyhelper_CPUID_sse0 ( VexGuestX86State* );
extern void x86g_dirtyhelper_CPUID_mmxext ( VexGuestX86State* );
extern void x86g_dirtyhelper_CPUID_sse1 ( VexGuestX86State* );
-extern void x86g_dirtyhelper_CPUID_sse2 ( VexGuestX86State* );
+extern void x86g_dirtyhelper_CPUID_sse3 ( VexGuestX86State* );
extern void x86g_dirtyhelper_FINIT ( VexGuestX86State* );
address sizes : 36 bits physical, 48 bits virtual
power management:
*/
-void x86g_dirtyhelper_CPUID_sse2 ( VexGuestX86State* st )
+void x86g_dirtyhelper_CPUID_sse3 ( VexGuestX86State* st )
{
# define SET_ABCD(_a,_b,_c,_d) \
do { st->guest_EAX = (UInt)(_a); \
IRDirty* d = NULL;
void* fAddr = NULL;
const HChar* fName = NULL;
- if (archinfo->hwcaps & VEX_HWCAPS_X86_SSE2) {
- fName = "x86g_dirtyhelper_CPUID_sse2";
- fAddr = &x86g_dirtyhelper_CPUID_sse2;
+ if (archinfo->hwcaps & VEX_HWCAPS_X86_SSE3) {
+ fName = "x86g_dirtyhelper_CPUID_sse3";
+ fAddr = &x86g_dirtyhelper_CPUID_sse3;
}
else
if (archinfo->hwcaps & VEX_HWCAPS_X86_SSE1) {