Commit 1da575a7 authored by Cherry Zhang's avatar Cherry Zhang

cmd/internal/obj/s390x: add support of SPM instruction

For restoring condition code (we already support IPM instruction
for saving condition code).

Change-Id: I56d376df44a5f831134a130d052521cec6b5b781
Reviewed-on: https://go-review.googlesource.com/c/go/+/204104Reviewed-by: default avatarMichael Munday <mike.munday@ibm.com>
parent 7dcd343e
......@@ -284,6 +284,9 @@ TEXT main·foo(SB),DUPOK|NOSPLIT,$16-0 // TEXT main.foo(SB), DUPOK|NOSPLIT, $16-
IPM R3 // b2220030
IPM R12 // b22200c0
SPM R1 // 0410
SPM R10 // 04a0
BRC $7, 0(PC) // a7740000
BNE 0(PC) // a7740000
BEQ 0(PC) // a7840000
......
......@@ -386,6 +386,9 @@ const (
// insert program mask
AIPM
// set program mask
ASPM
// compare and swap
ACS
ACSG
......
......@@ -138,6 +138,7 @@ var Anames = []string{
"TMLH",
"TMLL",
"IPM",
"SPM",
"CS",
"CSG",
"SYNC",
......
......@@ -286,6 +286,9 @@ var optab = []Optab{
// insert program mask
{i: 92, as: AIPM, a1: C_REG},
// set program mask
{i: 76, as: ASPM, a1: C_REG},
// 32-bit access registers
{i: 68, as: AMOVW, a1: C_AREG, a6: C_REG},
{i: 68, as: AMOVWZ, a1: C_AREG, a6: C_REG},
......@@ -3630,6 +3633,9 @@ func (c *ctxtz) asmout(p *obj.Prog, asm *[]byte) {
}
c.addrilreloc(p.From.Sym, int64(i2))
case 76: // set program mask
zRR(op_SPM, uint32(p.From.Reg), 0, asm)
case 77: // syscall $constant
if p.From.Offset > 255 || p.From.Offset < 1 {
c.ctxt.Diag("illegal system call; system call number out of range: %v", p)
......
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