2012-02-18 20:03:15 +08:00
|
|
|
//===-- Thumb1InstrInfo.h - Thumb-1 Instruction Information -----*- C++ -*-===//
|
2009-06-27 05:28:53 +08: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 06:18:33 +08:00
|
|
|
// This file contains the Thumb-1 implementation of the TargetInstrInfo class.
|
2009-06-27 05:28:53 +08:00
|
|
|
//
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
|
2014-08-14 00:26:38 +08:00
|
|
|
#ifndef LLVM_LIB_TARGET_ARM_THUMB1INSTRINFO_H
|
|
|
|
#define LLVM_LIB_TARGET_ARM_THUMB1INSTRINFO_H
|
2009-06-27 05:28:53 +08:00
|
|
|
|
2012-03-17 15:33:42 +08:00
|
|
|
#include "ARMBaseInstrInfo.h"
|
2015-03-13 06:48:50 +08:00
|
|
|
#include "ThumbRegisterInfo.h"
|
2009-06-27 05:28:53 +08:00
|
|
|
|
|
|
|
namespace llvm {
|
|
|
|
class ARMSubtarget;
|
|
|
|
|
2009-07-03 06:18:33 +08:00
|
|
|
class Thumb1InstrInfo : public ARMBaseInstrInfo {
|
2015-03-13 06:48:50 +08:00
|
|
|
ThumbRegisterInfo RI;
|
2009-06-27 05:28:53 +08:00
|
|
|
public:
|
2009-07-03 06:18:33 +08:00
|
|
|
explicit Thumb1InstrInfo(const ARMSubtarget &STI);
|
2009-06-27 05:28:53 +08:00
|
|
|
|
2012-02-29 07:53:30 +08:00
|
|
|
/// getNoopForMachoTarget - Return the noop instruction to use for a noop.
|
2014-03-10 10:09:33 +08:00
|
|
|
void getNoopForMachoTarget(MCInst &NopInst) const override;
|
2012-02-29 07:53:30 +08:00
|
|
|
|
2009-07-09 00:09:28 +08:00
|
|
|
// Return the non-pre/post incrementing version of 'Opc'. Return 0
|
|
|
|
// if there is not such an opcode.
|
2014-03-10 10:09:33 +08:00
|
|
|
unsigned getUnindexedOpcode(unsigned Opc) const override;
|
2009-07-09 00:09:28 +08:00
|
|
|
|
2009-06-27 20:16:40 +08: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).
|
|
|
|
///
|
2015-03-13 06:48:50 +08:00
|
|
|
const ThumbRegisterInfo &getRegisterInfo() const override { return RI; }
|
2009-06-27 20:16:40 +08:00
|
|
|
|
2010-07-11 14:33:54 +08:00
|
|
|
void copyPhysReg(MachineBasicBlock &MBB,
|
|
|
|
MachineBasicBlock::iterator I, DebugLoc DL,
|
|
|
|
unsigned DestReg, unsigned SrcReg,
|
2014-03-10 10:09:33 +08:00
|
|
|
bool KillSrc) const override;
|
2009-07-03 06:18:33 +08:00
|
|
|
void storeRegToStackSlot(MachineBasicBlock &MBB,
|
2010-10-16 06:49:28 +08:00
|
|
|
MachineBasicBlock::iterator MBBI,
|
|
|
|
unsigned SrcReg, bool isKill, int FrameIndex,
|
2010-05-07 03:06:44 +08:00
|
|
|
const TargetRegisterClass *RC,
|
2014-03-10 10:09:33 +08:00
|
|
|
const TargetRegisterInfo *TRI) const override;
|
2009-06-27 05:28:53 +08:00
|
|
|
|
2009-07-03 06:18:33 +08:00
|
|
|
void loadRegFromStackSlot(MachineBasicBlock &MBB,
|
2010-10-16 06:49:28 +08:00
|
|
|
MachineBasicBlock::iterator MBBI,
|
|
|
|
unsigned DestReg, int FrameIndex,
|
2010-05-07 03:06:44 +08:00
|
|
|
const TargetRegisterClass *RC,
|
2014-03-10 10:09:33 +08:00
|
|
|
const TargetRegisterInfo *TRI) const override;
|
2009-06-27 05:28:53 +08:00
|
|
|
|
2014-07-26 03:31:34 +08:00
|
|
|
private:
|
|
|
|
void expandLoadStackGuard(MachineBasicBlock::iterator MI,
|
|
|
|
Reloc::Model RM) const override;
|
2009-06-27 05:28:53 +08:00
|
|
|
};
|
2015-06-23 17:49:53 +08:00
|
|
|
}
|
2009-06-27 05:28:53 +08:00
|
|
|
|
2014-08-14 00:26:38 +08:00
|
|
|
#endif
|