diff options
Diffstat (limited to 'llvm/lib/Target/ARM/ARMMCCodeEmitter.cpp')
-rw-r--r-- | llvm/lib/Target/ARM/ARMMCCodeEmitter.cpp | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/llvm/lib/Target/ARM/ARMMCCodeEmitter.cpp b/llvm/lib/Target/ARM/ARMMCCodeEmitter.cpp index 1f45eb94052..5ccc8f5f7d1 100644 --- a/llvm/lib/Target/ARM/ARMMCCodeEmitter.cpp +++ b/llvm/lib/Target/ARM/ARMMCCodeEmitter.cpp @@ -44,8 +44,8 @@ public: /// getMachineOpValue - Return binary encoding of operand. If the machine /// operand requires relocation, record the relocation and return zero. - unsigned getMachineOpValue(const MCInst &MI,const MCOperand &MO) const; - unsigned getMachineOpValue(const MCInst &MI, unsigned OpIdx) const { + unsigned getMachineOpValue(const MCInst &MI,const MCOperand &MO); + unsigned getMachineOpValue(const MCInst &MI, unsigned OpIdx) { return getMachineOpValue(MI, MI.getOperand(OpIdx)); } @@ -120,13 +120,17 @@ EncodeInstruction(const MCInst &MI, raw_ostream &OS, return; ++MCNumEmitted; // Keep track of the # of mi's emitted - switch (Opcode) { - //FIXME: Any non-pseudos that need special handling, if there are any... - default: { + switch (TSFlags & ARMII::FormMask) { + case ARMII::BrMiscFrm: + case ARMII::MiscFrm: { unsigned Value = getBinaryCodeForInstr(MI); EmitConstant(Value, 4, CurByte, OS); break; } + default: { + llvm_unreachable("Unhandled instruction encoding format!"); + break; + } } } |