diff options
author | Jim Grosbach <grosbach@apple.com> | 2010-10-08 00:39:21 +0000 |
---|---|---|
committer | Jim Grosbach <grosbach@apple.com> | 2010-10-08 00:39:21 +0000 |
commit | 0bb2f9afa9f7126139fcd01733d142c341c43334 (patch) | |
tree | 345a7d5c5eff27a804ae49540a28fbca3d249b89 | |
parent | a23825a4bb35a0be0aeb547d562c53592d6c4ff7 (diff) | |
download | bcm5719-llvm-0bb2f9afa9f7126139fcd01733d142c341c43334.tar.gz bcm5719-llvm-0bb2f9afa9f7126139fcd01733d142c341c43334.zip |
Enable binary encoding of some simple instructions.
llvm-svn: 116022
-rw-r--r-- | llvm/lib/Target/ARM/ARMMCCodeEmitter.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/llvm/lib/Target/ARM/ARMMCCodeEmitter.cpp b/llvm/lib/Target/ARM/ARMMCCodeEmitter.cpp index 908f6f08b9a..5ccc8f5f7d1 100644 --- a/llvm/lib/Target/ARM/ARMMCCodeEmitter.cpp +++ b/llvm/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; |