Reverting 116059. Bots are unhappy with it.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@116064 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/Target/ARM/ARMMCCodeEmitter.cpp b/lib/Target/ARM/ARMMCCodeEmitter.cpp
index 1f45eb9..5ccc8f5 100644
--- a/lib/Target/ARM/ARMMCCodeEmitter.cpp
+++ b/lib/Target/ARM/ARMMCCodeEmitter.cpp
@@ -44,8 +44,8 @@
/// 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 @@
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;
+ }
}
}