]> Cypherpunks repositories - gostls13.git/commit
cmd/compile: mark R12 clobbered for special calls
authorCherry Zhang <cherryyz@google.com>
Tue, 27 Apr 2021 21:19:42 +0000 (17:19 -0400)
committerCherry Zhang <cherryyz@google.com>
Wed, 28 Apr 2021 14:01:59 +0000 (14:01 +0000)
commit4a7effa418b4644abc5142e35228e26c6a52a50a
tree16421c069036d36664d5c99a54183bc5b39904fb
parent4fe324dd0f3497f6bf4f46ba39921d7855dbc29b
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>
src/cmd/compile/internal/ssa/gen/ARMOps.go
src/cmd/compile/internal/ssa/opGen.go
src/cmd/compile/internal/ssa/rewrite386.go
src/cmd/compile/internal/ssa/rewriteAMD64.go
src/cmd/compile/internal/ssa/rewriteARM.go
src/cmd/compile/internal/ssa/rewritePPC64.go
src/cmd/compile/internal/ssa/rewriteRISCV64.go
src/cmd/compile/internal/ssa/rewriteS390X.go
src/cmd/compile/internal/ssa/rewriteWasm.go
src/cmd/compile/internal/ssa/rewritegeneric.go