]> granicus.if.org Git - llvm/commitdiff
[RISCV] Define RISC-V specific e_flags
authorAlex Bradbury <asb@lowrisc.org>
Thu, 28 Sep 2017 07:54:01 +0000 (07:54 +0000)
committerAlex Bradbury <asb@lowrisc.org>
Thu, 28 Sep 2017 07:54:01 +0000 (07:54 +0000)
Add RISC-V e_flags as defined in the ABI document:

https://github.com/riscv/riscv-elf-psabi-doc/blob/master/riscv-elf.md#file-header

Differential Revision: https://reviews.llvm.org/D38310
Patch by Chih-Mao Chen.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@314386 91177308-0d34-0410-b5e6-96231b3b80d8

include/llvm/BinaryFormat/ELF.h

index c22cb19391dbd06406d9f4a51f98e883c42a7d89..dba0367da7167b4bcc755635a6dc23e8d3a0b5c7 100644 (file)
@@ -612,6 +612,17 @@ enum {
 #include "ELFRelocs/Lanai.def"
 };
 
+// RISCV Specific e_flags
+enum : unsigned {
+  EF_RISCV_RVC = 0x0001,
+  EF_RISCV_FLOAT_ABI = 0x0006,
+  EF_RISCV_FLOAT_ABI_SOFT = 0x0000,
+  EF_RISCV_FLOAT_ABI_SINGLE = 0x0002,
+  EF_RISCV_FLOAT_ABI_DOUBLE = 0x0004,
+  EF_RISCV_FLOAT_ABI_QUAD = 0x0006,
+  EF_RISCV_RVE = 0x0008
+};
+
 // ELF Relocation types for RISC-V
 enum {
 #include "ELFRelocs/RISCV.def"