Skip to content

Commit 547021d

Browse files
neelanceRichard Musiol
authored and
Richard Musiol
committed
cmd/internal/obj/wasm: refactor handling of wasm variables
This commit improves how registers get mapped to wasm variables. This is a preparation for future improvements (e.g. adding 32 bit float registers). Change-Id: I374c80b2d6c9bcce6b0e373fe921b5ad4dee40ff Reviewed-on: https://go-review.googlesource.com/c/go/+/191777 Run-TryBot: Richard Musiol <[email protected]> TryBot-Result: Gobot Gobot <[email protected]> Reviewed-by: Cherry Zhang <[email protected]>
1 parent aae0b5b commit 547021d

File tree

3 files changed

+163
-140
lines changed

3 files changed

+163
-140
lines changed

src/cmd/internal/obj/wasm/a.out.go

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,12 @@ const (
4848
ADrop // opcode 0x1A
4949
ASelect
5050

51+
ALocalGet // opcode 0x20
52+
ALocalSet
53+
ALocalTee
54+
AGlobalGet
55+
AGlobalSet
56+
5157
AI32Load // opcode 0x28
5258
AI64Load
5359
AF32Load

src/cmd/internal/obj/wasm/anames.go

Lines changed: 5 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)