blob: 90f34ea08401397a6d2f97d0f49b916e8d5d254a [file] [log] [blame]
Jia Liub22310f2012-02-18 12:03:15 +00001//===-- ARMInstrInfo.h - ARM Instruction Information ------------*- C++ -*-===//
Rafael Espindolaffdc24b2006-05-14 22:18:28 +00002//
3// The LLVM Compiler Infrastructure
4//
Chris Lattnerf3ebc3f2007-12-29 20:36:04 +00005// This file is distributed under the University of Illinois Open Source
Rafael Espindolaffdc24b2006-05-14 22:18:28 +00006// License. See LICENSE.TXT for details.
7//
8//===----------------------------------------------------------------------===//
9//
10// This file contains the ARM implementation of the TargetInstrInfo class.
11//
12//===----------------------------------------------------------------------===//
13
Benjamin Kramera7c40ef2014-08-13 16:26:38 +000014#ifndef LLVM_LIB_TARGET_ARM_ARMINSTRINFO_H
15#define LLVM_LIB_TARGET_ARM_ARMINSTRINFO_H
Rafael Espindolaffdc24b2006-05-14 22:18:28 +000016
David Goodwinaf7451b2009-07-08 16:09:28 +000017#include "ARMBaseInstrInfo.h"
Rafael Espindolaffdc24b2006-05-14 22:18:28 +000018#include "ARMRegisterInfo.h"
19
20namespace llvm {
Evan Cheng10043e22007-01-19 07:51:42 +000021 class ARMSubtarget;
22
David Goodwinade05a32009-07-02 22:18:33 +000023class ARMInstrInfo : public ARMBaseInstrInfo {
24 ARMRegisterInfo RI;
25public:
26 explicit ARMInstrInfo(const ARMSubtarget &STI);
27
Jim Grosbach617f84dd2012-02-28 23:53:30 +000028 /// getNoopForMachoTarget - Return the noop instruction to use for a noop.
Craig Topper6bc27bf2014-03-10 02:09:33 +000029 void getNoopForMachoTarget(MCInst &NopInst) const override;
Jim Grosbach617f84dd2012-02-28 23:53:30 +000030
David Goodwinaf7451b2009-07-08 16:09:28 +000031 // Return the non-pre/post incrementing version of 'Opc'. Return 0
32 // if there is not such an opcode.
Craig Topper6bc27bf2014-03-10 02:09:33 +000033 unsigned getUnindexedOpcode(unsigned Opc) const override;
David Goodwinaf7451b2009-07-08 16:09:28 +000034
David Goodwinade05a32009-07-02 22:18:33 +000035 /// getRegisterInfo - TargetInstrInfo is a superset of MRegister info. As
36 /// such, whenever a client has an instance of instruction info, it should
37 /// always be able to get register info as well (through this method).
38 ///
Craig Topper6bc27bf2014-03-10 02:09:33 +000039 const ARMRegisterInfo &getRegisterInfo() const override { return RI; }
Akira Hatanakae5b6e0d2014-07-25 19:31:34 +000040
41private:
42 void expandLoadStackGuard(MachineBasicBlock::iterator MI,
43 Reloc::Model RM) const override;
Rafael Espindolaffdc24b2006-05-14 22:18:28 +000044};
45
Alexander Kornienkof00654e2015-06-23 09:49:53 +000046}
Rafael Espindolaffdc24b2006-05-14 22:18:28 +000047
48#endif