wingo added inline comments.

================
Comment at: llvm/lib/Target/WebAssembly/WebAssemblyISD.def:48
+
+// Reference Types
+HANDLE_MEM_NODETYPE(GLOBAL_GET)
----------------
tlively wrote:
> sbc100 wrote:
> > Is this just for ref types or also for global that hold integers too (like 
> > `__stack_pointer`)
> Yep, it's for arbitrary types (see the tests), so this comment should be 
> updated.
FWIW I think you would be able to define `__stack_pointer` from IR via
```
@__stack_pointer = external addrspace(1) global i32
```

and then to use it:

```
%current_sp = load i32, i32 addrspace(1)* @__stack_pointer
```


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D101608/new/

https://reviews.llvm.org/D101608

_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to