blob: c3bf3213a984b86532b58fe59c35ba2ce3d0af36 [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};
35enum {
36 MO_None,
37 MO_LO,
38 MO_HI,
39 MO_PCREL_HI,
40};
41} // namespace RISCVII
42
43// Describes the predecessor/successor bits used in the FENCE instruction.
44namespace RISCVFenceField {
45enum FenceField {
46 I = 8,
47 O = 4,
48 R = 2,
49 W = 1
50};
51}
52} // namespace llvm
53
54#endif