aboutsummaryrefslogtreecommitdiffstats
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
commit19e2c510219b024c748054675ed16fab587ac02c (patch)
tree42e7f7256d5788e81698504cf035acb68678d809
parentd60284ca60281a260b952734eaa9ea47d333e3e8 (diff)
downloadexternal_llvm-19e2c510219b024c748054675ed16fab587ac02c.tar.gz
external_llvm-19e2c510219b024c748054675ed16fab587ac02c.tar.bz2
external_llvm-19e2c510219b024c748054675ed16fab587ac02c.zip
Include the auto-generated bits for machine encoding.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@115987 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--lib/Target/ARM/ARMMCCodeEmitter.cpp20
1 files changed, 20 insertions, 0 deletions
diff --git a/lib/Target/ARM/ARMMCCodeEmitter.cpp b/lib/Target/ARM/ARMMCCodeEmitter.cpp
index 8f7f5ea29a..cfebe97dfe 100644
--- a/lib/Target/ARM/ARMMCCodeEmitter.cpp
+++ b/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