[llvm-commits] [llvm] r116022 - /llvm/trunk/lib/Target/ARM/ARMMCCodeEmitter.cpp
Jim Grosbach
grosbach at apple.com
Thu Oct 7 17:39:22 PDT 2010
Author: grosbach
Date: Thu Oct 7 19:39:21 2010
New Revision: 116022
URL: http://llvm.org/viewvc/llvm-project?rev=116022&view=rev
Log:
Enable binary encoding of some simple instructions.
Modified:
llvm/trunk/lib/Target/ARM/ARMMCCodeEmitter.cpp
Modified: llvm/trunk/lib/Target/ARM/ARMMCCodeEmitter.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/ARM/ARMMCCodeEmitter.cpp?rev=116022&r1=116021&r2=116022&view=diff
==============================================================================
--- llvm/trunk/lib/Target/ARM/ARMMCCodeEmitter.cpp (original)
+++ llvm/trunk/lib/Target/ARM/ARMMCCodeEmitter.cpp Thu Oct 7 19:39:21 2010
@@ -112,6 +112,8 @@
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 @@
++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;
More information about the llvm-commits
mailing list