[llvm] r314386 - [RISCV] Define RISC-V specific e_flags

Alex Bradbury via llvm-commits llvm-commits at lists.llvm.org
Thu Sep 28 00:54:01 PDT 2017


Author: asb
Date: Thu Sep 28 00:54:01 2017
New Revision: 314386

URL: http://llvm.org/viewvc/llvm-project?rev=314386&view=rev
Log:
[RISCV] Define RISC-V specific e_flags

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.

Modified:
    llvm/trunk/include/llvm/BinaryFormat/ELF.h

Modified: llvm/trunk/include/llvm/BinaryFormat/ELF.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/BinaryFormat/ELF.h?rev=314386&r1=314385&r2=314386&view=diff
==============================================================================
--- llvm/trunk/include/llvm/BinaryFormat/ELF.h (original)
+++ llvm/trunk/include/llvm/BinaryFormat/ELF.h Thu Sep 28 00:54:01 2017
@@ -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"




More information about the llvm-commits mailing list