Commit de186c63 authored by Austin Clements's avatar Austin Clements

cmd/compile: calls can clobber g on s390x

Because a call may ultimately invoke runtime.setg, we have to assume
that g may be clobbered by any call. All of the other architectures
that use a g register already do this, but it was missing from the
s390x caller save clobber set.

Change-Id: Ia931638d42c44979839f20d71097acf31475f423
Reviewed-on: https://go-review.googlesource.com/92835
Run-TryBot: Austin Clements <austin@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: default avatarCherry Zhang <cherryyz@google.com>
parent ce5fa6d5
...@@ -124,7 +124,7 @@ func init() { ...@@ -124,7 +124,7 @@ func init() {
ptrspsb = ptrsp | sb ptrspsb = ptrsp | sb
fp = buildReg("F0 F1 F2 F3 F4 F5 F6 F7 F8 F9 F10 F11 F12 F13 F14 F15") fp = buildReg("F0 F1 F2 F3 F4 F5 F6 F7 F8 F9 F10 F11 F12 F13 F14 F15")
callerSave = gp | fp callerSave = gp | fp | buildReg("g") // runtime.setg (and anything calling it) may clobber g
) )
// Common slices of register masks // Common slices of register masks
var ( var (
......
...@@ -21883,7 +21883,7 @@ var opcodeTable = [...]opInfo{ ...@@ -21883,7 +21883,7 @@ var opcodeTable = [...]opInfo{
call: true, call: true,
symEffect: SymNone, symEffect: SymNone,
reg: regInfo{ reg: regInfo{
clobbers: 4294923263, // R0 R1 R2 R3 R4 R5 R6 R7 R8 R9 R12 R14 F0 F1 F2 F3 F4 F5 F6 F7 F8 F9 F10 F11 F12 F13 F14 F15 clobbers: 4294931455, // R0 R1 R2 R3 R4 R5 R6 R7 R8 R9 R12 g R14 F0 F1 F2 F3 F4 F5 F6 F7 F8 F9 F10 F11 F12 F13 F14 F15
}, },
}, },
{ {
...@@ -21897,7 +21897,7 @@ var opcodeTable = [...]opInfo{ ...@@ -21897,7 +21897,7 @@ var opcodeTable = [...]opInfo{
{1, 4096}, // R12 {1, 4096}, // R12
{0, 54270}, // R1 R2 R3 R4 R5 R6 R7 R8 R9 R12 R14 SP {0, 54270}, // R1 R2 R3 R4 R5 R6 R7 R8 R9 R12 R14 SP
}, },
clobbers: 4294923263, // R0 R1 R2 R3 R4 R5 R6 R7 R8 R9 R12 R14 F0 F1 F2 F3 F4 F5 F6 F7 F8 F9 F10 F11 F12 F13 F14 F15 clobbers: 4294931455, // R0 R1 R2 R3 R4 R5 R6 R7 R8 R9 R12 g R14 F0 F1 F2 F3 F4 F5 F6 F7 F8 F9 F10 F11 F12 F13 F14 F15
}, },
}, },
{ {
...@@ -21910,7 +21910,7 @@ var opcodeTable = [...]opInfo{ ...@@ -21910,7 +21910,7 @@ var opcodeTable = [...]opInfo{
inputs: []inputInfo{ inputs: []inputInfo{
{0, 21502}, // R1 R2 R3 R4 R5 R6 R7 R8 R9 R12 R14 {0, 21502}, // R1 R2 R3 R4 R5 R6 R7 R8 R9 R12 R14
}, },
clobbers: 4294923263, // R0 R1 R2 R3 R4 R5 R6 R7 R8 R9 R12 R14 F0 F1 F2 F3 F4 F5 F6 F7 F8 F9 F10 F11 F12 F13 F14 F15 clobbers: 4294931455, // R0 R1 R2 R3 R4 R5 R6 R7 R8 R9 R12 g R14 F0 F1 F2 F3 F4 F5 F6 F7 F8 F9 F10 F11 F12 F13 F14 F15
}, },
}, },
{ {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment