diff options
author | Anton Korobeynikov <asl@math.spbu.ru> | 2008-08-21 17:33:01 +0000 |
---|---|---|
committer | Anton Korobeynikov <asl@math.spbu.ru> | 2008-08-21 17:33:01 +0000 |
commit | 62990bafa327cf8d95be19363f636ca60b505a91 (patch) | |
tree | 47cac0cccf706559d89294101dafa8f56fc04f71 /lib/Target/X86/X86CodeEmitter.cpp | |
parent | b6135a054d46c00e2ba604e8f509de48e6dcfde6 (diff) | |
download | llvm-62990bafa327cf8d95be19363f636ca60b505a91.tar.gz llvm-62990bafa327cf8d95be19363f636ca60b505a91.tar.bz2 llvm-62990bafa327cf8d95be19363f636ca60b505a91.tar.xz |
Allow inline asm nodes with empty bodies inside JIT.
This unbreaks explicit reg vars inside JIT, which are
implemented in such hacky way :)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55128 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/X86/X86CodeEmitter.cpp')
-rw-r--r-- | lib/Target/X86/X86CodeEmitter.cpp | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/lib/Target/X86/X86CodeEmitter.cpp b/lib/Target/X86/X86CodeEmitter.cpp index ec93eb413d..c3a1ed921a 100644 --- a/lib/Target/X86/X86CodeEmitter.cpp +++ b/lib/Target/X86/X86CodeEmitter.cpp @@ -486,9 +486,13 @@ void Emitter::emitInstruction(const MachineInstr &MI, default: assert(0 && "psuedo instructions should be removed before code emission"); break; - case TargetInstrInfo::INLINEASM: - assert(0 && "JIT does not support inline asm!\n"); + case TargetInstrInfo::INLINEASM: { + const char* Value = MI.getOperand(0).getSymbolName(); + /* We allow inline assembler nodes with empty bodies - they can + implicitly define registers, which is ok for JIT. */ + assert((Value[0] == 0) && "JIT does not support inline asm!\n"); break; + } case TargetInstrInfo::DBG_LABEL: case TargetInstrInfo::EH_LABEL: MCE.emitLabel(MI.getOperand(0).getImm()); |