Skip to content

Commit

Permalink
cmd/internal/obj/wasm: refactor handling of wasm variables
Browse files Browse the repository at this point in the history
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 <neelance@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Cherry Zhang <cherryyz@google.com>
  • Loading branch information
neelance authored and Richard Musiol committed Sep 5, 2019
1 parent aae0b5b commit 547021d
Show file tree
Hide file tree
Showing 3 changed files with 163 additions and 140 deletions.
6 changes: 6 additions & 0 deletions src/cmd/internal/obj/wasm/a.out.go
Expand Up @@ -48,6 +48,12 @@ const (
ADrop // opcode 0x1A
ASelect

ALocalGet // opcode 0x20
ALocalSet
ALocalTee
AGlobalGet
AGlobalSet

AI32Load // opcode 0x28
AI64Load
AF32Load
Expand Down
5 changes: 5 additions & 0 deletions src/cmd/internal/obj/wasm/anames.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 547021d

Please sign in to comment.