summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target/RISCV/Utils
diff options
context:
space:
mode:
authorSam Elliott <selliott@lowrisc.org>2019-12-09 13:16:28 +0000
committerSam Elliott <selliott@lowrisc.org>2019-12-09 13:18:32 +0000
commitc20930a724f9ecaa6ef4bea819f5ce5115506107 (patch)
treef35b0d17eb7beba4c686a5c2ee42fb25b7dd462d /llvm/lib/Target/RISCV/Utils
parent9b9e995819fe0e066f9f13cc009a99a210afde4e (diff)
downloadbcm5719-llvm-c20930a724f9ecaa6ef4bea819f5ce5115506107.tar.gz
bcm5719-llvm-c20930a724f9ecaa6ef4bea819f5ce5115506107.zip
[RISCV] Machine Operand Flag Serialization
Summary: These hooks ensure that the RISC-V backend can serialize and parse MIR correctly. Reviewers: jrtc27, luismarques Reviewed By: luismarques Subscribers: hiraditya, asb, rbar, johnrusso, simoncook, sabuasal, niosHD, kito-cheng, shiva0217, jrtc27, MaskRay, zzheng, edward-jones, rogfer01, MartinMosbeck, brucehoult, the_o, rkruppe, PkmX, jocewei, psnobl, benna, Jim, s.egerton, pzheng, sameer.abuasal, apazos, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D70666
Diffstat (limited to 'llvm/lib/Target/RISCV/Utils')
-rw-r--r--llvm/lib/Target/RISCV/Utils/RISCVBaseInfo.h32
1 files changed, 19 insertions, 13 deletions
diff --git a/llvm/lib/Target/RISCV/Utils/RISCVBaseInfo.h b/llvm/lib/Target/RISCV/Utils/RISCVBaseInfo.h
index 738f635ada9..cf078df9609 100644
--- a/llvm/lib/Target/RISCV/Utils/RISCVBaseInfo.h
+++ b/llvm/lib/Target/RISCV/Utils/RISCVBaseInfo.h
@@ -48,20 +48,26 @@ enum {
InstFormatMask = 31
};
+// RISC-V Specific Machine Operand Flags
enum {
- MO_None,
- MO_CALL,
- MO_PLT,
- MO_LO,
- MO_HI,
- MO_PCREL_LO,
- MO_PCREL_HI,
- MO_GOT_HI,
- MO_TPREL_LO,
- MO_TPREL_HI,
- MO_TPREL_ADD,
- MO_TLS_GOT_HI,
- MO_TLS_GD_HI,
+ MO_None = 0,
+ MO_CALL = 1,
+ MO_PLT = 2,
+ MO_LO = 3,
+ MO_HI = 4,
+ MO_PCREL_LO = 5,
+ MO_PCREL_HI = 6,
+ MO_GOT_HI = 7,
+ MO_TPREL_LO = 8,
+ MO_TPREL_HI = 9,
+ MO_TPREL_ADD = 10,
+ MO_TLS_GOT_HI = 11,
+ MO_TLS_GD_HI = 12,
+
+ // Used to differentiate between target-specific "direct" flags and "bitmask"
+ // flags. A machine operand can only have one "direct" flag, but can have
+ // multiple "bitmask" flags.
+ MO_DIRECT_FLAG_MASK = 15
};
} // namespace RISCVII
OpenPOWER on IntegriCloud