aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJim Grosbach <grosbach@apple.com>2010-10-08 00:39:21 +0000
committerJim Grosbach <grosbach@apple.com>2010-10-08 00:39:21 +0000
commit58f38bfa2457d4729a5bdacde193dc7c7d25ac9e (patch)
tree319f3c2fc90349fcadb63938b434aac23c53c737
parentc9f1cddc5170ad882e04eb5901adc7964aec2417 (diff)
Enable binary encoding of some simple instructions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@116022 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--lib/Target/ARM/ARMMCCodeEmitter.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/lib/Target/ARM/ARMMCCodeEmitter.cpp b/lib/Target/ARM/ARMMCCodeEmitter.cpp
index 908f6f08b9..5ccc8f5f7d 100644
--- a/lib/Target/ARM/ARMMCCodeEmitter.cpp
+++ b/lib/Target/ARM/ARMMCCodeEmitter.cpp
@@ -112,6 +112,8 @@ EncodeInstruction(const MCInst &MI, raw_ostream &OS,
unsigned Opcode = MI.getOpcode();
const TargetInstrDesc &Desc = TII.get(Opcode);
uint64_t TSFlags = Desc.TSFlags;
+ // Keep track of the current byte being emitted.
+ unsigned CurByte = 0;
// Pseudo instructions don't get encoded.
if ((TSFlags & ARMII::FormMask) == ARMII::Pseudo)
@@ -119,6 +121,12 @@ EncodeInstruction(const MCInst &MI, raw_ostream &OS,
++MCNumEmitted; // Keep track of the # of mi's emitted
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;