aboutsummaryrefslogtreecommitdiff
path: root/src/cmd/compile/internal/ssa/opGen.go
diff options
context:
space:
mode:
authorCherry Zhang <cherryyz@google.com>2019-06-28 09:30:36 -0400
committerCarlos Amedee <carlos@golang.org>2021-08-02 22:28:48 +0000
commit818c5f6fbe136286b7c76f38a11929a60eb327bc (patch)
tree61b90959ec1b8d599716197cbb88ae3f88afcce3 /src/cmd/compile/internal/ssa/opGen.go
parentb81d75fb42f3add3fefe7cf8fa220f88895920e5 (diff)
downloadgo-818c5f6fbe136286b7c76f38a11929a60eb327bc.tar.gz
go-818c5f6fbe136286b7c76f38a11929a60eb327bc.zip
[release-branch.go1.15] cmd/compile: mark R16, R17 clobbered for non-standard calls on ARM64
On ARM64, (external) linker generated trampoline may clobber R16 and R17. In CL 183842 we change Duff's devices not to use those registers. However, this is not enough. The register allocator also needs to know that these registers may be clobbered in any calls that don't follow the standard Go calling convention. This include Duff's devices and the write barrier. Fixes #46927. Updates #32773. Change-Id: Ia52a891d9bbb8515c927617dd53aee5af5bd9aa4 Reviewed-on: https://go-review.googlesource.com/c/go/+/184437 Run-TryBot: Cherry Zhang <cherryyz@google.com> TryBot-Result: Go Bot <gobot@golang.org> Reviewed-by: Meng Zhuo <mzh@golangcn.org> Reviewed-by: Keith Randall <khr@golang.org> Trust: Meng Zhuo <mzh@golangcn.org> (cherry picked from commit 11b4aee05bfe83513cf08f83091e5aef8b33e766) Reviewed-on: https://go-review.googlesource.com/c/go/+/331030 Trust: Cherry Mui <cherryyz@google.com> Run-TryBot: Cherry Mui <cherryyz@google.com>
Diffstat (limited to 'src/cmd/compile/internal/ssa/opGen.go')
-rw-r--r--src/cmd/compile/internal/ssa/opGen.go6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/cmd/compile/internal/ssa/opGen.go b/src/cmd/compile/internal/ssa/opGen.go
index 8a27c4bb2e..39320c8b03 100644
--- a/src/cmd/compile/internal/ssa/opGen.go
+++ b/src/cmd/compile/internal/ssa/opGen.go
@@ -20738,7 +20738,7 @@ var opcodeTable = [...]opInfo{
inputs: []inputInfo{
{0, 1048576}, // R20
},
- clobbers: 537919488, // R20 R30
+ clobbers: 538116096, // R16 R17 R20 R30
},
},
{
@@ -20765,7 +20765,7 @@ var opcodeTable = [...]opInfo{
{0, 2097152}, // R21
{1, 1048576}, // R20
},
- clobbers: 607125504, // R20 R21 R26 R30
+ clobbers: 607322112, // R16 R17 R20 R21 R26 R30
},
},
{
@@ -21090,7 +21090,7 @@ var opcodeTable = [...]opInfo{
{0, 4}, // R2
{1, 8}, // R3
},
- clobbers: 9223372035244163072, // R30 F0 F1 F2 F3 F4 F5 F6 F7 F8 F9 F10 F11 F12 F13 F14 F15 F16 F17 F18 F19 F20 F21 F22 F23 F24 F25 F26 F27 F28 F29 F30 F31
+ clobbers: 9223372035244359680, // R16 R17 R30 F0 F1 F2 F3 F4 F5 F6 F7 F8 F9 F10 F11 F12 F13 F14 F15 F16 F17 F18 F19 F20 F21 F22 F23 F24 F25 F26 F27 F28 F29 F30 F31
},
},
{