Rafael Espindola | 7bc59bc | 2006-05-14 22:18:28 +0000 | [diff] [blame^] | 1 | //===- ARMInstrInfo.cpp - ARM Instruction Information -----------*- C++ -*-===// |
| 2 | // |
| 3 | // The LLVM Compiler Infrastructure |
| 4 | // |
| 5 | // This file was developed by the "Instituto Nokia de Tecnologia" and |
| 6 | // is distributed under the University of Illinois Open Source |
| 7 | // License. See LICENSE.TXT for details. |
| 8 | // |
| 9 | //===----------------------------------------------------------------------===// |
| 10 | // |
| 11 | // This file contains the ARM implementation of the TargetInstrInfo class. |
| 12 | // |
| 13 | //===----------------------------------------------------------------------===// |
| 14 | |
| 15 | #include "ARMInstrInfo.h" |
| 16 | #include "ARM.h" |
| 17 | #include "llvm/CodeGen/MachineInstrBuilder.h" |
| 18 | #include "ARMGenInstrInfo.inc" |
| 19 | using namespace llvm; |
| 20 | |
| 21 | ARMInstrInfo::ARMInstrInfo() |
| 22 | : TargetInstrInfo(ARMInsts, sizeof(ARMInsts)/sizeof(ARMInsts[0])) { |
| 23 | } |
| 24 | |
| 25 | /// Return true if the instruction is a register to register move and |
| 26 | /// leave the source and dest operands in the passed parameters. |
| 27 | /// |
| 28 | bool ARMInstrInfo::isMoveInstr(const MachineInstr &MI, |
| 29 | unsigned &SrcReg, unsigned &DstReg) const { |
| 30 | // We look for 3 kinds of patterns here: |
| 31 | // or with G0 or 0 |
| 32 | // add with G0 or 0 |
| 33 | // fmovs or FpMOVD (pseudo double move). |
| 34 | assert(0 && "not implemented"); |
| 35 | return false; |
| 36 | } |
| 37 | |
| 38 | /// isLoadFromStackSlot - If the specified machine instruction is a direct |
| 39 | /// load from a stack slot, return the virtual or physical register number of |
| 40 | /// the destination along with the FrameIndex of the loaded stack slot. If |
| 41 | /// not, return 0. This predicate must return 0 if the instruction has |
| 42 | /// any side effects other than loading from the stack slot. |
| 43 | unsigned ARMInstrInfo::isLoadFromStackSlot(MachineInstr *MI, |
| 44 | int &FrameIndex) const { |
| 45 | assert(0 && "not implemented"); |
| 46 | return 0; |
| 47 | } |
| 48 | |
| 49 | /// isStoreToStackSlot - If the specified machine instruction is a direct |
| 50 | /// store to a stack slot, return the virtual or physical register number of |
| 51 | /// the source reg along with the FrameIndex of the loaded stack slot. If |
| 52 | /// not, return 0. This predicate must return 0 if the instruction has |
| 53 | /// any side effects other than storing to the stack slot. |
| 54 | unsigned ARMInstrInfo::isStoreToStackSlot(MachineInstr *MI, |
| 55 | int &FrameIndex) const { |
| 56 | assert(0 && "not implemented"); |
| 57 | return 0; |
| 58 | } |