about summary refs log tree commit diff homepage
path: root/lib
diff options
context:
space:
mode:
authorLukas Zaoral <lzaoral@redhat.com>2021-04-20 23:35:02 +0200
committerMartinNowack <2443641+MartinNowack@users.noreply.github.com>2021-10-27 12:06:36 +0100
commit46dc29aa60e4a662c18ea7b2bac1c570ea7a728f (patch)
tree889db44113bb9eeea74f63f0989394dc87941892 /lib
parentf64ac45c41042e6d33024958dc82b6849844cdac (diff)
downloadklee-46dc29aa60e4a662c18ea7b2bac1c570ea7a728f.tar.gz
Module/RaiseAsm: Support i686 target as well
Add i686 to the list of supporterd targets by this transformation pass.
Diffstat (limited to 'lib')
-rw-r--r--lib/Module/RaiseAsm.cpp7
1 files changed, 3 insertions, 4 deletions
diff --git a/lib/Module/RaiseAsm.cpp b/lib/Module/RaiseAsm.cpp
index cd8f7934..55550864 100644
--- a/lib/Module/RaiseAsm.cpp
+++ b/lib/Module/RaiseAsm.cpp
@@ -63,10 +63,9 @@ bool RaiseAsmPass::runOnInstruction(Module &M, Instruction *I) {
   if (TLI->ExpandInlineAsm(ci))
     return true;
 
-  if (triple.getArch() == llvm::Triple::x86_64 &&
-      (triple.getOS() == llvm::Triple::Linux ||
-       triple.getOS() == llvm::Triple::Darwin ||
-       triple.getOS() == llvm::Triple::FreeBSD)) {
+  if ((triple.getArch() == llvm::Triple::x86 ||
+       triple.getArch() == llvm::Triple::x86_64) &&
+      (triple.isOSLinux() || triple.isMacOSX() || triple.isOSFreeBSD())) {
 
     if (ia->getAsmString() == "" && ia->hasSideEffects() &&
         ia->getFunctionType()->getReturnType()->isVoidTy()) {