aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNate Begeman <natebegeman@mac.com>2006-05-03 04:52:47 +0000
committerNate Begeman <natebegeman@mac.com>2006-05-03 04:52:47 +0000
commit67977ad19cf961f61c35006d9cc5695c4dde6655 (patch)
tree1b1ec36ee0924487db6e49cf09ccf485666a4ca5
parentf4360a478944af45d5f851a0903fbbfa44f520dc (diff)
downloadexternal_llvm-67977ad19cf961f61c35006d9cc5695c4dde6655.zip
external_llvm-67977ad19cf961f61c35006d9cc5695c4dde6655.tar.gz
external_llvm-67977ad19cf961f61c35006d9cc5695c4dde6655.tar.bz2
Teach the x86 jit how to handle jump tables not directly used by a jump
instruction. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28080 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--lib/Target/X86/X86CodeEmitter.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/Target/X86/X86CodeEmitter.cpp b/lib/Target/X86/X86CodeEmitter.cpp
index ca6c78d..9e2c998 100644
--- a/lib/Target/X86/X86CodeEmitter.cpp
+++ b/lib/Target/X86/X86CodeEmitter.cpp
@@ -517,6 +517,9 @@ void Emitter::emitInstruction(const MachineInstr &MI) {
else if (MI.getOperand(4).isGlobalAddress())
emitGlobalAddressForPtr(MI.getOperand(4).getGlobal(),
MI.getOperand(4).getOffset());
+ else if (MI.getOperand(4).isJumpTableIndex())
+ emitConstant(MCE.getJumpTableEntryAddress(MI.getOperand(4)
+ .getJumpTableIndex()), 4);
else
assert(0 && "Unknown operand!");
}