diff options
author | Heejin Ahn <aheejin@gmail.com> | 2018-11-14 02:46:21 +0000 |
---|---|---|
committer | Heejin Ahn <aheejin@gmail.com> | 2018-11-14 02:46:21 +0000 |
commit | da419bdb5e3e167ea90c6923660059f35fa17d67 (patch) | |
tree | 0264ae56ecdddf59399c2b355e1dee8eeffafb63 /llvm/lib/MC/MCExpr.cpp | |
parent | 6a3c279d1cdcd4205a233952b4bacd5941cd355e (diff) | |
download | bcm5719-llvm-da419bdb5e3e167ea90c6923660059f35fa17d67.tar.gz bcm5719-llvm-da419bdb5e3e167ea90c6923660059f35fa17d67.zip |
[WebAssembly] Add support for the event section
Summary:
This adds support for the 'event section' specified in the exception
handling proposal. (This was named 'exception section' first, but later
renamed to 'event section' to take possibilities of other kinds of
events into consideration. But currently we only store exception info in
this section.)
The event section is added between the global section and the export
section. This is for ease of validation per request of the V8 team.
This patch:
- Creates the event symbol type, which is a weak symbol
- Makes 'throw' instruction take the event symbol '__cpp_exception'
- Adds relocation support for events
- Adds WasmObjectWriter / WasmObjectFile (Reader) support
- Adds obj2yaml / yaml2obj support
- Adds '.eventtype' printing support
Reviewers: dschuff, sbc100, aardappel
Subscribers: jgravelle-google, sunfish, llvm-commits
Differential Revision: https://reviews.llvm.org/D54096
llvm-svn: 346825
Diffstat (limited to 'llvm/lib/MC/MCExpr.cpp')
-rw-r--r-- | llvm/lib/MC/MCExpr.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/llvm/lib/MC/MCExpr.cpp b/llvm/lib/MC/MCExpr.cpp index 38f311be7c6..3c022199145 100644 --- a/llvm/lib/MC/MCExpr.cpp +++ b/llvm/lib/MC/MCExpr.cpp @@ -306,6 +306,7 @@ StringRef MCSymbolRefExpr::getVariantKindName(VariantKind Kind) { case VK_WebAssembly_FUNCTION: return "FUNCTION"; case VK_WebAssembly_GLOBAL: return "GLOBAL"; case VK_WebAssembly_TYPEINDEX: return "TYPEINDEX"; + case VK_WebAssembly_EVENT: return "EVENT"; case VK_AMDGPU_GOTPCREL32_LO: return "gotpcrel32@lo"; case VK_AMDGPU_GOTPCREL32_HI: return "gotpcrel32@hi"; case VK_AMDGPU_REL32_LO: return "rel32@lo"; @@ -421,6 +422,7 @@ MCSymbolRefExpr::getVariantKindForName(StringRef Name) { .Case("function", VK_WebAssembly_FUNCTION) .Case("global", VK_WebAssembly_GLOBAL) .Case("typeindex", VK_WebAssembly_TYPEINDEX) + .Case("event", VK_WebAssembly_EVENT) .Case("gotpcrel32@lo", VK_AMDGPU_GOTPCREL32_LO) .Case("gotpcrel32@hi", VK_AMDGPU_GOTPCREL32_HI) .Case("rel32@lo", VK_AMDGPU_REL32_LO) |