From f4ea7084c5d31f02d55dad7013f5b46fd65b580a Mon Sep 17 00:00:00 2001 From: Jim Grosbach Date: Wed, 27 Oct 2010 20:39:40 +0000 Subject: [PATCH] JIT imm12 encoding for constant pool entry references. llvm-svn: 117483 --- llvm/lib/Target/ARM/ARMCodeEmitter.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/llvm/lib/Target/ARM/ARMCodeEmitter.cpp b/llvm/lib/Target/ARM/ARMCodeEmitter.cpp index affec70d266f..c103fab9a733 100644 --- a/llvm/lib/Target/ARM/ARMCodeEmitter.cpp +++ b/llvm/lib/Target/ARM/ARMCodeEmitter.cpp @@ -181,6 +181,10 @@ namespace { // {11-0} = imm12 const MachineOperand &MO = MI.getOperand(Op); const MachineOperand &MO1 = MI.getOperand(Op + 1); + if (!MO.isReg()) { + emitConstPoolAddress(MO.getIndex(), ARM::reloc_arm_cp_entry); + return 0; + } unsigned Reg = getARMRegisterNumbering(MO.getReg()); int32_t Imm12 = MO1.getImm(); uint32_t Binary;