diff options
-rw-r--r-- | device/include/llvm/Config/AsmParsers.def | 8 | ||||
-rw-r--r-- | device/include/llvm/Config/AsmPrinters.def | 8 | ||||
-rw-r--r-- | device/include/llvm/Config/Disassemblers.def | 8 | ||||
-rw-r--r-- | device/include/llvm/Config/Targets.def | 8 | ||||
-rw-r--r-- | device/include/llvm/Config/config.h | 16 | ||||
-rw-r--r-- | lib/Target/X86/AsmPrinter/X86IntelInstPrinter.cpp | 2 | ||||
-rw-r--r-- | lib/Target/X86/TargetInfo/Android.mk | 2 |
7 files changed, 45 insertions, 7 deletions
diff --git a/device/include/llvm/Config/AsmParsers.def b/device/include/llvm/Config/AsmParsers.def index d009351..45903a4 100644 --- a/device/include/llvm/Config/AsmParsers.def +++ b/device/include/llvm/Config/AsmParsers.def @@ -24,6 +24,12 @@ # error Please define the macro LLVM_ASM_PARSER(TargetName) #endif -LLVM_ASM_PARSER(ARM) +#if defined(__arm__) + LLVM_ASM_PARSER(ARM) +#elif defined(__i386__) + LLVM_ASM_PARSER(X86) +#else +# error Unsupported TARGET_ARCH for LLVM_ASM_PARSER +#endif #undef LLVM_ASM_PARSER diff --git a/device/include/llvm/Config/AsmPrinters.def b/device/include/llvm/Config/AsmPrinters.def index 6706bd3..b7311ba 100644 --- a/device/include/llvm/Config/AsmPrinters.def +++ b/device/include/llvm/Config/AsmPrinters.def @@ -24,6 +24,12 @@ # error Please define the macro LLVM_ASM_PRINTER(TargetName) #endif -LLVM_ASM_PRINTER(ARM) +#if defined(__arm__) + LLVM_ASM_PRINTER(ARM) +#elif defined(__i386__) + LLVM_ASM_PRINTER(X86) +#else +# error Unsupported TARGET_ARCH for LLVM_ASM_PRINTER +#endif #undef LLVM_ASM_PRINTER diff --git a/device/include/llvm/Config/Disassemblers.def b/device/include/llvm/Config/Disassemblers.def index d663c61..39df62e 100644 --- a/device/include/llvm/Config/Disassemblers.def +++ b/device/include/llvm/Config/Disassemblers.def @@ -24,6 +24,12 @@ # error Please define the macro LLVM_DISASSEMBLER(TargetName) #endif -LLVM_DISASSEMBLER(ARM) +#if defined(__arm__) + LLVM_DISASSEMBLER(ARM) +#elif defined(__i386__) + LLVM_DISASSEMBLER(X86) +#else +# error Unsupported TARGET_ARCH for LLVM_DISASSEMBLER +#endif #undef LLVM_DISASSEMBLER diff --git a/device/include/llvm/Config/Targets.def b/device/include/llvm/Config/Targets.def index c50df96..4094606 100644 --- a/device/include/llvm/Config/Targets.def +++ b/device/include/llvm/Config/Targets.def @@ -23,6 +23,12 @@ # error Please define the macro LLVM_TARGET(TargetName) #endif -LLVM_TARGET(ARM) +#if defined(__arm__) + LLVM_TARGET(ARM) +#elif defined(__i386__) + LLVM_TARGET(X86) +#else +# error Unsupported TARGET_ARCH for LLVM_ASM_PRINTER +#endif #undef LLVM_TARGET diff --git a/device/include/llvm/Config/config.h b/device/include/llvm/Config/config.h index d5cdab5..06f29f4 100644 --- a/device/include/llvm/Config/config.h +++ b/device/include/llvm/Config/config.h @@ -496,10 +496,22 @@ /* #undef LLVM_MULTITHREADED */ /* LLVM architecture name for the native architecture, if available */ -#define LLVM_NATIVE_ARCH ARMTarget +#if defined(__arm__) +# define LLVM_NATIVE_ARCH ARMTarget +#elif defined(__i386__) +# define LLVM_NATIVE_ARCH X86Target +#else +# error Unsupported target architecture for LLVM_NATIVE_ARCH +#endif /* Short LLVM architecture name for the native architecture, if available */ -#define LLVM_NATIVE_ARCHNAME ARM +#if defined(__arm__) +# define LLVM_NATIVE_ARCHNAME ARM +#elif defined(__i386__) +# define LLVM_NATIVE_ARCHNAME X86 +#else +# error Unsupported target architecture for LLVM_NATIVE_ARCHNAME +#endif /* Define if this is Unixish platform */ #define LLVM_ON_UNIX 1 diff --git a/lib/Target/X86/AsmPrinter/X86IntelInstPrinter.cpp b/lib/Target/X86/AsmPrinter/X86IntelInstPrinter.cpp index a632047..9d1940c 100644 --- a/lib/Target/X86/AsmPrinter/X86IntelInstPrinter.cpp +++ b/lib/Target/X86/AsmPrinter/X86IntelInstPrinter.cpp @@ -20,6 +20,8 @@ #include "llvm/Support/ErrorHandling.h" #include "llvm/Support/FormattedStream.h" #include "X86GenInstrNames.inc" +#include <ctype.h> + using namespace llvm; // Include the auto-generated portion of the assembly writer. diff --git a/lib/Target/X86/TargetInfo/Android.mk b/lib/Target/X86/TargetInfo/Android.mk index fcbb4e7..4c99807 100644 --- a/lib/Target/X86/TargetInfo/Android.mk +++ b/lib/Target/X86/TargetInfo/Android.mk @@ -44,7 +44,7 @@ LOCAL_SRC_FILES := $(x86_target_info_SRC_FILES) LOCAL_C_INCLUDES += \ $(LOCAL_PATH)/.. -LOCAL_MODULE:= libLLVMARMInfo +LOCAL_MODULE:= libLLVMX86Info LOCAL_MODULE_TAGS := optional |