2012-02-18 13:03:15 +01:00
|
|
|
//===-- Thumb1InstrInfo.h - Thumb-1 Instruction Information -----*- C++ -*-===//
|
2009-06-26 23:28:53 +02:00
|
|
|
//
|
|
|
|
// The LLVM Compiler Infrastructure
|
|
|
|
//
|
|
|
|
// This file is distributed under the University of Illinois Open Source
|
|
|
|
// License. See LICENSE.TXT for details.
|
|
|
|
//
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
//
|
2009-07-03 00:18:33 +02:00
|
|
|
// This file contains the Thumb-1 implementation of the TargetInstrInfo class.
|
2009-06-26 23:28:53 +02:00
|
|
|
//
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
|
2009-07-03 00:18:33 +02:00
|
|
|
#ifndef THUMB1INSTRUCTIONINFO_H
|
|
|
|
#define THUMB1INSTRUCTIONINFO_H
|
2009-06-26 23:28:53 +02:00
|
|
|
|
|
|
|
#include "ARM.h"
|
2012-03-17 08:33:42 +01:00
|
|
|
#include "ARMBaseInstrInfo.h"
|
2009-07-03 00:18:33 +02:00
|
|
|
#include "Thumb1RegisterInfo.h"
|
2009-06-26 23:28:53 +02:00
|
|
|
|
|
|
|
namespace llvm {
|
|
|
|
class ARMSubtarget;
|
|
|
|
|
2009-07-03 00:18:33 +02:00
|
|
|
class Thumb1InstrInfo : public ARMBaseInstrInfo {
|
|
|
|
Thumb1RegisterInfo RI;
|
2009-06-26 23:28:53 +02:00
|
|
|
public:
|
2009-07-03 00:18:33 +02:00
|
|
|
explicit Thumb1InstrInfo(const ARMSubtarget &STI);
|
2009-06-26 23:28:53 +02:00
|
|
|
|
2012-02-29 00:53:30 +01:00
|
|
|
/// getNoopForMachoTarget - Return the noop instruction to use for a noop.
|
|
|
|
void getNoopForMachoTarget(MCInst &NopInst) const;
|
|
|
|
|
2009-07-08 18:09:28 +02:00
|
|
|
// Return the non-pre/post incrementing version of 'Opc'. Return 0
|
|
|
|
// if there is not such an opcode.
|
|
|
|
unsigned getUnindexedOpcode(unsigned Opc) const;
|
|
|
|
|
2009-06-27 14:16:40 +02:00
|
|
|
/// getRegisterInfo - TargetInstrInfo is a superset of MRegister info. As
|
|
|
|
/// such, whenever a client has an instance of instruction info, it should
|
|
|
|
/// always be able to get register info as well (through this method).
|
|
|
|
///
|
2009-07-03 00:18:33 +02:00
|
|
|
const Thumb1RegisterInfo &getRegisterInfo() const { return RI; }
|
2009-06-27 14:16:40 +02:00
|
|
|
|
2010-07-11 08:33:54 +02:00
|
|
|
void copyPhysReg(MachineBasicBlock &MBB,
|
|
|
|
MachineBasicBlock::iterator I, DebugLoc DL,
|
|
|
|
unsigned DestReg, unsigned SrcReg,
|
|
|
|
bool KillSrc) const;
|
2009-07-03 00:18:33 +02:00
|
|
|
void storeRegToStackSlot(MachineBasicBlock &MBB,
|
2010-10-16 00:49:28 +02:00
|
|
|
MachineBasicBlock::iterator MBBI,
|
|
|
|
unsigned SrcReg, bool isKill, int FrameIndex,
|
2010-05-06 21:06:44 +02:00
|
|
|
const TargetRegisterClass *RC,
|
|
|
|
const TargetRegisterInfo *TRI) const;
|
2009-06-26 23:28:53 +02:00
|
|
|
|
2009-07-03 00:18:33 +02:00
|
|
|
void loadRegFromStackSlot(MachineBasicBlock &MBB,
|
2010-10-16 00:49:28 +02:00
|
|
|
MachineBasicBlock::iterator MBBI,
|
|
|
|
unsigned DestReg, int FrameIndex,
|
2010-05-06 21:06:44 +02:00
|
|
|
const TargetRegisterClass *RC,
|
|
|
|
const TargetRegisterInfo *TRI) const;
|
2009-06-26 23:28:53 +02:00
|
|
|
|
|
|
|
};
|
|
|
|
}
|
|
|
|
|
2009-07-03 00:18:33 +02:00
|
|
|
#endif // THUMB1INSTRUCTIONINFO_H
|