[PATCH] D41571: RISCV: Add COFF address space
Martell Malone via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Sun Dec 24 22:32:49 PST 2017
martell created this revision.
martell added reviewers: asb, rnk.
PE spec defines and reserves to following for RISCV
IMAGE_FILE_MACHINE_RISCV32 0x5032
IMAGE_FILE_MACHINE_RISCV64 0x5064
IMAGE_FILE_MACHINE_RISCV128 0x5128
https://msdn.microsoft.com/en-us/library/windows/desktop/ms680547(v=vs.85).aspx
Adds support to COFFDumper and COFFYAML interchange.
Repository:
rL LLVM
https://reviews.llvm.org/D41571
Files:
docs/yaml2obj.rst
include/llvm/BinaryFormat/COFF.h
lib/ObjectYAML/COFFYAML.cpp
tools/llvm-readobj/COFFDumper.cpp
Index: tools/llvm-readobj/COFFDumper.cpp
===================================================================
--- tools/llvm-readobj/COFFDumper.cpp
+++ tools/llvm-readobj/COFFDumper.cpp
@@ -341,6 +341,9 @@
LLVM_READOBJ_ENUM_ENT(COFF, IMAGE_FILE_MACHINE_POWERPC ),
LLVM_READOBJ_ENUM_ENT(COFF, IMAGE_FILE_MACHINE_POWERPCFP),
LLVM_READOBJ_ENUM_ENT(COFF, IMAGE_FILE_MACHINE_R4000 ),
+ LLVM_READOBJ_ENUM_ENT(COFF, IMAGE_FILE_MACHINE_RISCV32 ),
+ LLVM_READOBJ_ENUM_ENT(COFF, IMAGE_FILE_MACHINE_RISCV64 ),
+ LLVM_READOBJ_ENUM_ENT(COFF, IMAGE_FILE_MACHINE_RISCV128 ),
LLVM_READOBJ_ENUM_ENT(COFF, IMAGE_FILE_MACHINE_SH3 ),
LLVM_READOBJ_ENUM_ENT(COFF, IMAGE_FILE_MACHINE_SH3DSP ),
LLVM_READOBJ_ENUM_ENT(COFF, IMAGE_FILE_MACHINE_SH4 ),
Index: lib/ObjectYAML/COFFYAML.cpp
===================================================================
--- lib/ObjectYAML/COFFYAML.cpp
+++ lib/ObjectYAML/COFFYAML.cpp
@@ -75,6 +75,9 @@
ECase(IMAGE_FILE_MACHINE_POWERPC);
ECase(IMAGE_FILE_MACHINE_POWERPCFP);
ECase(IMAGE_FILE_MACHINE_R4000);
+ ECase(IMAGE_FILE_MACHINE_RISCV32);
+ ECase(IMAGE_FILE_MACHINE_RISCV64);
+ ECase(IMAGE_FILE_MACHINE_RISCV128);
ECase(IMAGE_FILE_MACHINE_SH3);
ECase(IMAGE_FILE_MACHINE_SH3DSP);
ECase(IMAGE_FILE_MACHINE_SH4);
Index: include/llvm/BinaryFormat/COFF.h
===================================================================
--- include/llvm/BinaryFormat/COFF.h
+++ include/llvm/BinaryFormat/COFF.h
@@ -110,6 +110,9 @@
IMAGE_FILE_MACHINE_POWERPC = 0x1F0,
IMAGE_FILE_MACHINE_POWERPCFP = 0x1F1,
IMAGE_FILE_MACHINE_R4000 = 0x166,
+ IMAGE_FILE_MACHINE_RISCV32 = 0x5032,
+ IMAGE_FILE_MACHINE_RISCV64 = 0x5064,
+ IMAGE_FILE_MACHINE_RISCV128 = 0x5128,
IMAGE_FILE_MACHINE_SH3 = 0x1A2,
IMAGE_FILE_MACHINE_SH3DSP = 0x1A3,
IMAGE_FILE_MACHINE_SH4 = 0x1A6,
Index: docs/yaml2obj.rst
===================================================================
--- docs/yaml2obj.rst
+++ docs/yaml2obj.rst
@@ -76,6 +76,9 @@
, IMAGE_FILE_MACHINE_POWERPC
, IMAGE_FILE_MACHINE_POWERPCFP
, IMAGE_FILE_MACHINE_R4000
+ , IMAGE_FILE_MACHINE_RISCV32
+ , IMAGE_FILE_MACHINE_RISCV64
+ , IMAGE_FILE_MACHINE_RISCV128
, IMAGE_FILE_MACHINE_SH3
, IMAGE_FILE_MACHINE_SH3DSP
, IMAGE_FILE_MACHINE_SH4
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D41571.128126.patch
Type: text/x-patch
Size: 2544 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20171225/7452f9e9/attachment.bin>
More information about the llvm-commits
mailing list