Alex Bradbury | 6758ecb | 2017-09-17 14:27:35 +0000 | [diff] [blame] | 1 | //===-- RISCVBaseInfo.h - Top level definitions for RISCV MC ----*- C++ -*-===// |
| 2 | // |
| 3 | // The LLVM Compiler Infrastructure |
| 4 | // |
| 5 | // This file is distributed under the University of Illinois Open Source |
| 6 | // License. See LICENSE.TXT for details. |
| 7 | // |
| 8 | //===----------------------------------------------------------------------===// |
| 9 | // |
| 10 | // This file contains small standalone enum definitions for the RISCV target |
| 11 | // useful for the compiler back-end and the MC libraries. |
| 12 | // |
| 13 | //===----------------------------------------------------------------------===// |
| 14 | #ifndef LLVM_LIB_TARGET_RISCV_MCTARGETDESC_RISCVBASEINFO_H |
| 15 | #define LLVM_LIB_TARGET_RISCV_MCTARGETDESC_RISCVBASEINFO_H |
| 16 | |
| 17 | #include "RISCVMCTargetDesc.h" |
| 18 | |
| 19 | namespace llvm { |
| 20 | |
| 21 | // RISCVII - This namespace holds all of the target specific flags that |
| 22 | // instruction info tracks. All definitions must match RISCVInstrFormats.td. |
| 23 | namespace RISCVII { |
| 24 | enum { |
| 25 | InstFormatPseudo = 0, |
| 26 | InstFormatR = 1, |
| 27 | InstFormatI = 2, |
| 28 | InstFormatS = 3, |
| 29 | InstFormatSB = 4, |
| 30 | InstFormatU = 5, |
| 31 | InstFormatOther = 6, |
| 32 | |
| 33 | InstFormatMask = 15 |
| 34 | }; |
Alex Bradbury | 9d3f125 | 2017-09-28 08:26:24 +0000 | [diff] [blame^] | 35 | |
Alex Bradbury | 6758ecb | 2017-09-17 14:27:35 +0000 | [diff] [blame] | 36 | enum { |
| 37 | MO_None, |
| 38 | MO_LO, |
| 39 | MO_HI, |
| 40 | MO_PCREL_HI, |
| 41 | }; |
| 42 | } // namespace RISCVII |
| 43 | |
| 44 | // Describes the predecessor/successor bits used in the FENCE instruction. |
| 45 | namespace RISCVFenceField { |
| 46 | enum FenceField { |
| 47 | I = 8, |
| 48 | O = 4, |
| 49 | R = 2, |
| 50 | W = 1 |
| 51 | }; |
| 52 | } |
| 53 | } // namespace llvm |
| 54 | |
| 55 | #endif |