summaryrefslogtreecommitdiff
path: root/src/cmd/internal/obj/wasm/wasmobj.go
diff options
context:
space:
mode:
authorJohan Brandhorst-Satzkorn <johan.brandhorst@gmail.com>2023-03-24 23:07:58 -0700
committerGopher Robot <gobot@golang.org>2023-04-05 19:28:25 +0000
commit99de78e175bed03e21e0da72d2f084c88e4f62ad (patch)
tree695fc1cf5ec100426b3dd72f4bb846b5f0b71f0e /src/cmd/internal/obj/wasm/wasmobj.go
parentc00e9285eae4599f6a123d0a355633379be998e8 (diff)
downloadgo-git-99de78e175bed03e21e0da72d2f084c88e4f62ad.tar.gz
all: add wasip1 asm and link logic
Add wasip1 asm and symbols to cmd/internal/obj, cmd/link and runtime. For #58141 Co-authored-by: Richard Musiol <neelance@gmail.com> Co-authored-by: Achille Roussel <achille.roussel@gmail.com> Co-authored-by: Julien Fabre <ju.pryz@gmail.com> Co-authored-by: Evan Phoenix <evan@phx.io> Change-Id: Ie088d9b65ea13e231694af6341465f95be33093f Reviewed-on: https://go-review.googlesource.com/c/go/+/479617 Reviewed-by: Ian Lance Taylor <iant@google.com> TryBot-Bypass: Ian Lance Taylor <iant@golang.org> Auto-Submit: Ian Lance Taylor <iant@golang.org> Auto-Submit: Ian Lance Taylor <iant@google.com> Reviewed-by: Cherry Mui <cherryyz@google.com> Run-TryBot: Ian Lance Taylor <iant@google.com>
Diffstat (limited to 'src/cmd/internal/obj/wasm/wasmobj.go')
-rw-r--r--src/cmd/internal/obj/wasm/wasmobj.go5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/cmd/internal/obj/wasm/wasmobj.go b/src/cmd/internal/obj/wasm/wasmobj.go
index f344b53870..6bf49c602d 100644
--- a/src/cmd/internal/obj/wasm/wasmobj.go
+++ b/src/cmd/internal/obj/wasm/wasmobj.go
@@ -905,6 +905,7 @@ func regAddr(reg int16) obj.Addr {
// Wasm ABI. This is a list of exceptions.
var notUsePC_B = map[string]bool{
"_rt0_wasm_js": true,
+ "_rt0_wasm_wasip1": true,
"wasm_export_run": true,
"wasm_export_resume": true,
"wasm_export_getsp": true,
@@ -959,8 +960,8 @@ func assemble(ctxt *obj.Link, s *obj.LSym, newprog obj.ProgAlloc) {
// Function starts with declaration of locals: numbers and types.
// Some functions use a special calling convention.
switch s.Name {
- case "_rt0_wasm_js", "wasm_export_run", "wasm_export_resume", "wasm_export_getsp", "wasm_pc_f_loop",
- "runtime.wasmDiv", "runtime.wasmTruncS", "runtime.wasmTruncU", "memeqbody":
+ case "_rt0_wasm_js", "_rt0_wasm_wasip1", "wasm_export_run", "wasm_export_resume", "wasm_export_getsp",
+ "wasm_pc_f_loop", "runtime.wasmDiv", "runtime.wasmTruncS", "runtime.wasmTruncU", "memeqbody":
varDecls = []*varDecl{}
useAssemblyRegMap()
case "memchr", "memcmp":