diff options
| author | Jim Grosbach <grosbach@apple.com> | 2010-10-07 21:57:55 +0000 |
|---|---|---|
| committer | Jim Grosbach <grosbach@apple.com> | 2010-10-07 21:57:55 +0000 |
| commit | 8aed386d823b1718a2151418b9cbe1b6396ad75a (patch) | |
| tree | eef2b10dd09071fc805508c537229221699347b3 /llvm/lib/Target | |
| parent | 1e00173d20247e07167fe1eb33fdb032ad75a8c0 (diff) | |
| download | bcm5719-llvm-8aed386d823b1718a2151418b9cbe1b6396ad75a.tar.gz bcm5719-llvm-8aed386d823b1718a2151418b9cbe1b6396ad75a.zip | |
Include the auto-generated bits for machine encoding.
llvm-svn: 115987
Diffstat (limited to 'llvm/lib/Target')
| -rw-r--r-- | llvm/lib/Target/ARM/ARMMCCodeEmitter.cpp | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/llvm/lib/Target/ARM/ARMMCCodeEmitter.cpp b/llvm/lib/Target/ARM/ARMMCCodeEmitter.cpp index 8f7f5ea29a3..cfebe97dfe1 100644 --- a/llvm/lib/Target/ARM/ARMMCCodeEmitter.cpp +++ b/llvm/lib/Target/ARM/ARMMCCodeEmitter.cpp @@ -36,6 +36,17 @@ public: ~ARMMCCodeEmitter() {} + // getBinaryCodeForInstr - TableGen'erated function for getting the + // binary encoding for an instruction. + unsigned getBinaryCodeForInstr(const MCInst &MI); + + /// 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); + unsigned getMachineOpValue(const MCInst &MI, unsigned OpIdx) { + return getMachineOpValue(MI, MI.getOperand(OpIdx)); + } + unsigned getNumFixupKinds() const { assert(0 && "ARMMCCodeEmitter::getNumFixupKinds() not yet implemented."); return 0; @@ -98,3 +109,12 @@ EncodeInstruction(const MCInst &MI, raw_ostream &OS, SmallVectorImpl<MCFixup> &Fixups) const { assert(0 && "ARMMCCodeEmitter::EncodeInstruction() not yet implemented."); } + +// FIXME: These #defines shouldn't be necessary. Instead, tblgen should +// be able to generate code emitter helpers for either variant, like it +// does for the AsmWriter. +#define ARMCodeEmitter ARMMCCodeEmitter +#define MachineInstr MCInst +#include "ARMGenCodeEmitter.inc" +#undef ARMCodeEmitter +#undef MachineInstr |

