[PATCH] D58315: [WebAssembly] Add .shared directive for shared memory

Sam Clegg via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Feb 15 17:15:43 PST 2019

sbc100 added inline comments.

Comment at: llvm/include/llvm/MC/MCSymbolWasm.h:26
   Optional<wasm::WasmEventType> EventType;
+  uint8_t MemFlags = 0;
Seems strange to attach this to a symol.

Comment at: llvm/test/MC/WebAssembly/assembler-binary.ll:25
+; ASM:          .text
+; ASM:          .shared
+; ASM-NEXT:     .file "assembler-binary.ll"
This looks like its starting a new section.   Could we call this ".shared_memory"?  Or is there some other place in the asm syntax there this attribute might be specified?

Actually do we need this to be in the .s format at all?  seems like it could be specified as an assembler flag?  Like the march/mcpu stuff.. that doesn't live in the .s format right?

Comment at: llvm/test/MC/WebAssembly/event-section.ll:1
-; RUN: llc -filetype=obj -exception-model=wasm -mattr=+exception-handling %s -o - | obj2yaml | FileCheck %s
-; RUN: llc -filetype=obj -exception-model=wasm -mattr=+exception-handling %s -o - | llvm-readobj -s | FileCheck -check-prefix=SEC %s
+; RUN: llc -filetype=obj -thread-model=single -exception-model=wasm -mattr=+exception-handling %s -o - | obj2yaml | FileCheck %s
+; RUN: llc -filetype=obj -thread-model=single -exception-model=wasm -mattr=+exception-handling %s -o - | llvm-readobj -s | FileCheck -check-prefix=SEC %s
Can we make this the default instead?

  rG LLVM Github Monorepo



More information about the llvm-commits mailing list