aboutsummaryrefslogtreecommitdiff
path: root/src/cmd/compile/internal/ssa/rewriteWasm.go
diff options
context:
space:
mode:
authorCherry Zhang <cherryyz@google.com>2021-04-27 17:19:42 -0400
committerCherry Zhang <cherryyz@google.com>2021-04-28 14:01:59 +0000
commit4a7effa418b4644abc5142e35228e26c6a52a50a (patch)
tree16421c069036d36664d5c99a54183bc5b39904fb /src/cmd/compile/internal/ssa/rewriteWasm.go
parent4fe324dd0f3497f6bf4f46ba39921d7855dbc29b (diff)
downloadgo-4a7effa418b4644abc5142e35228e26c6a52a50a.tar.gz
go-4a7effa418b4644abc5142e35228e26c6a52a50a.zip
cmd/compile: mark R12 clobbered for special calls
In external linking mode the external linker may insert trampolines, which use R12 as a scratch register. So a call could potentially clobber R12 if the target is laid out too far. Mark R12 clobbered. Also, we will use R12 for trampolines in the Go linker as well. CL 310731 updated the generated rewrite files so imports are grouped, but the generator was not updated to do so. Grouped imports are nice. But as those are generated files, for simplicity and my laziness, just regenerate with the current generator (which makes imports not grouped). Change-Id: Iddb741ff7314a291ade5fbffc7d315f555808409 Reviewed-on: https://go-review.googlesource.com/c/go/+/314453 Trust: Cherry Zhang <cherryyz@google.com> Run-TryBot: Cherry Zhang <cherryyz@google.com> TryBot-Result: Go Bot <gobot@golang.org> Reviewed-by: Than McIntosh <thanm@google.com>
Diffstat (limited to 'src/cmd/compile/internal/ssa/rewriteWasm.go')
-rw-r--r--src/cmd/compile/internal/ssa/rewriteWasm.go8
1 files changed, 3 insertions, 5 deletions
diff --git a/src/cmd/compile/internal/ssa/rewriteWasm.go b/src/cmd/compile/internal/ssa/rewriteWasm.go
index ed23ae032a..5dab09f85b 100644
--- a/src/cmd/compile/internal/ssa/rewriteWasm.go
+++ b/src/cmd/compile/internal/ssa/rewriteWasm.go
@@ -3,11 +3,9 @@
package ssa
-import (
- "cmd/compile/internal/types"
- "internal/buildcfg"
- "math"
-)
+import "internal/buildcfg"
+import "math"
+import "cmd/compile/internal/types"
func rewriteValueWasm(v *Value) bool {
switch v.Op {