Jia Liu | b22310f | 2012-02-18 12:03:15 +0000 | [diff] [blame] | 1 | //===-- ARMInstrInfo.h - ARM Instruction Information ------------*- C++ -*-===// |
Rafael Espindola | ffdc24b | 2006-05-14 22:18:28 +0000 | [diff] [blame] | 2 | // |
| 3 | // The LLVM Compiler Infrastructure |
| 4 | // |
Chris Lattner | f3ebc3f | 2007-12-29 20:36:04 +0000 | [diff] [blame] | 5 | // This file is distributed under the University of Illinois Open Source |
Rafael Espindola | ffdc24b | 2006-05-14 22:18:28 +0000 | [diff] [blame] | 6 | // License. See LICENSE.TXT for details. |
| 7 | // |
| 8 | //===----------------------------------------------------------------------===// |
| 9 | // |
| 10 | // This file contains the ARM implementation of the TargetInstrInfo class. |
| 11 | // |
| 12 | //===----------------------------------------------------------------------===// |
| 13 | |
Benjamin Kramer | a7c40ef | 2014-08-13 16:26:38 +0000 | [diff] [blame] | 14 | #ifndef LLVM_LIB_TARGET_ARM_ARMINSTRINFO_H |
| 15 | #define LLVM_LIB_TARGET_ARM_ARMINSTRINFO_H |
Rafael Espindola | ffdc24b | 2006-05-14 22:18:28 +0000 | [diff] [blame] | 16 | |
David Goodwin | af7451b | 2009-07-08 16:09:28 +0000 | [diff] [blame] | 17 | #include "ARMBaseInstrInfo.h" |
Rafael Espindola | ffdc24b | 2006-05-14 22:18:28 +0000 | [diff] [blame] | 18 | #include "ARMRegisterInfo.h" |
| 19 | |
| 20 | namespace llvm { |
Evan Cheng | 10043e2 | 2007-01-19 07:51:42 +0000 | [diff] [blame] | 21 | class ARMSubtarget; |
| 22 | |
David Goodwin | ade05a3 | 2009-07-02 22:18:33 +0000 | [diff] [blame] | 23 | class ARMInstrInfo : public ARMBaseInstrInfo { |
| 24 | ARMRegisterInfo RI; |
| 25 | public: |
| 26 | explicit ARMInstrInfo(const ARMSubtarget &STI); |
| 27 | |
Jim Grosbach | 617f84dd | 2012-02-28 23:53:30 +0000 | [diff] [blame] | 28 | /// getNoopForMachoTarget - Return the noop instruction to use for a noop. |
Craig Topper | 6bc27bf | 2014-03-10 02:09:33 +0000 | [diff] [blame] | 29 | void getNoopForMachoTarget(MCInst &NopInst) const override; |
Jim Grosbach | 617f84dd | 2012-02-28 23:53:30 +0000 | [diff] [blame] | 30 | |
David Goodwin | af7451b | 2009-07-08 16:09:28 +0000 | [diff] [blame] | 31 | // Return the non-pre/post incrementing version of 'Opc'. Return 0 |
| 32 | // if there is not such an opcode. |
Craig Topper | 6bc27bf | 2014-03-10 02:09:33 +0000 | [diff] [blame] | 33 | unsigned getUnindexedOpcode(unsigned Opc) const override; |
David Goodwin | af7451b | 2009-07-08 16:09:28 +0000 | [diff] [blame] | 34 | |
David Goodwin | ade05a3 | 2009-07-02 22:18:33 +0000 | [diff] [blame] | 35 | /// 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 Topper | 6bc27bf | 2014-03-10 02:09:33 +0000 | [diff] [blame] | 39 | const ARMRegisterInfo &getRegisterInfo() const override { return RI; } |
Akira Hatanaka | e5b6e0d | 2014-07-25 19:31:34 +0000 | [diff] [blame] | 40 | |
| 41 | private: |
| 42 | void expandLoadStackGuard(MachineBasicBlock::iterator MI, |
| 43 | Reloc::Model RM) const override; |
Rafael Espindola | ffdc24b | 2006-05-14 22:18:28 +0000 | [diff] [blame] | 44 | }; |
| 45 | |
Alexander Kornienko | f00654e | 2015-06-23 09:49:53 +0000 | [diff] [blame] | 46 | } |
Rafael Espindola | ffdc24b | 2006-05-14 22:18:28 +0000 | [diff] [blame] | 47 | |
| 48 | #endif |