1 //===- ZPUInstrInfo.cpp - ZPU Instruction Information ---------*- C++ -*-===//
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 ZPU implementation of the TargetInstrInfo class.
12 //===----------------------------------------------------------------------===//
14 #include "ZPUInstrInfo.h"
15 #include "ZPUTargetMachine.h"
16 #include "llvm/ADT/STLExtras.h"
17 #include "llvm/CodeGen/MachineInstrBuilder.h"
18 #include "llvm/CodeGen/MachineRegisterInfo.h"
19 #include "llvm/Support/ErrorHandling.h"
20 #include "ZPUGenInstrInfo.inc"
24 ZPUInstrInfo::ZPUInstrInfo(ZPUTargetMachine
&tm
)
25 : TargetInstrInfoImpl(ZPUInsts
, array_lengthof(ZPUInsts
)),
29 /// isLoadFromStackSlot - If the specified machine instruction is a direct
30 /// load from a stack slot, return the virtual or physical register number of
31 /// the destination along with the FrameIndex of the loaded stack slot. If
32 /// not, return 0. This predicate must return 0 if the instruction has
33 /// any side effects other than loading from the stack slot.
34 unsigned ZPUInstrInfo::
35 isLoadFromStackSlot(const MachineInstr
*MI
, int &FrameIndex
) const
40 /// isStoreToStackSlot - If the specified machine instruction is a direct
41 /// store to a stack slot, return the virtual or physical register number of
42 /// the source reg along with the FrameIndex of the loaded stack slot. If
43 /// not, return 0. This predicate must return 0 if the instruction has
44 /// any side effects other than storing to the stack slot.
45 unsigned ZPUInstrInfo::
46 isStoreToStackSlot(const MachineInstr
*MI
, int &FrameIndex
) const
51 /// insertNoop - If data hazard condition is found insert the target nop
54 insertNoop(MachineBasicBlock
&MBB
, MachineBasicBlock::iterator MI
) const
56 llvm_unreachable("not implemented");
60 copyPhysReg(MachineBasicBlock
&MBB
,
61 MachineBasicBlock::iterator I
, DebugLoc DL
,
62 unsigned DestReg
, unsigned SrcReg
,
65 llvm_unreachable("not implemented");
69 storeRegToStackSlot(MachineBasicBlock
&MBB
, MachineBasicBlock::iterator I
,
70 unsigned SrcReg
, bool isKill
, int FI
,
71 const TargetRegisterClass
*RC
,
72 const TargetRegisterInfo
*TRI
) const
74 llvm_unreachable("not implemented");
78 loadRegFromStackSlot(MachineBasicBlock
&MBB
, MachineBasicBlock::iterator I
,
79 unsigned DestReg
, int FI
,
80 const TargetRegisterClass
*RC
,
81 const TargetRegisterInfo
*TRI
) const
83 llvm_unreachable("not implemented");