1 //===-- ARM/ARMCodeEmitter.cpp - Convert ARM code to machine code ---------===//
3 // The LLVM Compiler Infrastructure
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
8 //===----------------------------------------------------------------------===//
10 // This file contains the pass that transforms the ARM machine instructions into
11 // relocatable machine code.
13 //===----------------------------------------------------------------------===//
15 #define DEBUG_TYPE "jit"
17 #include "ARMAddressingModes.h"
18 #include "ARMConstantPoolValue.h"
19 #include "ARMInstrInfo.h"
20 #include "ARMRelocations.h"
21 #include "ARMSubtarget.h"
22 #include "ARMTargetMachine.h"
23 #include "llvm/Constants.h"
24 #include "llvm/DerivedTypes.h"
25 #include "llvm/Function.h"
26 #include "llvm/PassManager.h"
27 #include "llvm/CodeGen/MachineCodeEmitter.h"
28 #include "llvm/CodeGen/MachineConstantPool.h"
29 #include "llvm/CodeGen/MachineFunctionPass.h"
30 #include "llvm/CodeGen/MachineInstr.h"
31 #include "llvm/CodeGen/Passes.h"
32 #include "llvm/ADT/Statistic.h"
33 #include "llvm/Support/Compiler.h"
34 #include "llvm/Support/Debug.h"
37 STATISTIC(NumEmitted, "Number of machine instructions emitted");
40 class VISIBILITY_HIDDEN ARMCodeEmitter : public MachineFunctionPass {
42 const ARMInstrInfo *II;
45 MachineCodeEmitter &MCE;
46 const std::vector<MachineConstantPoolEntry> *MCPEs;
50 explicit ARMCodeEmitter(TargetMachine &tm, MachineCodeEmitter &mce)
51 : MachineFunctionPass(&ID), JTI(0), II(0), TD(0), TM(tm),
53 ARMCodeEmitter(TargetMachine &tm, MachineCodeEmitter &mce,
54 const ARMInstrInfo &ii, const TargetData &td)
55 : MachineFunctionPass(&ID), JTI(0), II(&ii), TD(&td), TM(tm),
58 bool runOnMachineFunction(MachineFunction &MF);
60 virtual const char *getPassName() const {
61 return "ARM Machine Code Emitter";
64 void emitInstruction(const MachineInstr &MI);
68 void emitConstPoolInstruction(const MachineInstr &MI);
70 void emitPseudoInstruction(const MachineInstr &MI);
72 unsigned getAddrModeNoneInstrBinary(const MachineInstr &MI,
73 const TargetInstrDesc &TID,
76 unsigned getMachineSoRegOpValue(const MachineInstr &MI,
77 const TargetInstrDesc &TID,
78 const MachineOperand &MO,
81 unsigned getMachineSoImmOpValue(const MachineInstr &MI,
82 const TargetInstrDesc &TID,
83 const MachineOperand &MO);
85 unsigned getAddrModeSBit(const MachineInstr &MI,
86 const TargetInstrDesc &TID) const;
88 unsigned getAddrMode1InstrBinary(const MachineInstr &MI,
89 const TargetInstrDesc &TID,
91 unsigned getAddrMode2InstrBinary(const MachineInstr &MI,
92 const TargetInstrDesc &TID,
94 unsigned getAddrMode3InstrBinary(const MachineInstr &MI,
95 const TargetInstrDesc &TID,
97 unsigned getAddrMode4InstrBinary(const MachineInstr &MI,
98 const TargetInstrDesc &TID,
100 unsigned getAddrMode6InstrBinary(const MachineInstr &MI,
101 const TargetInstrDesc &TID,
104 /// getInstrBinary - Return binary encoding for the specified
105 /// machine instruction.
106 unsigned getInstrBinary(const MachineInstr &MI);
108 /// getBinaryCodeForInstr - This function, generated by the
109 /// CodeEmitterGenerator using TableGen, produces the binary encoding for
110 /// machine instructions.
112 unsigned getBinaryCodeForInstr(const MachineInstr &MI);
114 /// getMachineOpValue - Return binary encoding of operand. If the machine
115 /// operand requires relocation, record the relocation and return zero.
116 unsigned getMachineOpValue(const MachineInstr &MI,const MachineOperand &MO);
117 unsigned getMachineOpValue(const MachineInstr &MI, unsigned OpIdx) {
118 return getMachineOpValue(MI, MI.getOperand(OpIdx));
121 /// getBaseOpcodeFor - Return the opcode value.
123 unsigned getBaseOpcodeFor(const TargetInstrDesc &TID) const {
124 return (TID.TSFlags & ARMII::OpcodeMask) >> ARMII::OpcodeShift;
127 /// getShiftOp - Return the shift opcode (bit[6:5]) of the machine operand.
129 unsigned getShiftOp(const MachineOperand &MO) const ;
131 /// Routines that handle operands which add machine relocations which are
132 /// fixed up by the JIT fixup stage.
133 void emitGlobalAddress(GlobalValue *GV, unsigned Reloc,
135 void emitExternalSymbolAddress(const char *ES, unsigned Reloc);
136 void emitConstPoolAddress(unsigned CPI, unsigned Reloc,
137 int Disp = 0, unsigned PCAdj = 0 );
138 void emitJumpTableAddress(unsigned JTIndex, unsigned Reloc,
140 void emitGlobalConstant(const Constant *CV);
141 void emitMachineBasicBlock(MachineBasicBlock *BB);
143 char ARMCodeEmitter::ID = 0;
146 /// createARMCodeEmitterPass - Return a pass that emits the collected ARM code
147 /// to the specified MCE object.
148 FunctionPass *llvm::createARMCodeEmitterPass(ARMTargetMachine &TM,
149 MachineCodeEmitter &MCE) {
150 return new ARMCodeEmitter(TM, MCE);
153 bool ARMCodeEmitter::runOnMachineFunction(MachineFunction &MF) {
154 assert((MF.getTarget().getRelocationModel() != Reloc::Default ||
155 MF.getTarget().getRelocationModel() != Reloc::Static) &&
156 "JIT relocation model must be set to static or default!");
157 II = ((ARMTargetMachine&)MF.getTarget()).getInstrInfo();
158 TD = ((ARMTargetMachine&)MF.getTarget()).getTargetData();
159 JTI = ((ARMTargetMachine&)MF.getTarget()).getJITInfo();
160 MCPEs = &MF.getConstantPool()->getConstants();
161 JTI->ResizeConstPoolMap(MCPEs->size());
164 DOUT << "JITTing function '" << MF.getFunction()->getName() << "'\n";
165 MCE.startFunction(MF);
166 for (MachineFunction::iterator MBB = MF.begin(), E = MF.end();
168 MCE.StartMachineBasicBlock(MBB);
169 for (MachineBasicBlock::const_iterator I = MBB->begin(), E = MBB->end();
173 } while (MCE.finishFunction(MF));
178 /// getShiftOp - Return the shift opcode (bit[6:5]) of the machine operand.
180 unsigned ARMCodeEmitter::getShiftOp(const MachineOperand &MO) const {
181 switch (ARM_AM::getAM2ShiftOpc(MO.getImm())) {
182 default: assert(0 && "Unknown shift opc!");
183 case ARM_AM::asr: return 2;
184 case ARM_AM::lsl: return 0;
185 case ARM_AM::lsr: return 1;
187 case ARM_AM::rrx: return 3;
192 /// getMachineOpValue - Return binary encoding of operand. If the machine
193 /// operand requires relocation, record the relocation and return zero.
194 unsigned ARMCodeEmitter::getMachineOpValue(const MachineInstr &MI,
195 const MachineOperand &MO) {
197 return ARMRegisterInfo::getRegisterNumbering(MO.getReg());
199 return static_cast<unsigned>(MO.getImm());
200 else if (MO.isGlobal())
201 emitGlobalAddress(MO.getGlobal(), ARM::reloc_arm_branch, true);
202 else if (MO.isSymbol())
203 emitExternalSymbolAddress(MO.getSymbolName(), ARM::reloc_arm_relative);
205 emitConstPoolAddress(MO.getIndex(), ARM::reloc_arm_cp_entry);
207 emitJumpTableAddress(MO.getIndex(), ARM::reloc_arm_relative);
209 emitMachineBasicBlock(MO.getMBB());
211 cerr << "ERROR: Unknown type of MachineOperand: " << MO << "\n";
217 /// emitGlobalAddress - Emit the specified address to the code stream.
219 void ARMCodeEmitter::emitGlobalAddress(GlobalValue *GV,
220 unsigned Reloc, bool NeedStub) {
221 MCE.addRelocation(MachineRelocation::getGV(MCE.getCurrentPCOffset(),
222 Reloc, GV, 0, NeedStub));
225 /// emitExternalSymbolAddress - Arrange for the address of an external symbol to
226 /// be emitted to the current location in the function, and allow it to be PC
228 void ARMCodeEmitter::emitExternalSymbolAddress(const char *ES, unsigned Reloc) {
229 MCE.addRelocation(MachineRelocation::getExtSym(MCE.getCurrentPCOffset(),
233 /// emitConstPoolAddress - Arrange for the address of an constant pool
234 /// to be emitted to the current location in the function, and allow it to be PC
236 void ARMCodeEmitter::emitConstPoolAddress(unsigned CPI, unsigned Reloc,
238 unsigned PCAdj /* = 0 */) {
239 // Tell JIT emitter we'll resolve the address.
240 MCE.addRelocation(MachineRelocation::getConstPool(MCE.getCurrentPCOffset(),
241 Reloc, CPI, PCAdj, true));
244 /// emitJumpTableAddress - Arrange for the address of a jump table to
245 /// be emitted to the current location in the function, and allow it to be PC
247 void ARMCodeEmitter::emitJumpTableAddress(unsigned JTIndex, unsigned Reloc,
248 unsigned PCAdj /* = 0 */) {
249 MCE.addRelocation(MachineRelocation::getJumpTable(MCE.getCurrentPCOffset(),
250 Reloc, JTIndex, PCAdj));
253 /// emitMachineBasicBlock - Emit the specified address basic block.
254 void ARMCodeEmitter::emitMachineBasicBlock(MachineBasicBlock *BB) {
255 MCE.addRelocation(MachineRelocation::getBB(MCE.getCurrentPCOffset(),
256 ARM::reloc_arm_branch, BB));
259 void ARMCodeEmitter::emitInstruction(const MachineInstr &MI) {
260 DOUT << "JIT: " << "0x" << MCE.getCurrentPCValue() << ":\t" << MI;
262 NumEmitted++; // Keep track of the # of mi's emitted
263 if ((MI.getDesc().TSFlags & ARMII::FormMask) == ARMII::Pseudo)
264 emitPseudoInstruction(MI);
266 MCE.emitWordLE(getInstrBinary(MI));
269 void ARMCodeEmitter::emitConstPoolInstruction(const MachineInstr &MI) {
270 unsigned CPI = MI.getOperand(0).getImm();
271 unsigned CPIndex = MI.getOperand(1).getIndex();
272 const MachineConstantPoolEntry &MCPE = (*MCPEs)[CPIndex];
274 // Remember the CONSTPOOL_ENTRY address for later relocation.
275 JTI->addConstantPoolEntryAddr(CPI, MCE.getCurrentPCValue());
277 // Emit constpool island entry. In most cases, the actual values will be
278 // resolved and relocated after code emission.
279 if (MCPE.isMachineConstantPoolEntry()) {
280 ARMConstantPoolValue *ACPV =
281 static_cast<ARMConstantPoolValue*>(MCPE.Val.MachineCPVal);
283 DOUT << "\t** ARM constant pool #" << CPI << " @ "
284 << (void*)MCE.getCurrentPCValue() << " '" << *ACPV << "'\n";
286 GlobalValue *GV = ACPV->getGV();
288 assert(!ACPV->isStub() && "Don't know how to deal this yet!");
289 emitGlobalAddress(GV, ARM::reloc_arm_absolute, false);
291 assert(!ACPV->isNonLazyPointer() && "Don't know how to deal this yet!");
292 emitExternalSymbolAddress(ACPV->getSymbol(), ARM::reloc_arm_absolute);
296 Constant *CV = MCPE.Val.ConstVal;
298 DOUT << "\t** Constant pool #" << CPI << " @ "
299 << (void*)MCE.getCurrentPCValue() << " '" << *CV << "'\n";
301 if (GlobalValue *GV = dyn_cast<GlobalValue>(CV)) {
302 emitGlobalAddress(GV, ARM::reloc_arm_absolute, false);
305 assert(CV->getType()->isInteger() &&
306 "Not expecting non-integer constpool entries yet!");
307 const ConstantInt *CI = dyn_cast<ConstantInt>(CV);
308 uint32_t Val = *(uint32_t*)CI->getValue().getRawData();
314 void ARMCodeEmitter::emitPseudoInstruction(const MachineInstr &MI) {
315 unsigned Opcode = MI.getDesc().Opcode;
319 case ARM::CONSTPOOL_ENTRY:
320 emitConstPoolInstruction(MI);
323 // PICADD is just an add instruction that implicitly read pc.
324 unsigned Binary = getBinaryCodeForInstr(MI);
325 const TargetInstrDesc &TID = MI.getDesc();
326 MCE.emitWordLE(getAddrMode1InstrBinary(MI, TID, Binary));
333 unsigned ARMCodeEmitter::getAddrModeNoneInstrBinary(const MachineInstr &MI,
334 const TargetInstrDesc &TID,
336 // Set the conditional execution predicate
337 Binary |= II->getPredicate(&MI) << 28;
339 switch (TID.TSFlags & ARMII::FormMask) {
341 assert(0 && "Unknown instruction subtype!");
343 case ARMII::Branch: {
344 // Set signed_immed_24 field
345 Binary |= getMachineOpValue(MI, 0);
347 // if it is a conditional branch, set cond field
348 if (TID.Opcode == ARM::Bcc) {
349 Binary &= 0x0FFFFFFF; // clear conditional field
350 Binary |= getMachineOpValue(MI, 1) << 28; // set conditional field
354 case ARMII::BranchMisc: {
355 if (TID.Opcode == ARM::BX)
357 if (TID.Opcode == ARM::BX_RET)
358 Binary |= 0xe; // the return register is LR
360 // otherwise, set the return register
361 Binary |= getMachineOpValue(MI, 0);
369 unsigned ARMCodeEmitter::getMachineSoRegOpValue(const MachineInstr &MI,
370 const TargetInstrDesc &TID,
371 const MachineOperand &MO,
373 unsigned Binary = getMachineOpValue(MI, MO);
375 const MachineOperand &MO1 = MI.getOperand(OpIdx + 1);
376 const MachineOperand &MO2 = MI.getOperand(OpIdx + 2);
377 ARM_AM::ShiftOpc SOpc = ARM_AM::getSORegShOp(MO2.getImm());
379 // Encode the shift opcode.
381 unsigned Rs = MO1.getReg();
383 // Set shift operand (bit[7:4]).
388 // RRX - 0110 and bit[11:8] clear.
390 default: assert(0 && "Unknown shift opc!");
391 case ARM_AM::lsl: SBits = 0x1; break;
392 case ARM_AM::lsr: SBits = 0x3; break;
393 case ARM_AM::asr: SBits = 0x5; break;
394 case ARM_AM::ror: SBits = 0x7; break;
395 case ARM_AM::rrx: SBits = 0x6; break;
398 // Set shift operand (bit[6:4]).
404 default: assert(0 && "Unknown shift opc!");
405 case ARM_AM::lsl: SBits = 0x0; break;
406 case ARM_AM::lsr: SBits = 0x2; break;
407 case ARM_AM::asr: SBits = 0x4; break;
408 case ARM_AM::ror: SBits = 0x6; break;
411 Binary |= SBits << 4;
412 if (SOpc == ARM_AM::rrx)
415 // Encode the shift operation Rs or shift_imm (except rrx).
417 // Encode Rs bit[11:8].
418 assert(ARM_AM::getSORegOffset(MO2.getImm()) == 0);
420 (ARMRegisterInfo::getRegisterNumbering(Rs) << ARMII::RegRsShift);
423 // Encode shift_imm bit[11:7].
424 return Binary | ARM_AM::getSORegOffset(MO2.getImm()) << 7;
427 unsigned ARMCodeEmitter::getMachineSoImmOpValue(const MachineInstr &MI,
428 const TargetInstrDesc &TID,
429 const MachineOperand &MO) {
430 unsigned SoImm = MO.getImm();
431 // Encode rotate_imm.
432 unsigned Binary = ARM_AM::getSOImmValRot(SoImm) << ARMII::RotImmShift;
434 Binary |= ARM_AM::getSOImmVal(SoImm);
438 unsigned ARMCodeEmitter::getAddrModeSBit(const MachineInstr &MI,
439 const TargetInstrDesc &TID) const {
440 for (unsigned i = MI.getNumOperands(), e = TID.getNumOperands(); i != e; --i){
441 const MachineOperand &MO = MI.getOperand(i-1);
442 if (MO.isReg() && MO.isDef() && MO.getReg() == ARM::CPSR)
443 return 1 << ARMII::S_BitShift;
448 unsigned ARMCodeEmitter::getAddrMode1InstrBinary(const MachineInstr &MI,
449 const TargetInstrDesc &TID,
451 // Set the conditional execution predicate
452 Binary |= II->getPredicate(&MI) << 28;
454 // Encode S bit if MI modifies CPSR.
455 Binary |= getAddrModeSBit(MI, TID);
457 // Encode register def if there is one.
458 unsigned NumDefs = TID.getNumDefs();
461 Binary |= getMachineOpValue(MI, OpIdx) << ARMII::RegRdShift;
465 // Encode first non-shifter register operand if there is one.
466 unsigned Format = TID.TSFlags & ARMII::FormMask;
467 bool HasRnReg = !(Format == ARMII::DPRdMisc ||
468 Format == ARMII::DPRdIm ||
469 Format == ARMII::DPRdReg ||
470 Format == ARMII::DPRdSoReg);
472 if (TID.getOpcode() == ARM::PICADD)
473 // Special handling for PICADD. It implicitly use add.
475 ARMRegisterInfo::getRegisterNumbering(ARM::PC) << ARMII::RegRnShift;
477 Binary |= getMachineOpValue(MI, OpIdx) << ARMII::RegRnShift;
482 // Encode shifter operand.
483 bool HasSoReg = (Format == ARMII::DPRdSoReg ||
484 Format == ARMII::DPRnSoReg ||
485 Format == ARMII::DPRSoReg ||
486 Format == ARMII::DPRSoRegS);
488 const MachineOperand &MO = MI.getOperand(OpIdx);
491 return Binary | getMachineSoRegOpValue(MI, TID, MO, OpIdx);
494 // Encode register Rm.
495 return Binary | ARMRegisterInfo::getRegisterNumbering(MO.getReg());
498 // Set bit I(25) to identify this is the immediate form of <shifter_op>
499 Binary |= 1 << ARMII::I_BitShift;
500 Binary |= getMachineSoImmOpValue(MI, TID, MO);
504 unsigned ARMCodeEmitter::getAddrMode2InstrBinary(const MachineInstr &MI,
505 const TargetInstrDesc &TID,
507 // Set the conditional execution predicate
508 Binary |= II->getPredicate(&MI) << 28;
511 Binary |= getMachineOpValue(MI, 0) << ARMII::RegRdShift;
513 // Set second operand
514 Binary |= getMachineOpValue(MI, 1) << ARMII::RegRnShift;
516 const MachineOperand &MO2 = MI.getOperand(2);
517 const MachineOperand &MO3 = MI.getOperand(3);
519 // Set bit U(23) according to sign of immed value (positive or negative).
520 Binary |= ((ARM_AM::getAM2Op(MO3.getImm()) == ARM_AM::add ? 1 : 0) <<
522 if (!MO2.getReg()) { // is immediate
523 if (ARM_AM::getAM2Offset(MO3.getImm()))
524 // Set the value of offset_12 field
525 Binary |= ARM_AM::getAM2Offset(MO3.getImm());
529 // Set bit I(25), because this is not in immediate enconding.
530 Binary |= 1 << ARMII::I_BitShift;
531 assert(TargetRegisterInfo::isPhysicalRegister(MO2.getReg()));
532 // Set bit[3:0] to the corresponding Rm register
533 Binary |= ARMRegisterInfo::getRegisterNumbering(MO2.getReg());
535 // if this instr is in scaled register offset/index instruction, set
536 // shift_immed(bit[11:7]) and shift(bit[6:5]) fields.
537 if (unsigned ShImm = ARM_AM::getAM2Offset(MO3.getImm())) {
538 Binary |= getShiftOp(MO3) << 5; // shift
539 Binary |= ShImm << 7; // shift_immed
545 unsigned ARMCodeEmitter::getAddrMode3InstrBinary(const MachineInstr &MI,
546 const TargetInstrDesc &TID,
548 // Set the conditional execution predicate
549 Binary |= II->getPredicate(&MI) << 28;
552 Binary |= getMachineOpValue(MI, 0) << ARMII::RegRdShift;
554 // Set second operand
555 Binary |= getMachineOpValue(MI, 1) << ARMII::RegRnShift;
557 const MachineOperand &MO2 = MI.getOperand(2);
558 const MachineOperand &MO3 = MI.getOperand(3);
560 // Set bit U(23) according to sign of immed value (positive or negative)
561 Binary |= ((ARM_AM::getAM2Op(MO3.getImm()) == ARM_AM::add ? 1 : 0) <<
564 // If this instr is in register offset/index encoding, set bit[3:0]
565 // to the corresponding Rm register.
567 Binary |= ARMRegisterInfo::getRegisterNumbering(MO2.getReg());
571 // if this instr is in immediate offset/index encoding, set bit 22 to 1
572 if (unsigned ImmOffs = ARM_AM::getAM3Offset(MO3.getImm())) {
575 Binary |= (ImmOffs >> 4) << 8; // immedH
576 Binary |= (ImmOffs & ~0xF); // immedL
582 unsigned ARMCodeEmitter::getAddrMode4InstrBinary(const MachineInstr &MI,
583 const TargetInstrDesc &TID,
585 // Set the conditional execution predicate
586 Binary |= II->getPredicate(&MI) << 28;
589 Binary |= getMachineOpValue(MI, 0) << ARMII::RegRnShift;
591 // Set addressing mode by modifying bits U(23) and P(24)
592 // IA - Increment after - bit U = 1 and bit P = 0
593 // IB - Increment before - bit U = 1 and bit P = 1
594 // DA - Decrement after - bit U = 0 and bit P = 0
595 // DB - Decrement before - bit U = 0 and bit P = 1
596 const MachineOperand &MO = MI.getOperand(1);
597 ARM_AM::AMSubMode Mode = ARM_AM::getAM4SubMode(MO.getImm());
599 default: assert(0 && "Unknown addressing sub-mode!");
600 case ARM_AM::da: break;
601 case ARM_AM::db: Binary |= 0x1 << 24; break;
602 case ARM_AM::ia: Binary |= 0x1 << 23; break;
603 case ARM_AM::ib: Binary |= 0x3 << 23; break;
607 if (ARM_AM::getAM4WBFlag(MO.getImm()))
611 for (unsigned i = 4, e = MI.getNumOperands(); i != e; ++i) {
612 const MachineOperand &MO = MI.getOperand(i);
613 if (MO.isReg() && MO.isImplicit())
615 unsigned RegNum = ARMRegisterInfo::getRegisterNumbering(MO.getReg());
616 assert(TargetRegisterInfo::isPhysicalRegister(MO.getReg()) &&
618 Binary |= 0x1 << RegNum;
624 unsigned ARMCodeEmitter::getAddrMode6InstrBinary(const MachineInstr &MI,
625 const TargetInstrDesc &TID,
627 // Set the conditional execution predicate
628 Binary |= II->getPredicate(&MI) << 28;
630 // Encode S bit if MI modifies CPSR.
631 Binary |= getAddrModeSBit(MI, TID);
633 // 32x32->64bit operations have two destination registers. The number
634 // of register definitions will tell us if that's what we're dealing with.
636 if (TID.getNumDefs() == 2)
637 Binary |= getMachineOpValue (MI, OpIdx++) << ARMII::RegRdLoShift;
640 Binary |= getMachineOpValue(MI, OpIdx++) << ARMII::RegRdHiShift;
643 Binary |= getMachineOpValue(MI, OpIdx++);
646 Binary |= getMachineOpValue(MI, OpIdx++) << ARMII::RegRsShift;
651 /// getInstrBinary - Return binary encoding for the specified
652 /// machine instruction.
653 unsigned ARMCodeEmitter::getInstrBinary(const MachineInstr &MI) {
654 // Part of binary is determined by TableGn.
655 unsigned Binary = getBinaryCodeForInstr(MI);
657 const TargetInstrDesc &TID = MI.getDesc();
658 switch (TID.TSFlags & ARMII::AddrModeMask) {
659 case ARMII::AddrModeNone:
660 return getAddrModeNoneInstrBinary(MI, TID, Binary);
661 case ARMII::AddrMode1:
662 return getAddrMode1InstrBinary(MI, TID, Binary);
663 case ARMII::AddrMode2:
664 return getAddrMode2InstrBinary(MI, TID, Binary);
665 case ARMII::AddrMode3:
666 return getAddrMode3InstrBinary(MI, TID, Binary);
667 case ARMII::AddrMode4:
668 return getAddrMode4InstrBinary(MI, TID, Binary);
669 case ARMII::AddrMode6:
670 return getAddrMode6InstrBinary(MI, TID, Binary);
677 #include "ARMGenCodeEmitter.inc"