Chris Lattner | 7261408 | 2002-10-25 22:55:53 +0000 | [diff] [blame] | 1 | //===-- X86/Printer.cpp - Convert X86 code to human readable rep. ---------===// |
| 2 | // |
| 3 | // This file contains a printer that converts from our internal representation |
| 4 | // of LLVM code to a nice human readable form that is suitable for debuggging. |
| 5 | // |
| 6 | //===----------------------------------------------------------------------===// |
| 7 | |
| 8 | #include "X86.h" |
Brian Gaeke | 6559bb9 | 2002-11-14 22:32:30 +0000 | [diff] [blame] | 9 | #include "X86InstrInfo.h" |
Chris Lattner | b4f68ed | 2002-10-29 22:37:54 +0000 | [diff] [blame] | 10 | #include "llvm/Pass.h" |
Brian Gaeke | 6559bb9 | 2002-11-14 22:32:30 +0000 | [diff] [blame] | 11 | #include "llvm/Function.h" |
| 12 | #include "llvm/Target/TargetMachine.h" |
Chris Lattner | b4f68ed | 2002-10-29 22:37:54 +0000 | [diff] [blame] | 13 | #include "llvm/CodeGen/MachineFunction.h" |
Chris Lattner | dbb61c6 | 2002-11-17 22:53:13 +0000 | [diff] [blame] | 14 | #include "llvm/CodeGen/MachineInstr.h" |
Chris Lattner | 233ad71 | 2002-11-21 01:33:44 +0000 | [diff] [blame] | 15 | #include "Support/Statistic.h" |
Chris Lattner | 7261408 | 2002-10-25 22:55:53 +0000 | [diff] [blame] | 16 | |
Chris Lattner | b4f68ed | 2002-10-29 22:37:54 +0000 | [diff] [blame] | 17 | namespace { |
| 18 | struct Printer : public FunctionPass { |
| 19 | TargetMachine &TM; |
| 20 | std::ostream &O; |
Chris Lattner | 7261408 | 2002-10-25 22:55:53 +0000 | [diff] [blame] | 21 | |
Chris Lattner | b4f68ed | 2002-10-29 22:37:54 +0000 | [diff] [blame] | 22 | Printer(TargetMachine &tm, std::ostream &o) : TM(tm), O(o) {} |
| 23 | |
| 24 | bool runOnFunction(Function &F); |
| 25 | }; |
| 26 | } |
| 27 | |
Chris Lattner | dbb61c6 | 2002-11-17 22:53:13 +0000 | [diff] [blame] | 28 | /// createX86CodePrinterPass - Print out the specified machine code function to |
| 29 | /// the specified stream. This function should work regardless of whether or |
| 30 | /// not the function is in SSA form or not. |
| 31 | /// |
| 32 | Pass *createX86CodePrinterPass(TargetMachine &TM, std::ostream &O) { |
| 33 | return new Printer(TM, O); |
| 34 | } |
| 35 | |
| 36 | |
Brian Gaeke | 6559bb9 | 2002-11-14 22:32:30 +0000 | [diff] [blame] | 37 | /// runOnFunction - This uses the X86InstructionInfo::print method |
| 38 | /// to print assembly for each instruction. |
| 39 | bool Printer::runOnFunction (Function & F) |
| 40 | { |
| 41 | static unsigned bbnumber = 0; |
| 42 | MachineFunction & MF = MachineFunction::get (&F); |
| 43 | const MachineInstrInfo & MII = TM.getInstrInfo (); |
Brian Gaeke | 6559bb9 | 2002-11-14 22:32:30 +0000 | [diff] [blame] | 44 | |
Brian Gaeke | 6559bb9 | 2002-11-14 22:32:30 +0000 | [diff] [blame] | 45 | // Print out labels for the function. |
| 46 | O << "\t.globl\t" << F.getName () << "\n"; |
| 47 | O << "\t.type\t" << F.getName () << ", @function\n"; |
| 48 | O << F.getName () << ":\n"; |
| 49 | |
| 50 | // Print out code for the function. |
| 51 | for (MachineFunction::const_iterator bb_i = MF.begin (), bb_e = MF.end (); |
| 52 | bb_i != bb_e; ++bb_i) |
| 53 | { |
| 54 | // Print a label for the basic block. |
| 55 | O << ".BB" << bbnumber++ << ":\n"; |
| 56 | for (MachineBasicBlock::const_iterator i_i = bb_i->begin (), i_e = |
| 57 | bb_i->end (); i_i != i_e; ++i_i) |
| 58 | { |
| 59 | // Print the assembly for the instruction. |
| 60 | O << "\t"; |
Chris Lattner | 927dd09 | 2002-11-17 23:20:37 +0000 | [diff] [blame] | 61 | MII.print(*i_i, O, TM); |
Brian Gaeke | 6559bb9 | 2002-11-14 22:32:30 +0000 | [diff] [blame] | 62 | } |
| 63 | } |
| 64 | |
| 65 | // We didn't modify anything. |
Chris Lattner | b4f68ed | 2002-10-29 22:37:54 +0000 | [diff] [blame] | 66 | return false; |
| 67 | } |
| 68 | |
Chris Lattner | 3d3067b | 2002-11-21 20:44:15 +0000 | [diff] [blame] | 69 | static bool isReg(const MachineOperand &MO) { |
| 70 | return MO.getType() == MachineOperand::MO_VirtualRegister || |
| 71 | MO.getType() == MachineOperand::MO_MachineRegister; |
| 72 | } |
| 73 | |
| 74 | static bool isImmediate(const MachineOperand &MO) { |
| 75 | return MO.getType() == MachineOperand::MO_SignExtendedImmed || |
| 76 | MO.getType() == MachineOperand::MO_UnextendedImmed; |
| 77 | } |
| 78 | |
Chris Lattner | f8bafe8 | 2002-12-01 23:25:59 +0000 | [diff] [blame] | 79 | static bool isPCRelativeDisp(const MachineOperand &MO) { |
| 80 | return MO.getType() == MachineOperand::MO_PCRelativeDisp; |
| 81 | } |
| 82 | |
Chris Lattner | 3d3067b | 2002-11-21 20:44:15 +0000 | [diff] [blame] | 83 | static bool isScale(const MachineOperand &MO) { |
| 84 | return isImmediate(MO) && |
| 85 | (MO.getImmedValue() == 1 || MO.getImmedValue() == 2 || |
| 86 | MO.getImmedValue() == 4 || MO.getImmedValue() == 8); |
| 87 | } |
| 88 | |
| 89 | static bool isMem(const MachineInstr *MI, unsigned Op) { |
| 90 | return Op+4 <= MI->getNumOperands() && |
| 91 | isReg(MI->getOperand(Op )) && isScale(MI->getOperand(Op+1)) && |
| 92 | isReg(MI->getOperand(Op+2)) && isImmediate(MI->getOperand(Op+3)); |
| 93 | } |
| 94 | |
Chris Lattner | f9f6088 | 2002-11-18 06:56:51 +0000 | [diff] [blame] | 95 | static void printOp(std::ostream &O, const MachineOperand &MO, |
| 96 | const MRegisterInfo &RI) { |
| 97 | switch (MO.getType()) { |
| 98 | case MachineOperand::MO_VirtualRegister: |
Chris Lattner | dbf30f7 | 2002-12-04 06:45:19 +0000 | [diff] [blame] | 99 | if (Value *V = MO.getVRegValue()) { |
| 100 | O << "<" << V->getName() << ">"; |
| 101 | return; |
| 102 | } |
Misha Brukman | e1f0d81 | 2002-11-20 18:56:41 +0000 | [diff] [blame] | 103 | case MachineOperand::MO_MachineRegister: |
Chris Lattner | f9f6088 | 2002-11-18 06:56:51 +0000 | [diff] [blame] | 104 | if (MO.getReg() < MRegisterInfo::FirstVirtualRegister) |
| 105 | O << RI.get(MO.getReg()).Name; |
| 106 | else |
| 107 | O << "%reg" << MO.getReg(); |
| 108 | return; |
Chris Lattner | 77875d8 | 2002-11-21 02:00:20 +0000 | [diff] [blame] | 109 | |
| 110 | case MachineOperand::MO_SignExtendedImmed: |
| 111 | case MachineOperand::MO_UnextendedImmed: |
| 112 | O << (int)MO.getImmedValue(); |
| 113 | return; |
Chris Lattner | f8bafe8 | 2002-12-01 23:25:59 +0000 | [diff] [blame] | 114 | case MachineOperand::MO_PCRelativeDisp: |
Chris Lattner | ea1ddab | 2002-12-03 06:34:06 +0000 | [diff] [blame] | 115 | O << "<" << MO.getVRegValue()->getName() << ">"; |
Chris Lattner | f8bafe8 | 2002-12-01 23:25:59 +0000 | [diff] [blame] | 116 | return; |
Chris Lattner | f9f6088 | 2002-11-18 06:56:51 +0000 | [diff] [blame] | 117 | default: |
| 118 | O << "<unknown op ty>"; return; |
| 119 | } |
| 120 | } |
| 121 | |
Chris Lattner | 3d3067b | 2002-11-21 20:44:15 +0000 | [diff] [blame] | 122 | static void printMemReference(std::ostream &O, const MachineInstr *MI, |
| 123 | unsigned Op, const MRegisterInfo &RI) { |
| 124 | assert(isMem(MI, Op) && "Invalid memory reference!"); |
| 125 | const MachineOperand &BaseReg = MI->getOperand(Op); |
| 126 | const MachineOperand &Scale = MI->getOperand(Op+1); |
| 127 | const MachineOperand &IndexReg = MI->getOperand(Op+2); |
| 128 | const MachineOperand &Disp = MI->getOperand(Op+3); |
| 129 | |
| 130 | O << "["; |
| 131 | bool NeedPlus = false; |
| 132 | if (BaseReg.getReg()) { |
| 133 | printOp(O, BaseReg, RI); |
| 134 | NeedPlus = true; |
| 135 | } |
| 136 | |
| 137 | if (IndexReg.getReg()) { |
| 138 | if (NeedPlus) O << " + "; |
| 139 | if (IndexReg.getImmedValue() != 1) |
| 140 | O << IndexReg.getImmedValue() << "*"; |
| 141 | printOp(O, IndexReg, RI); |
| 142 | NeedPlus = true; |
| 143 | } |
| 144 | |
| 145 | if (Disp.getImmedValue()) { |
| 146 | if (NeedPlus) O << " + "; |
| 147 | printOp(O, Disp, RI); |
| 148 | } |
| 149 | O << "]"; |
| 150 | } |
| 151 | |
Chris Lattner | dbb61c6 | 2002-11-17 22:53:13 +0000 | [diff] [blame] | 152 | // print - Print out an x86 instruction in intel syntax |
Chris Lattner | 927dd09 | 2002-11-17 23:20:37 +0000 | [diff] [blame] | 153 | void X86InstrInfo::print(const MachineInstr *MI, std::ostream &O, |
| 154 | const TargetMachine &TM) const { |
Chris Lattner | f9f6088 | 2002-11-18 06:56:51 +0000 | [diff] [blame] | 155 | unsigned Opcode = MI->getOpcode(); |
| 156 | const MachineInstrDescriptor &Desc = get(Opcode); |
| 157 | |
Chris Lattner | f9f6088 | 2002-11-18 06:56:51 +0000 | [diff] [blame] | 158 | switch (Desc.TSFlags & X86II::FormMask) { |
Chris Lattner | f9f6088 | 2002-11-18 06:56:51 +0000 | [diff] [blame] | 159 | case X86II::RawFrm: |
Chris Lattner | f8bafe8 | 2002-12-01 23:25:59 +0000 | [diff] [blame] | 160 | // The accepted forms of Raw instructions are: |
| 161 | // 1. nop - No operand required |
| 162 | // 2. jmp foo - PC relative displacement operand |
| 163 | // |
| 164 | assert(MI->getNumOperands() == 0 || |
| 165 | (MI->getNumOperands() == 1 && isPCRelativeDisp(MI->getOperand(0))) && |
| 166 | "Illegal raw instruction!"); |
Chris Lattner | f9f6088 | 2002-11-18 06:56:51 +0000 | [diff] [blame] | 167 | O << getName(MI->getOpCode()) << " "; |
| 168 | |
Chris Lattner | f8bafe8 | 2002-12-01 23:25:59 +0000 | [diff] [blame] | 169 | if (MI->getNumOperands() == 1) { |
| 170 | printOp(O, MI->getOperand(0), RI); |
Chris Lattner | f9f6088 | 2002-11-18 06:56:51 +0000 | [diff] [blame] | 171 | } |
| 172 | O << "\n"; |
| 173 | return; |
| 174 | |
Chris Lattner | 77875d8 | 2002-11-21 02:00:20 +0000 | [diff] [blame] | 175 | case X86II::AddRegFrm: { |
| 176 | // There are currently two forms of acceptable AddRegFrm instructions. |
| 177 | // Either the instruction JUST takes a single register (like inc, dec, etc), |
| 178 | // or it takes a register and an immediate of the same size as the register |
Chris Lattner | dbf30f7 | 2002-12-04 06:45:19 +0000 | [diff] [blame] | 179 | // (move immediate f.e.). Note that this immediate value might be stored as |
| 180 | // an LLVM value, to represent, for example, loading the address of a global |
| 181 | // into a register. |
Chris Lattner | 77875d8 | 2002-11-21 02:00:20 +0000 | [diff] [blame] | 182 | // |
| 183 | assert(isReg(MI->getOperand(0)) && |
| 184 | (MI->getNumOperands() == 1 || |
Chris Lattner | dbf30f7 | 2002-12-04 06:45:19 +0000 | [diff] [blame] | 185 | (MI->getNumOperands() == 2 && |
Chris Lattner | 6d66944 | 2002-12-04 17:28:40 +0000 | [diff] [blame^] | 186 | (MI->getOperand(1).getVRegValueOrNull() || |
Chris Lattner | dbf30f7 | 2002-12-04 06:45:19 +0000 | [diff] [blame] | 187 | isImmediate(MI->getOperand(1))))) && |
Chris Lattner | 77875d8 | 2002-11-21 02:00:20 +0000 | [diff] [blame] | 188 | "Illegal form for AddRegFrm instruction!"); |
Chris Lattner | f9f6088 | 2002-11-18 06:56:51 +0000 | [diff] [blame] | 189 | |
Chris Lattner | 77875d8 | 2002-11-21 02:00:20 +0000 | [diff] [blame] | 190 | unsigned Reg = MI->getOperand(0).getReg(); |
Chris Lattner | 77875d8 | 2002-11-21 02:00:20 +0000 | [diff] [blame] | 191 | |
Chris Lattner | 77875d8 | 2002-11-21 02:00:20 +0000 | [diff] [blame] | 192 | O << getName(MI->getOpCode()) << " "; |
| 193 | printOp(O, MI->getOperand(0), RI); |
| 194 | if (MI->getNumOperands() == 2) { |
| 195 | O << ", "; |
Chris Lattner | 675dd2c | 2002-11-21 17:09:01 +0000 | [diff] [blame] | 196 | printOp(O, MI->getOperand(1), RI); |
Chris Lattner | 77875d8 | 2002-11-21 02:00:20 +0000 | [diff] [blame] | 197 | } |
| 198 | O << "\n"; |
| 199 | return; |
| 200 | } |
Chris Lattner | 233ad71 | 2002-11-21 01:33:44 +0000 | [diff] [blame] | 201 | case X86II::MRMDestReg: { |
Chris Lattner | f9f6088 | 2002-11-18 06:56:51 +0000 | [diff] [blame] | 202 | // There are two acceptable forms of MRMDestReg instructions, those with 3 |
| 203 | // and 2 operands: |
| 204 | // |
| 205 | // 3 Operands: in this form, the first two registers (the destination, and |
| 206 | // the first operand) should be the same, post register allocation. The 3rd |
| 207 | // operand is an additional input. This should be for things like add |
| 208 | // instructions. |
| 209 | // |
| 210 | // 2 Operands: this is for things like mov that do not read a second input |
| 211 | // |
Chris Lattner | 644e1ab | 2002-11-21 00:30:01 +0000 | [diff] [blame] | 212 | assert(isReg(MI->getOperand(0)) && |
| 213 | (MI->getNumOperands() == 2 || |
| 214 | (MI->getNumOperands() == 3 && isReg(MI->getOperand(1)))) && |
| 215 | isReg(MI->getOperand(MI->getNumOperands()-1)) |
Misha Brukman | e1f0d81 | 2002-11-20 18:56:41 +0000 | [diff] [blame] | 216 | && "Bad format for MRMDestReg!"); |
Chris Lattner | f9f6088 | 2002-11-18 06:56:51 +0000 | [diff] [blame] | 217 | if (MI->getNumOperands() == 3 && |
| 218 | MI->getOperand(0).getReg() != MI->getOperand(1).getReg()) |
| 219 | O << "**"; |
| 220 | |
Chris Lattner | f9f6088 | 2002-11-18 06:56:51 +0000 | [diff] [blame] | 221 | O << getName(MI->getOpCode()) << " "; |
| 222 | printOp(O, MI->getOperand(0), RI); |
| 223 | O << ", "; |
| 224 | printOp(O, MI->getOperand(MI->getNumOperands()-1), RI); |
| 225 | O << "\n"; |
| 226 | return; |
Chris Lattner | 233ad71 | 2002-11-21 01:33:44 +0000 | [diff] [blame] | 227 | } |
Chris Lattner | 1804233 | 2002-11-21 21:03:39 +0000 | [diff] [blame] | 228 | |
| 229 | case X86II::MRMDestMem: { |
| 230 | // These instructions are the same as MRMDestReg, but instead of having a |
| 231 | // register reference for the mod/rm field, it's a memory reference. |
| 232 | // |
| 233 | assert(isMem(MI, 0) && MI->getNumOperands() == 4+1 && |
| 234 | isReg(MI->getOperand(4)) && "Bad format for MRMDestMem!"); |
Chris Lattner | 1804233 | 2002-11-21 21:03:39 +0000 | [diff] [blame] | 235 | |
Chris Lattner | 1804233 | 2002-11-21 21:03:39 +0000 | [diff] [blame] | 236 | O << getName(MI->getOpCode()) << " <SIZE> PTR "; |
| 237 | printMemReference(O, MI, 0, RI); |
| 238 | O << ", "; |
| 239 | printOp(O, MI->getOperand(4), RI); |
| 240 | O << "\n"; |
| 241 | return; |
| 242 | } |
| 243 | |
Chris Lattner | 233ad71 | 2002-11-21 01:33:44 +0000 | [diff] [blame] | 244 | case X86II::MRMSrcReg: { |
Chris Lattner | 644e1ab | 2002-11-21 00:30:01 +0000 | [diff] [blame] | 245 | // There is a two forms that are acceptable for MRMSrcReg instructions, |
| 246 | // those with 3 and 2 operands: |
| 247 | // |
| 248 | // 3 Operands: in this form, the last register (the second input) is the |
| 249 | // ModR/M input. The first two operands should be the same, post register |
| 250 | // allocation. This is for things like: add r32, r/m32 |
| 251 | // |
| 252 | // 2 Operands: this is for things like mov that do not read a second input |
| 253 | // |
| 254 | assert(isReg(MI->getOperand(0)) && |
| 255 | isReg(MI->getOperand(1)) && |
| 256 | (MI->getNumOperands() == 2 || |
| 257 | (MI->getNumOperands() == 3 && isReg(MI->getOperand(2)))) |
| 258 | && "Bad format for MRMDestReg!"); |
| 259 | if (MI->getNumOperands() == 3 && |
| 260 | MI->getOperand(0).getReg() != MI->getOperand(1).getReg()) |
| 261 | O << "**"; |
| 262 | |
Chris Lattner | 644e1ab | 2002-11-21 00:30:01 +0000 | [diff] [blame] | 263 | O << getName(MI->getOpCode()) << " "; |
| 264 | printOp(O, MI->getOperand(0), RI); |
| 265 | O << ", "; |
| 266 | printOp(O, MI->getOperand(MI->getNumOperands()-1), RI); |
| 267 | O << "\n"; |
| 268 | return; |
Chris Lattner | 233ad71 | 2002-11-21 01:33:44 +0000 | [diff] [blame] | 269 | } |
Chris Lattner | 675dd2c | 2002-11-21 17:09:01 +0000 | [diff] [blame] | 270 | |
Chris Lattner | 3d3067b | 2002-11-21 20:44:15 +0000 | [diff] [blame] | 271 | case X86II::MRMSrcMem: { |
| 272 | // These instructions are the same as MRMSrcReg, but instead of having a |
| 273 | // register reference for the mod/rm field, it's a memory reference. |
Chris Lattner | 1804233 | 2002-11-21 21:03:39 +0000 | [diff] [blame] | 274 | // |
Chris Lattner | 3d3067b | 2002-11-21 20:44:15 +0000 | [diff] [blame] | 275 | assert(isReg(MI->getOperand(0)) && |
| 276 | (MI->getNumOperands() == 1+4 && isMem(MI, 1)) || |
| 277 | (MI->getNumOperands() == 2+4 && isReg(MI->getOperand(1)) && |
| 278 | isMem(MI, 2)) |
| 279 | && "Bad format for MRMDestReg!"); |
| 280 | if (MI->getNumOperands() == 2+4 && |
| 281 | MI->getOperand(0).getReg() != MI->getOperand(1).getReg()) |
| 282 | O << "**"; |
| 283 | |
Chris Lattner | 3d3067b | 2002-11-21 20:44:15 +0000 | [diff] [blame] | 284 | O << getName(MI->getOpCode()) << " "; |
| 285 | printOp(O, MI->getOperand(0), RI); |
| 286 | O << ", <SIZE> PTR "; |
| 287 | printMemReference(O, MI, MI->getNumOperands()-4, RI); |
| 288 | O << "\n"; |
| 289 | return; |
| 290 | } |
| 291 | |
Chris Lattner | 675dd2c | 2002-11-21 17:09:01 +0000 | [diff] [blame] | 292 | case X86II::MRMS0r: case X86II::MRMS1r: |
| 293 | case X86II::MRMS2r: case X86II::MRMS3r: |
| 294 | case X86II::MRMS4r: case X86II::MRMS5r: |
| 295 | case X86II::MRMS6r: case X86II::MRMS7r: { |
Chris Lattner | 675dd2c | 2002-11-21 17:09:01 +0000 | [diff] [blame] | 296 | // In this form, the following are valid formats: |
| 297 | // 1. sete r |
Chris Lattner | 1d53ce4 | 2002-11-21 23:30:00 +0000 | [diff] [blame] | 298 | // 2. cmp reg, immediate |
Chris Lattner | 675dd2c | 2002-11-21 17:09:01 +0000 | [diff] [blame] | 299 | // 2. shl rdest, rinput <implicit CL or 1> |
| 300 | // 3. sbb rdest, rinput, immediate [rdest = rinput] |
| 301 | // |
| 302 | assert(MI->getNumOperands() > 0 && MI->getNumOperands() < 4 && |
| 303 | isReg(MI->getOperand(0)) && "Bad MRMSxR format!"); |
Chris Lattner | 1d53ce4 | 2002-11-21 23:30:00 +0000 | [diff] [blame] | 304 | assert((MI->getNumOperands() != 2 || |
| 305 | isReg(MI->getOperand(1)) || isImmediate(MI->getOperand(1))) && |
Chris Lattner | 675dd2c | 2002-11-21 17:09:01 +0000 | [diff] [blame] | 306 | "Bad MRMSxR format!"); |
Chris Lattner | 1d53ce4 | 2002-11-21 23:30:00 +0000 | [diff] [blame] | 307 | assert((MI->getNumOperands() < 3 || |
| 308 | (isReg(MI->getOperand(1)) && isImmediate(MI->getOperand(2)))) && |
Chris Lattner | 675dd2c | 2002-11-21 17:09:01 +0000 | [diff] [blame] | 309 | "Bad MRMSxR format!"); |
| 310 | |
Chris Lattner | 1d53ce4 | 2002-11-21 23:30:00 +0000 | [diff] [blame] | 311 | if (MI->getNumOperands() > 1 && isReg(MI->getOperand(1)) && |
Chris Lattner | 675dd2c | 2002-11-21 17:09:01 +0000 | [diff] [blame] | 312 | MI->getOperand(0).getReg() != MI->getOperand(1).getReg()) |
| 313 | O << "**"; |
| 314 | |
Chris Lattner | 675dd2c | 2002-11-21 17:09:01 +0000 | [diff] [blame] | 315 | O << getName(MI->getOpCode()) << " "; |
| 316 | printOp(O, MI->getOperand(0), RI); |
Chris Lattner | 1d53ce4 | 2002-11-21 23:30:00 +0000 | [diff] [blame] | 317 | if (isImmediate(MI->getOperand(MI->getNumOperands()-1))) { |
Chris Lattner | 675dd2c | 2002-11-21 17:09:01 +0000 | [diff] [blame] | 318 | O << ", "; |
Chris Lattner | 1d53ce4 | 2002-11-21 23:30:00 +0000 | [diff] [blame] | 319 | printOp(O, MI->getOperand(MI->getNumOperands()-1), RI); |
Chris Lattner | 675dd2c | 2002-11-21 17:09:01 +0000 | [diff] [blame] | 320 | } |
| 321 | O << "\n"; |
| 322 | |
| 323 | return; |
| 324 | } |
| 325 | |
Chris Lattner | f9f6088 | 2002-11-18 06:56:51 +0000 | [diff] [blame] | 326 | default: |
Chris Lattner | 77875d8 | 2002-11-21 02:00:20 +0000 | [diff] [blame] | 327 | O << "\t\t\t-"; MI->print(O, TM); break; |
Chris Lattner | f9f6088 | 2002-11-18 06:56:51 +0000 | [diff] [blame] | 328 | } |
Chris Lattner | 7261408 | 2002-10-25 22:55:53 +0000 | [diff] [blame] | 329 | } |