blob: cfb124262c61f6db1d3b4785072afc5fd2552ce0 [file] [log] [blame]
Alex Bradbury6758ecb2017-09-17 14:27:35 +00001//===-- 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
19namespace llvm {
20
21// RISCVII - This namespace holds all of the target specific flags that
22// instruction info tracks. All definitions must match RISCVInstrFormats.td.
23namespace RISCVII {
24enum {
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 Bradbury9d3f1252017-09-28 08:26:24 +000035
Alex Bradbury6758ecb2017-09-17 14:27:35 +000036enum {
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.
45namespace RISCVFenceField {
46enum FenceField {
47 I = 8,
48 O = 4,
49 R = 2,
50 W = 1
51};
52}
53} // namespace llvm
54
55#endif