1234353Sdim//===-- Thumb1InstrInfo.h - Thumb-1 Instruction Information -----*- C++ -*-===// 2195340Sed// 3195340Sed// The LLVM Compiler Infrastructure 4195340Sed// 5195340Sed// This file is distributed under the University of Illinois Open Source 6195340Sed// License. See LICENSE.TXT for details. 7195340Sed// 8195340Sed//===----------------------------------------------------------------------===// 9195340Sed// 10195340Sed// This file contains the Thumb-1 implementation of the TargetInstrInfo class. 11195340Sed// 12195340Sed//===----------------------------------------------------------------------===// 13195340Sed 14195340Sed#ifndef THUMB1INSTRUCTIONINFO_H 15195340Sed#define THUMB1INSTRUCTIONINFO_H 16195340Sed 17195340Sed#include "ARM.h" 18234353Sdim#include "ARMBaseInstrInfo.h" 19195340Sed#include "Thumb1RegisterInfo.h" 20195340Sed 21195340Sednamespace llvm { 22195340Sed class ARMSubtarget; 23195340Sed 24195340Sedclass Thumb1InstrInfo : public ARMBaseInstrInfo { 25195340Sed Thumb1RegisterInfo RI; 26195340Sedpublic: 27195340Sed explicit Thumb1InstrInfo(const ARMSubtarget &STI); 28195340Sed 29234353Sdim /// getNoopForMachoTarget - Return the noop instruction to use for a noop. 30234353Sdim void getNoopForMachoTarget(MCInst &NopInst) const; 31234353Sdim 32198090Srdivacky // Return the non-pre/post incrementing version of 'Opc'. Return 0 33198090Srdivacky // if there is not such an opcode. 34198090Srdivacky unsigned getUnindexedOpcode(unsigned Opc) const; 35198090Srdivacky 36195340Sed /// getRegisterInfo - TargetInstrInfo is a superset of MRegister info. As 37195340Sed /// such, whenever a client has an instance of instruction info, it should 38195340Sed /// always be able to get register info as well (through this method). 39195340Sed /// 40195340Sed const Thumb1RegisterInfo &getRegisterInfo() const { return RI; } 41195340Sed 42210299Sed void copyPhysReg(MachineBasicBlock &MBB, 43210299Sed MachineBasicBlock::iterator I, DebugLoc DL, 44210299Sed unsigned DestReg, unsigned SrcReg, 45210299Sed bool KillSrc) const; 46195340Sed void storeRegToStackSlot(MachineBasicBlock &MBB, 47218893Sdim MachineBasicBlock::iterator MBBI, 48218893Sdim unsigned SrcReg, bool isKill, int FrameIndex, 49208599Srdivacky const TargetRegisterClass *RC, 50208599Srdivacky const TargetRegisterInfo *TRI) const; 51195340Sed 52195340Sed void loadRegFromStackSlot(MachineBasicBlock &MBB, 53218893Sdim MachineBasicBlock::iterator MBBI, 54218893Sdim unsigned DestReg, int FrameIndex, 55208599Srdivacky const TargetRegisterClass *RC, 56208599Srdivacky const TargetRegisterInfo *TRI) const; 57195340Sed 58195340Sed}; 59195340Sed} 60195340Sed 61195340Sed#endif // THUMB1INSTRUCTIONINFO_H 62