From 112a674798c58052ddce94418e34f3e5a084ed1a Mon Sep 17 00:00:00 2001 From: Andrew Hsieh Date: Fri, 18 May 2012 15:53:35 +0800 Subject: [PATCH] Add -mno-movbe to disable "movbe" instruction from code-gen Intruction "movbe" (move data after swapping bytes) is only available in Intel atom. Disable it for more general x86 devices and x86 hosts which run emulator-x86. Although emulator-x86 can support "movbe", most of the time we want to run emulator-x86 with VT support for speed (with KVM in Linux, or HAXM in Windows/MacOSX). The presence of "movbe" can crash emulator-x86 in VT because non-atom host doesn't have it natively. Change-Id: I86e037900ddcb8d544f92b8d8464c8627347e560 --- core/combo/TARGET_linux-x86.mk | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/core/combo/TARGET_linux-x86.mk b/core/combo/TARGET_linux-x86.mk index a4d07b51d..cb251d388 100644 --- a/core/combo/TARGET_linux-x86.mk +++ b/core/combo/TARGET_linux-x86.mk @@ -132,6 +132,11 @@ TARGET_GLOBAL_CFLAGS += -mbionic # TARGET_GLOBAL_CFLAGS += -D__ANDROID__ +# instructions "movbe" is only available in Intel atom. Disable it +# for general x86 device and x86 host which runs emulator-x86 +# +TARGET_GLOBAL_CFLAGS += -mno-movbe + # XXX: This flag is probably redundant since our toolchain binaries already # generate 32-bit machine code. It probably dates back to the old days # where we were using the host toolchain on Linux to build the platform -- 2.11.0