[PATCH] D79137: [WebAssmebly] Add support for defined wasm globals in MC and lld
Wouter van Oortmerssen via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Apr 30 14:00:23 PDT 2020
aardappel added inline comments.
================
Comment at: lld/test/wasm/globals.s:13
+read_global:
+ .functype read_global () -> (i32)
+ global.get foo_global
----------------
sbc100 wrote:
> aardappel wrote:
> > sbc100 wrote:
> > > aardappel wrote:
> > > > You were saying earlier there's a lot of boilerplate to writing a function in asm.. this seems pretty reasonable?
> > > You are right, its not too bad. I wonder if we could make `end_function` optional though? Also, IIRC that location of the `.functype` directive is tied (needlessly?) to this position at the start I think.
> > `end_function` is an actual instruction, not just a marker, so that's probably not a good idea.
> Right.. but in that case maybe we should just call it `end` since that is the name of the instruction.
>
> Also, this IIUC is not present at all in the way format.. so there is a precedent for not including this.
>
We define `end_block`, `end_loop` etc. as distinct instructions in tablegen defs and thuout LLVM, they just map to the same opcode. The asm output is just a reflection of that.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D79137/new/
https://reviews.llvm.org/D79137
More information about the llvm-commits
mailing list