[PATCH] D54096: [WebAssembly] Add support for the event section

Heejin Ahn via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Nov 5 02:56:27 PST 2018


aheejin created this revision.
aheejin added reviewers: dschuff, sbc100, sunfish, aardappel.
Herald added subscribers: llvm-commits, jgravelle-google.

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
- Adds tests and update existing binary files to include the new section


Repository:
  rL LLVM

https://reviews.llvm.org/D54096

Files:
  include/llvm/BinaryFormat/Wasm.h
  include/llvm/BinaryFormat/WasmRelocs.def
  include/llvm/CodeGen/WasmEHFuncInfo.h
  include/llvm/MC/MCExpr.h
  include/llvm/MC/MCSymbolWasm.h
  include/llvm/Object/RelocVisitor.h
  include/llvm/Object/Wasm.h
  include/llvm/ObjectYAML/WasmYAML.h
  lib/BinaryFormat/Wasm.cpp
  lib/CodeGen/AsmPrinter/WasmException.cpp
  lib/CodeGen/AsmPrinter/WasmException.h
  lib/MC/MCExpr.cpp
  lib/MC/WasmObjectWriter.cpp
  lib/Object/WasmObjectFile.cpp
  lib/ObjectYAML/WasmYAML.cpp
  lib/Target/WebAssembly/MCTargetDesc/WebAssemblyMCCodeEmitter.cpp
  lib/Target/WebAssembly/MCTargetDesc/WebAssemblyMCTargetDesc.h
  lib/Target/WebAssembly/MCTargetDesc/WebAssemblyTargetStreamer.cpp
  lib/Target/WebAssembly/MCTargetDesc/WebAssemblyTargetStreamer.h
  lib/Target/WebAssembly/MCTargetDesc/WebAssemblyWasmObjectWriter.cpp
  lib/Target/WebAssembly/WebAssemblyAsmPrinter.cpp
  lib/Target/WebAssembly/WebAssemblyISD.def
  lib/Target/WebAssembly/WebAssemblyISelLowering.cpp
  lib/Target/WebAssembly/WebAssemblyISelLowering.h
  lib/Target/WebAssembly/WebAssemblyInstrControl.td
  lib/Target/WebAssembly/WebAssemblyInstrInfo.td
  lib/Target/WebAssembly/WebAssemblyMCInstLower.cpp
  lib/Target/WebAssembly/WebAssemblyMCInstLower.h
  test/CodeGen/WebAssembly/exception.ll
  test/MC/WebAssembly/debug-info.ll
  test/MC/WebAssembly/event-section.ll
  test/MC/WebAssembly/func-address.ll
  test/MC/WebAssembly/sections.ll
  test/Object/Inputs/trivial-object-test.wasm
  test/ObjectYAML/wasm/event_section.yaml
  test/tools/llvm-objdump/Inputs/trivial.obj.wasm
  test/tools/llvm-readobj/Inputs/trivial.obj.wasm
  tools/obj2yaml/wasm2yaml.cpp
  tools/yaml2obj/yaml2wasm.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D54096.172557.patch
Type: text/x-patch
Size: 73018 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20181105/ccf1a984/attachment-0001.bin>


More information about the llvm-commits mailing list