| 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 | // |
| Chandler Carruth | 2946cd7 | 2019-01-19 08:50:56 +0000 | [diff] [blame] | 3 | // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. |
| 4 | // See https://llvm.org/LICENSE.txt for license information. |
| 5 | // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception |
| Rafael Espindola | ffdc24b | 2006-05-14 22:18:28 +0000 | [diff] [blame] | 6 | // |
| 7 | //===----------------------------------------------------------------------===// |
| 8 | // |
| 9 | // This file contains the ARM implementation of the TargetInstrInfo class. |
| 10 | // |
| 11 | //===----------------------------------------------------------------------===// |
| 12 | |
| Benjamin Kramer | a7c40ef | 2014-08-13 16:26:38 +0000 | [diff] [blame] | 13 | #ifndef LLVM_LIB_TARGET_ARM_ARMINSTRINFO_H |
| 14 | #define LLVM_LIB_TARGET_ARM_ARMINSTRINFO_H |
| Rafael Espindola | ffdc24b | 2006-05-14 22:18:28 +0000 | [diff] [blame] | 15 | |
| David Goodwin | af7451b | 2009-07-08 16:09:28 +0000 | [diff] [blame] | 16 | #include "ARMBaseInstrInfo.h" |
| Rafael Espindola | ffdc24b | 2006-05-14 22:18:28 +0000 | [diff] [blame] | 17 | #include "ARMRegisterInfo.h" |
| 18 | |
| 19 | namespace llvm { |
| Evan Cheng | 10043e2 | 2007-01-19 07:51:42 +0000 | [diff] [blame] | 20 | class ARMSubtarget; |
| 21 | |
| David Goodwin | ade05a3 | 2009-07-02 22:18:33 +0000 | [diff] [blame] | 22 | class ARMInstrInfo : public ARMBaseInstrInfo { |
| 23 | ARMRegisterInfo RI; |
| 24 | public: |
| 25 | explicit ARMInstrInfo(const ARMSubtarget &STI); |
| 26 | |
| Hans Wennborg | 9b9a535 | 2017-04-21 21:48:41 +0000 | [diff] [blame] | 27 | /// Return the noop instruction to use for a noop. |
| 28 | void getNoop(MCInst &NopInst) const override; |
| Jim Grosbach | 617f84dd | 2012-02-28 23:53:30 +0000 | [diff] [blame] | 29 | |
| David Goodwin | af7451b | 2009-07-08 16:09:28 +0000 | [diff] [blame] | 30 | // Return the non-pre/post incrementing version of 'Opc'. Return 0 |
| 31 | // if there is not such an opcode. |
| Craig Topper | 6bc27bf | 2014-03-10 02:09:33 +0000 | [diff] [blame] | 32 | unsigned getUnindexedOpcode(unsigned Opc) const override; |
| David Goodwin | af7451b | 2009-07-08 16:09:28 +0000 | [diff] [blame] | 33 | |
| David Goodwin | ade05a3 | 2009-07-02 22:18:33 +0000 | [diff] [blame] | 34 | /// getRegisterInfo - TargetInstrInfo is a superset of MRegister info. As |
| 35 | /// such, whenever a client has an instance of instruction info, it should |
| 36 | /// always be able to get register info as well (through this method). |
| 37 | /// |
| Craig Topper | 6bc27bf | 2014-03-10 02:09:33 +0000 | [diff] [blame] | 38 | const ARMRegisterInfo &getRegisterInfo() const override { return RI; } |
| Akira Hatanaka | e5b6e0d | 2014-07-25 19:31:34 +0000 | [diff] [blame] | 39 | |
| 40 | private: |
| Rafael Espindola | 82f4631 | 2016-06-28 15:18:26 +0000 | [diff] [blame] | 41 | void expandLoadStackGuard(MachineBasicBlock::iterator MI) const override; |
| Rafael Espindola | ffdc24b | 2006-05-14 22:18:28 +0000 | [diff] [blame] | 42 | }; |
| 43 | |
| Alexander Kornienko | f00654e | 2015-06-23 09:49:53 +0000 | [diff] [blame] | 44 | } |
| Rafael Espindola | ffdc24b | 2006-05-14 22:18:28 +0000 | [diff] [blame] | 45 | |
| 46 | #endif |