summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target
diff options
context:
space:
mode:
authorJim Grosbach <grosbach@apple.com>2010-10-07 21:57:55 +0000
committerJim Grosbach <grosbach@apple.com>2010-10-07 21:57:55 +0000
commit8aed386d823b1718a2151418b9cbe1b6396ad75a (patch)
treeeef2b10dd09071fc805508c537229221699347b3 /llvm/lib/Target
parent1e00173d20247e07167fe1eb33fdb032ad75a8c0 (diff)
downloadbcm5719-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.cpp20
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
OpenPOWER on IntegriCloud