Store multiple instructions can clobber flags on s390x when the
offset passed into the assembler is outside the range representable
with a signed 20 bit integer. This is because the assembler uses
the agfi instruction to implement the large offset. The assembler
could use a different sequence of instructions, but for now just
mark the instruction as 'clobberFlags' since this is risk free.
Noticed while investigating #38195.
No test yet since I'm not sure how to get this bug to trigger and
I haven't seen it affect real code.
Change-Id: I4a6ab96455a3ef8ffacb76ef0166b97eb40ff925
Reviewed-on: https://go-review.googlesource.com/c/go/+/226759
Run-TryBot: Michael Munday <mike.munday@ibm.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Keith Randall <khr@golang.org>
Reviewed-by: Cherry Zhang <cherryyz@google.com>
asm: "STMG",
faultOnNilArg0: true,
symEffect: "Write",
+ clobberFlags: true, // TODO(mundaym): currently uses AGFI to handle large offsets
},
{
name: "STMG3",
asm: "STMG",
faultOnNilArg0: true,
symEffect: "Write",
+ clobberFlags: true, // TODO(mundaym): currently uses AGFI to handle large offsets
},
{
name: "STMG4",
asm: "STMG",
faultOnNilArg0: true,
symEffect: "Write",
+ clobberFlags: true, // TODO(mundaym): currently uses AGFI to handle large offsets
},
{
name: "STM2",
asm: "STMY",
faultOnNilArg0: true,
symEffect: "Write",
+ clobberFlags: true, // TODO(mundaym): currently uses AGFI to handle large offsets
},
{
name: "STM3",
asm: "STMY",
faultOnNilArg0: true,
symEffect: "Write",
+ clobberFlags: true, // TODO(mundaym): currently uses AGFI to handle large offsets
},
{
name: "STM4",
asm: "STMY",
faultOnNilArg0: true,
symEffect: "Write",
+ clobberFlags: true, // TODO(mundaym): currently uses AGFI to handle large offsets
},
// large move
name: "STMG2",
auxType: auxSymOff,
argLen: 4,
+ clobberFlags: true,
faultOnNilArg0: true,
symEffect: SymWrite,
asm: s390x.ASTMG,
name: "STMG3",
auxType: auxSymOff,
argLen: 5,
+ clobberFlags: true,
faultOnNilArg0: true,
symEffect: SymWrite,
asm: s390x.ASTMG,
name: "STMG4",
auxType: auxSymOff,
argLen: 6,
+ clobberFlags: true,
faultOnNilArg0: true,
symEffect: SymWrite,
asm: s390x.ASTMG,
name: "STM2",
auxType: auxSymOff,
argLen: 4,
+ clobberFlags: true,
faultOnNilArg0: true,
symEffect: SymWrite,
asm: s390x.ASTMY,
name: "STM3",
auxType: auxSymOff,
argLen: 5,
+ clobberFlags: true,
faultOnNilArg0: true,
symEffect: SymWrite,
asm: s390x.ASTMY,
name: "STM4",
auxType: auxSymOff,
argLen: 6,
+ clobberFlags: true,
faultOnNilArg0: true,
symEffect: SymWrite,
asm: s390x.ASTMY,