Anton Korobeynikov | 4403b93 | 2009-07-16 13:27:25 +0000 | [diff] [blame] | 1 | //===- SystemZInstrInfo.cpp - SystemZ Instruction Information --------------===// |
| 2 | // |
| 3 | // The LLVM Compiler Infrastructure |
| 4 | // |
| 5 | // This file is distributed under the University of Illinois Open Source |
| 6 | // License. See LICENSE.TXT for details. |
| 7 | // |
| 8 | //===----------------------------------------------------------------------===// |
| 9 | // |
| 10 | // This file contains the SystemZ implementation of the TargetInstrInfo class. |
| 11 | // |
| 12 | //===----------------------------------------------------------------------===// |
| 13 | |
| 14 | #include "SystemZ.h" |
Anton Korobeynikov | 4b73016 | 2009-07-16 14:01:27 +0000 | [diff] [blame] | 15 | #include "SystemZInstrBuilder.h" |
Anton Korobeynikov | 4403b93 | 2009-07-16 13:27:25 +0000 | [diff] [blame] | 16 | #include "SystemZInstrInfo.h" |
| 17 | #include "SystemZMachineFunctionInfo.h" |
| 18 | #include "SystemZTargetMachine.h" |
| 19 | #include "SystemZGenInstrInfo.inc" |
| 20 | #include "llvm/Function.h" |
| 21 | #include "llvm/CodeGen/MachineFrameInfo.h" |
| 22 | #include "llvm/CodeGen/MachineInstrBuilder.h" |
| 23 | #include "llvm/CodeGen/MachineRegisterInfo.h" |
| 24 | #include "llvm/CodeGen/PseudoSourceValue.h" |
| 25 | |
| 26 | using namespace llvm; |
| 27 | |
| 28 | SystemZInstrInfo::SystemZInstrInfo(SystemZTargetMachine &tm) |
| 29 | : TargetInstrInfoImpl(SystemZInsts, array_lengthof(SystemZInsts)), |
Anton Korobeynikov | ef5deca | 2009-07-16 13:51:12 +0000 | [diff] [blame] | 30 | RI(tm, *this), TM(tm) { |
| 31 | // Fill the spill offsets map |
| 32 | static const unsigned SpillOffsTab[][2] = { |
| 33 | { SystemZ::R2D, 0x10 }, |
| 34 | { SystemZ::R3D, 0x18 }, |
| 35 | { SystemZ::R4D, 0x20 }, |
| 36 | { SystemZ::R5D, 0x28 }, |
| 37 | { SystemZ::R6D, 0x30 }, |
| 38 | { SystemZ::R7D, 0x38 }, |
| 39 | { SystemZ::R8D, 0x40 }, |
| 40 | { SystemZ::R9D, 0x48 }, |
| 41 | { SystemZ::R10D, 0x50 }, |
| 42 | { SystemZ::R11D, 0x58 }, |
| 43 | { SystemZ::R12D, 0x60 }, |
| 44 | { SystemZ::R13D, 0x68 }, |
| 45 | { SystemZ::R14D, 0x70 }, |
| 46 | { SystemZ::R15D, 0x78 } |
| 47 | }; |
| 48 | |
| 49 | RegSpillOffsets.grow(SystemZ::NUM_TARGET_REGS); |
| 50 | |
| 51 | for (unsigned i = 0, e = array_lengthof(SpillOffsTab); i != e; ++i) |
| 52 | RegSpillOffsets[SpillOffsTab[i][0]] = SpillOffsTab[i][1]; |
| 53 | } |
Anton Korobeynikov | 4403b93 | 2009-07-16 13:27:25 +0000 | [diff] [blame] | 54 | |
| 55 | void SystemZInstrInfo::storeRegToStackSlot(MachineBasicBlock &MBB, |
| 56 | MachineBasicBlock::iterator MI, |
| 57 | unsigned SrcReg, bool isKill, int FrameIdx, |
| 58 | const TargetRegisterClass *RC) const { |
Anton Korobeynikov | 4b73016 | 2009-07-16 14:01:27 +0000 | [diff] [blame] | 59 | DebugLoc DL = DebugLoc::getUnknownLoc(); |
| 60 | if (MI != MBB.end()) DL = MI->getDebugLoc(); |
| 61 | |
| 62 | unsigned Opc = 0; |
| 63 | if (RC == &SystemZ::GR32RegClass || |
| 64 | RC == &SystemZ::ADDR32RegClass) |
| 65 | Opc = SystemZ::MOV32mr; |
| 66 | else if (RC == &SystemZ::GR64RegClass || |
| 67 | RC == &SystemZ::ADDR64RegClass) { |
| 68 | Opc = SystemZ::MOV64mr; |
Anton Korobeynikov | 92ac82a | 2009-07-16 14:21:41 +0000 | [diff] [blame] | 69 | } else if (RC == &SystemZ::FP32RegClass) { |
| 70 | Opc = SystemZ::FMOV32mr; |
| 71 | } else if (RC == &SystemZ::FP64RegClass) { |
| 72 | Opc = SystemZ::FMOV64mr; |
Anton Korobeynikov | 4b73016 | 2009-07-16 14:01:27 +0000 | [diff] [blame] | 73 | } else |
| 74 | assert(0 && "Unsupported regclass to store"); |
| 75 | |
| 76 | addFrameReference(BuildMI(MBB, MI, DL, get(Opc)), FrameIdx) |
| 77 | .addReg(SrcReg, getKillRegState(isKill)); |
Anton Korobeynikov | 4403b93 | 2009-07-16 13:27:25 +0000 | [diff] [blame] | 78 | } |
| 79 | |
| 80 | void SystemZInstrInfo::loadRegFromStackSlot(MachineBasicBlock &MBB, |
| 81 | MachineBasicBlock::iterator MI, |
| 82 | unsigned DestReg, int FrameIdx, |
| 83 | const TargetRegisterClass *RC) const{ |
Anton Korobeynikov | 4b73016 | 2009-07-16 14:01:27 +0000 | [diff] [blame] | 84 | DebugLoc DL = DebugLoc::getUnknownLoc(); |
| 85 | if (MI != MBB.end()) DL = MI->getDebugLoc(); |
| 86 | |
| 87 | unsigned Opc = 0; |
| 88 | if (RC == &SystemZ::GR32RegClass || |
| 89 | RC == &SystemZ::ADDR32RegClass) |
| 90 | Opc = SystemZ::MOV32rm; |
| 91 | else if (RC == &SystemZ::GR64RegClass || |
| 92 | RC == &SystemZ::ADDR64RegClass) { |
| 93 | Opc = SystemZ::MOV64rm; |
Anton Korobeynikov | 92ac82a | 2009-07-16 14:21:41 +0000 | [diff] [blame] | 94 | } else if (RC == &SystemZ::FP32RegClass) { |
| 95 | Opc = SystemZ::FMOV32rm; |
| 96 | } else if (RC == &SystemZ::FP64RegClass) { |
| 97 | Opc = SystemZ::FMOV64rm; |
Anton Korobeynikov | 4b73016 | 2009-07-16 14:01:27 +0000 | [diff] [blame] | 98 | } else |
| 99 | assert(0 && "Unsupported regclass to store"); |
| 100 | |
| 101 | addFrameReference(BuildMI(MBB, MI, DL, get(Opc), DestReg), FrameIdx); |
Anton Korobeynikov | 4403b93 | 2009-07-16 13:27:25 +0000 | [diff] [blame] | 102 | } |
| 103 | |
| 104 | bool SystemZInstrInfo::copyRegToReg(MachineBasicBlock &MBB, |
Anton Korobeynikov | 1cc9dc7 | 2009-07-16 13:29:38 +0000 | [diff] [blame] | 105 | MachineBasicBlock::iterator I, |
| 106 | unsigned DestReg, unsigned SrcReg, |
| 107 | const TargetRegisterClass *DestRC, |
| 108 | const TargetRegisterClass *SrcRC) const { |
| 109 | DebugLoc DL = DebugLoc::getUnknownLoc(); |
| 110 | if (I != MBB.end()) DL = I->getDebugLoc(); |
| 111 | |
Anton Korobeynikov | a51752c | 2009-07-16 13:42:31 +0000 | [diff] [blame] | 112 | // Determine if DstRC and SrcRC have a common superclass. |
| 113 | const TargetRegisterClass *CommonRC = DestRC; |
| 114 | if (DestRC == SrcRC) |
| 115 | /* Same regclass for source and dest */; |
| 116 | else if (CommonRC->hasSuperClass(SrcRC)) |
| 117 | CommonRC = SrcRC; |
| 118 | else if (!CommonRC->hasSubClass(SrcRC)) |
| 119 | CommonRC = 0; |
| 120 | |
| 121 | if (CommonRC) { |
Anton Korobeynikov | 9e4816e | 2009-07-16 13:43:18 +0000 | [diff] [blame] | 122 | if (CommonRC == &SystemZ::GR64RegClass || |
| 123 | CommonRC == &SystemZ::ADDR64RegClass) { |
Anton Korobeynikov | 8d1837d | 2009-07-16 13:56:42 +0000 | [diff] [blame] | 124 | BuildMI(MBB, I, DL, get(SystemZ::MOV64rr), DestReg).addReg(SrcReg); |
Anton Korobeynikov | 9e4816e | 2009-07-16 13:43:18 +0000 | [diff] [blame] | 125 | } else if (CommonRC == &SystemZ::GR32RegClass || |
| 126 | CommonRC == &SystemZ::ADDR32RegClass) { |
Anton Korobeynikov | 8d1837d | 2009-07-16 13:56:42 +0000 | [diff] [blame] | 127 | BuildMI(MBB, I, DL, get(SystemZ::MOV32rr), DestReg).addReg(SrcReg); |
| 128 | } else if (CommonRC == &SystemZ::GR64PRegClass) { |
| 129 | BuildMI(MBB, I, DL, get(SystemZ::MOV64rrP), DestReg).addReg(SrcReg); |
| 130 | } else if (CommonRC == &SystemZ::GR128RegClass) { |
| 131 | BuildMI(MBB, I, DL, get(SystemZ::MOV128rr), DestReg).addReg(SrcReg); |
Anton Korobeynikov | 7aa03ac | 2009-07-16 14:20:24 +0000 | [diff] [blame] | 132 | } else if (CommonRC == &SystemZ::FP32RegClass) { |
| 133 | BuildMI(MBB, I, DL, get(SystemZ::FMOV32rr), DestReg).addReg(SrcReg); |
| 134 | } else if (CommonRC == &SystemZ::FP64RegClass) { |
| 135 | BuildMI(MBB, I, DL, get(SystemZ::FMOV64rr), DestReg).addReg(SrcReg); |
Anton Korobeynikov | 1cc9dc7 | 2009-07-16 13:29:38 +0000 | [diff] [blame] | 136 | } else { |
| 137 | return false; |
| 138 | } |
| 139 | |
Anton Korobeynikov | 1cc9dc7 | 2009-07-16 13:29:38 +0000 | [diff] [blame] | 140 | return true; |
| 141 | } |
| 142 | |
Anton Korobeynikov | 9e4816e | 2009-07-16 13:43:18 +0000 | [diff] [blame] | 143 | if ((SrcRC == &SystemZ::GR64RegClass && |
| 144 | DestRC == &SystemZ::ADDR64RegClass) || |
| 145 | (DestRC == &SystemZ::GR64RegClass && |
| 146 | SrcRC == &SystemZ::ADDR64RegClass)) { |
| 147 | BuildMI(MBB, I, DL, get(SystemZ::MOV64rr), DestReg).addReg(SrcReg); |
| 148 | return true; |
| 149 | } else if ((SrcRC == &SystemZ::GR32RegClass && |
| 150 | DestRC == &SystemZ::ADDR32RegClass) || |
| 151 | (DestRC == &SystemZ::GR32RegClass && |
| 152 | SrcRC == &SystemZ::ADDR32RegClass)) { |
| 153 | BuildMI(MBB, I, DL, get(SystemZ::MOV32rr), DestReg).addReg(SrcReg); |
| 154 | return true; |
| 155 | } |
| 156 | |
Anton Korobeynikov | 4403b93 | 2009-07-16 13:27:25 +0000 | [diff] [blame] | 157 | return false; |
| 158 | } |
| 159 | |
| 160 | bool |
| 161 | SystemZInstrInfo::isMoveInstr(const MachineInstr& MI, |
Anton Korobeynikov | 1cc9dc7 | 2009-07-16 13:29:38 +0000 | [diff] [blame] | 162 | unsigned &SrcReg, unsigned &DstReg, |
| 163 | unsigned &SrcSubIdx, unsigned &DstSubIdx) const { |
Anton Korobeynikov | 1cc9dc7 | 2009-07-16 13:29:38 +0000 | [diff] [blame] | 164 | switch (MI.getOpcode()) { |
| 165 | default: |
| 166 | return false; |
Anton Korobeynikov | a51752c | 2009-07-16 13:42:31 +0000 | [diff] [blame] | 167 | case SystemZ::MOV32rr: |
Anton Korobeynikov | 1cc9dc7 | 2009-07-16 13:29:38 +0000 | [diff] [blame] | 168 | case SystemZ::MOV64rr: |
Anton Korobeynikov | 8d1837d | 2009-07-16 13:56:42 +0000 | [diff] [blame] | 169 | case SystemZ::MOV64rrP: |
| 170 | case SystemZ::MOV128rr: |
Anton Korobeynikov | 7aa03ac | 2009-07-16 14:20:24 +0000 | [diff] [blame] | 171 | case SystemZ::FMOV32rr: |
| 172 | case SystemZ::FMOV64rr: |
Anton Korobeynikov | 1cc9dc7 | 2009-07-16 13:29:38 +0000 | [diff] [blame] | 173 | assert(MI.getNumOperands() >= 2 && |
| 174 | MI.getOperand(0).isReg() && |
| 175 | MI.getOperand(1).isReg() && |
| 176 | "invalid register-register move instruction"); |
| 177 | SrcReg = MI.getOperand(1).getReg(); |
| 178 | DstReg = MI.getOperand(0).getReg(); |
Anton Korobeynikov | 54cea74 | 2009-07-16 14:12:54 +0000 | [diff] [blame] | 179 | SrcSubIdx = MI.getOperand(1).getSubReg(); |
| 180 | DstSubIdx = MI.getOperand(0).getSubReg(); |
Anton Korobeynikov | 1cc9dc7 | 2009-07-16 13:29:38 +0000 | [diff] [blame] | 181 | return true; |
| 182 | } |
Anton Korobeynikov | 4403b93 | 2009-07-16 13:27:25 +0000 | [diff] [blame] | 183 | } |
| 184 | |
| 185 | bool |
| 186 | SystemZInstrInfo::spillCalleeSavedRegisters(MachineBasicBlock &MBB, |
| 187 | MachineBasicBlock::iterator MI, |
| 188 | const std::vector<CalleeSavedInfo> &CSI) const { |
Anton Korobeynikov | ef5deca | 2009-07-16 13:51:12 +0000 | [diff] [blame] | 189 | DebugLoc DL = DebugLoc::getUnknownLoc(); |
| 190 | if (MI != MBB.end()) DL = MI->getDebugLoc(); |
Anton Korobeynikov | ba249e4 | 2009-07-16 13:50:21 +0000 | [diff] [blame] | 191 | |
| 192 | MachineFunction &MF = *MBB.getParent(); |
| 193 | SystemZMachineFunctionInfo *MFI = MF.getInfo<SystemZMachineFunctionInfo>(); |
| 194 | MFI->setCalleeSavedFrameSize(CSI.size() * 8); |
| 195 | |
Anton Korobeynikov | ef5deca | 2009-07-16 13:51:12 +0000 | [diff] [blame] | 196 | // Scan the callee-saved and find the bounds of register spill area. |
| 197 | unsigned LowReg = 0, HighReg = 0, StartOffset = -1U, EndOffset = 0; |
| 198 | for (unsigned i = 0, e = CSI.size(); i != e; ++i) { |
| 199 | unsigned Reg = CSI[i].getReg(); |
| 200 | unsigned Offset = RegSpillOffsets[Reg]; |
| 201 | if (StartOffset > Offset) { |
| 202 | LowReg = Reg; StartOffset = Offset; |
| 203 | } |
| 204 | if (EndOffset < Offset) { |
| 205 | HighReg = Reg; EndOffset = RegSpillOffsets[Reg]; |
| 206 | } |
| 207 | } |
| 208 | |
| 209 | // Save information for epilogue inserter. |
| 210 | MFI->setLowReg(LowReg); MFI->setHighReg(HighReg); |
| 211 | |
| 212 | // Build a store instruction. Use STORE MULTIPLE instruction if there are many |
| 213 | // registers to store, otherwise - just STORE. |
| 214 | MachineInstrBuilder MIB = |
| 215 | BuildMI(MBB, MI, DL, get((LowReg == HighReg ? |
| 216 | SystemZ::MOV64mr : SystemZ::MOV64mrm))); |
| 217 | |
| 218 | // Add store operands. |
| 219 | MIB.addReg(SystemZ::R15D).addImm(StartOffset); |
| 220 | if (LowReg == HighReg) |
| 221 | MIB.addReg(0); |
| 222 | MIB.addReg(LowReg, RegState::Kill); |
| 223 | if (LowReg != HighReg) |
| 224 | MIB.addReg(HighReg, RegState::Kill); |
| 225 | |
| 226 | // Do a second scan adding regs as being killed by instruction |
| 227 | for (unsigned i = 0, e = CSI.size(); i != e; ++i) { |
| 228 | unsigned Reg = CSI[i].getReg(); |
| 229 | // Add the callee-saved register as live-in. It's killed at the spill. |
| 230 | MBB.addLiveIn(Reg); |
| 231 | if (Reg != LowReg && Reg != HighReg) |
| 232 | MIB.addReg(Reg, RegState::ImplicitKill); |
| 233 | } |
| 234 | |
Anton Korobeynikov | ba249e4 | 2009-07-16 13:50:21 +0000 | [diff] [blame] | 235 | return true; |
Anton Korobeynikov | 4403b93 | 2009-07-16 13:27:25 +0000 | [diff] [blame] | 236 | } |
| 237 | |
| 238 | bool |
| 239 | SystemZInstrInfo::restoreCalleeSavedRegisters(MachineBasicBlock &MBB, |
| 240 | MachineBasicBlock::iterator MI, |
| 241 | const std::vector<CalleeSavedInfo> &CSI) const { |
Anton Korobeynikov | ef5deca | 2009-07-16 13:51:12 +0000 | [diff] [blame] | 242 | if (CSI.empty()) |
| 243 | return false; |
| 244 | |
| 245 | DebugLoc DL = DebugLoc::getUnknownLoc(); |
| 246 | if (MI != MBB.end()) DL = MI->getDebugLoc(); |
| 247 | |
| 248 | MachineFunction &MF = *MBB.getParent(); |
| 249 | const TargetRegisterInfo *RegInfo= MF.getTarget().getRegisterInfo(); |
| 250 | SystemZMachineFunctionInfo *MFI = MF.getInfo<SystemZMachineFunctionInfo>(); |
| 251 | |
| 252 | unsigned LowReg = MFI->getLowReg(), HighReg = MFI->getHighReg(); |
| 253 | unsigned StartOffset = RegSpillOffsets[LowReg]; |
| 254 | |
| 255 | // Build a load instruction. Use LOAD MULTIPLE instruction if there are many |
| 256 | // registers to load, otherwise - just LOAD. |
| 257 | MachineInstrBuilder MIB = |
| 258 | BuildMI(MBB, MI, DL, get((LowReg == HighReg ? |
| 259 | SystemZ::MOV64rm : SystemZ::MOV64rmm))); |
| 260 | // Add store operands. |
| 261 | MIB.addReg(LowReg, RegState::Define); |
| 262 | if (LowReg != HighReg) |
| 263 | MIB.addReg(HighReg, RegState::Define); |
| 264 | |
| 265 | MIB.addReg((RegInfo->hasFP(MF) ? SystemZ::R11D : SystemZ::R15D)); |
| 266 | MIB.addImm(StartOffset); |
| 267 | if (LowReg == HighReg) |
| 268 | MIB.addReg(0); |
| 269 | |
| 270 | // Do a second scan adding regs as being defined by instruction |
| 271 | for (unsigned i = 0, e = CSI.size(); i != e; ++i) { |
| 272 | unsigned Reg = CSI[i].getReg(); |
| 273 | if (Reg != LowReg && Reg != HighReg) |
| 274 | MIB.addReg(Reg, RegState::ImplicitDefine); |
| 275 | } |
| 276 | |
Anton Korobeynikov | ba249e4 | 2009-07-16 13:50:21 +0000 | [diff] [blame] | 277 | return true; |
Anton Korobeynikov | 4403b93 | 2009-07-16 13:27:25 +0000 | [diff] [blame] | 278 | } |
| 279 | |
| 280 | unsigned |
| 281 | SystemZInstrInfo::InsertBranch(MachineBasicBlock &MBB, MachineBasicBlock *TBB, |
Anton Korobeynikov | 9b812b0 | 2009-07-16 14:16:26 +0000 | [diff] [blame] | 282 | MachineBasicBlock *FBB, |
Anton Korobeynikov | 4403b93 | 2009-07-16 13:27:25 +0000 | [diff] [blame] | 283 | const SmallVectorImpl<MachineOperand> &Cond) const { |
Anton Korobeynikov | 9b812b0 | 2009-07-16 14:16:26 +0000 | [diff] [blame] | 284 | // FIXME: this should probably have a DebugLoc operand |
Anton Korobeynikov | 64d52d4 | 2009-07-16 14:00:10 +0000 | [diff] [blame] | 285 | DebugLoc dl = DebugLoc::getUnknownLoc(); |
| 286 | // Shouldn't be a fall through. |
| 287 | assert(TBB && "InsertBranch must not be told to insert a fallthrough"); |
| 288 | assert((Cond.size() == 1 || Cond.size() == 0) && |
| 289 | "SystemZ branch conditions have one component!"); |
Anton Korobeynikov | 4403b93 | 2009-07-16 13:27:25 +0000 | [diff] [blame] | 290 | |
Anton Korobeynikov | 64d52d4 | 2009-07-16 14:00:10 +0000 | [diff] [blame] | 291 | if (Cond.empty()) { |
| 292 | // Unconditional branch? |
| 293 | assert(!FBB && "Unconditional branch with multiple successors!"); |
| 294 | BuildMI(&MBB, dl, get(SystemZ::JMP)).addMBB(TBB); |
| 295 | return 1; |
| 296 | } |
| 297 | |
| 298 | // Conditional branch. |
| 299 | unsigned Count = 0; |
| 300 | SystemZCC::CondCodes CC = (SystemZCC::CondCodes)Cond[0].getImm(); |
| 301 | BuildMI(&MBB, dl, getBrCond(CC)).addMBB(TBB); |
| 302 | ++Count; |
| 303 | |
| 304 | if (FBB) { |
| 305 | // Two-way Conditional branch. Insert the second branch. |
| 306 | BuildMI(&MBB, dl, get(SystemZ::JMP)).addMBB(FBB); |
| 307 | ++Count; |
| 308 | } |
| 309 | return Count; |
Anton Korobeynikov | 4403b93 | 2009-07-16 13:27:25 +0000 | [diff] [blame] | 310 | } |
Anton Korobeynikov | 7d1e39b | 2009-07-16 13:52:51 +0000 | [diff] [blame] | 311 | |
| 312 | const TargetInstrDesc& |
| 313 | SystemZInstrInfo::getBrCond(SystemZCC::CondCodes CC) const { |
| 314 | unsigned Opc; |
| 315 | switch (CC) { |
| 316 | default: |
| 317 | assert(0 && "Unknown condition code!"); |
| 318 | case SystemZCC::E: |
| 319 | Opc = SystemZ::JE; |
| 320 | break; |
| 321 | case SystemZCC::NE: |
| 322 | Opc = SystemZ::JNE; |
| 323 | break; |
| 324 | case SystemZCC::H: |
| 325 | Opc = SystemZ::JH; |
| 326 | break; |
| 327 | case SystemZCC::L: |
| 328 | Opc = SystemZ::JL; |
| 329 | break; |
| 330 | case SystemZCC::HE: |
| 331 | Opc = SystemZ::JHE; |
| 332 | break; |
| 333 | case SystemZCC::LE: |
| 334 | Opc = SystemZ::JLE; |
| 335 | break; |
| 336 | } |
| 337 | |
| 338 | return get(Opc); |
| 339 | } |
Anton Korobeynikov | 5a11e02 | 2009-07-16 14:09:56 +0000 | [diff] [blame] | 340 | |
| 341 | const TargetInstrDesc& |
| 342 | SystemZInstrInfo::getLongDispOpc(unsigned Opc) const { |
| 343 | switch (Opc) { |
| 344 | case SystemZ::MOV32mr: |
| 345 | Opc = SystemZ::MOV32mry; |
| 346 | break; |
| 347 | case SystemZ::MOV32rm: |
| 348 | Opc = SystemZ::MOV32rmy; |
| 349 | break; |
| 350 | case SystemZ::MOVSX32rm16: |
| 351 | Opc = SystemZ::MOVSX32rm16y; |
| 352 | break; |
| 353 | case SystemZ::MOV32m8r: |
| 354 | Opc = SystemZ::MOV32m8ry; |
| 355 | break; |
| 356 | case SystemZ::MOV32m16r: |
| 357 | Opc = SystemZ::MOV32m16ry; |
| 358 | break; |
| 359 | case SystemZ::MOV64m8r: |
| 360 | Opc = SystemZ::MOV64m8ry; |
| 361 | break; |
| 362 | case SystemZ::MOV64m16r: |
| 363 | Opc = SystemZ::MOV64m16ry; |
| 364 | break; |
| 365 | case SystemZ::MOV64m32r: |
| 366 | Opc = SystemZ::MOV64m32ry; |
| 367 | break; |
Anton Korobeynikov | 1ed1e3e | 2009-07-16 14:10:17 +0000 | [diff] [blame] | 368 | case SystemZ::MOV8mi: |
| 369 | Opc = SystemZ::MOV8miy; |
| 370 | break; |
Anton Korobeynikov | 5a11e02 | 2009-07-16 14:09:56 +0000 | [diff] [blame] | 371 | case SystemZ::MUL32rm: |
| 372 | Opc = SystemZ::MUL32rmy; |
| 373 | break; |
| 374 | case SystemZ::CMP32rm: |
| 375 | Opc = SystemZ::CMP32rmy; |
| 376 | break; |
| 377 | case SystemZ::UCMP32rm: |
| 378 | Opc = SystemZ::UCMP32rmy; |
| 379 | break; |
Anton Korobeynikov | 92ac82a | 2009-07-16 14:21:41 +0000 | [diff] [blame] | 380 | case SystemZ::FMOV32mr: |
| 381 | Opc = SystemZ::FMOV32mry; |
| 382 | break; |
| 383 | case SystemZ::FMOV64mr: |
| 384 | Opc = SystemZ::FMOV64mry; |
| 385 | break; |
Anton Korobeynikov | 5a11e02 | 2009-07-16 14:09:56 +0000 | [diff] [blame] | 386 | default: |
| 387 | break; |
| 388 | } |
| 389 | |
| 390 | return get(Opc); |
| 391 | } |
| 392 | |