diff options
| author | Paul E. Murphy <murp@ibm.com> | 2022-11-11 08:38:50 -0600 |
|---|---|---|
| committer | Paul Murphy <murp@ibm.com> | 2023-09-07 19:20:03 +0000 |
| commit | d80f3966b8b5b2a6e606b416fe80dffeb810ab68 (patch) | |
| tree | d59dbe2843f3e44ad985f7f2001014c165b96253 /src | |
| parent | 2b46cffe574432bd902e9e20fb00846cc2d2817d (diff) | |
| download | go-d80f3966b8b5b2a6e606b416fe80dffeb810ab68.tar.xz | |
cmd/internal/obj/ppc64: do not assemble non-constant rotate RLWMI
Unlike RLWNM, the ISA only supports an immediate rotate operand.
Update optab and opirrr to avoid quietly assembling this insn.
Change-Id: I1472a431cb8a870d55d5fff79ab905c4c459f630
Reviewed-on: https://go-review.googlesource.com/c/go/+/449835
Reviewed-by: Cherry Mui <cherryyz@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Lynn Boger <laboger@linux.vnet.ibm.com>
Reviewed-by: Matthew Dempsky <mdempsky@google.com>
Run-TryBot: Paul Murphy <murp@ibm.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Diffstat (limited to 'src')
| -rw-r--r-- | src/cmd/internal/obj/ppc64/asm9.go | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/src/cmd/internal/obj/ppc64/asm9.go b/src/cmd/internal/obj/ppc64/asm9.go index 4559eed36a..660a27b5cf 100644 --- a/src/cmd/internal/obj/ppc64/asm9.go +++ b/src/cmd/internal/obj/ppc64/asm9.go @@ -185,8 +185,10 @@ var optab = []Optab{ {as: ASRAD, a1: C_SCON, a6: C_REG, type_: 56, size: 4}, {as: ARLWMI, a1: C_SCON, a2: C_REG, a3: C_LCON, a6: C_REG, type_: 62, size: 4}, {as: ARLWMI, a1: C_SCON, a2: C_REG, a3: C_SCON, a4: C_SCON, a6: C_REG, type_: 102, size: 4}, - {as: ARLWMI, a1: C_REG, a2: C_REG, a3: C_LCON, a6: C_REG, type_: 63, size: 4}, - {as: ARLWMI, a1: C_REG, a2: C_REG, a3: C_SCON, a4: C_SCON, a6: C_REG, type_: 103, size: 4}, + {as: ARLWNM, a1: C_SCON, a2: C_REG, a3: C_LCON, a6: C_REG, type_: 62, size: 4}, + {as: ARLWNM, a1: C_SCON, a2: C_REG, a3: C_SCON, a4: C_SCON, a6: C_REG, type_: 102, size: 4}, + {as: ARLWNM, a1: C_REG, a2: C_REG, a3: C_LCON, a6: C_REG, type_: 63, size: 4}, + {as: ARLWNM, a1: C_REG, a2: C_REG, a3: C_SCON, a4: C_SCON, a6: C_REG, type_: 103, size: 4}, {as: ACLRLSLWI, a1: C_SCON, a2: C_REG, a3: C_LCON, a6: C_REG, type_: 62, size: 4}, {as: ARLDMI, a1: C_SCON, a2: C_REG, a3: C_LCON, a6: C_REG, type_: 30, size: 4}, {as: ARLDC, a1: C_SCON, a2: C_REG, a3: C_LCON, a6: C_REG, type_: 29, size: 4}, @@ -1995,7 +1997,8 @@ func buildop(ctxt *obj.Link) { case ARLWMI: opset(ARLWMICC, r0) - opset(ARLWNM, r0) + + case ARLWNM: opset(ARLWNMCC, r0) case ARLDMI: @@ -3927,7 +3930,7 @@ func asmout(c *ctxt9, p *obj.Prog, o *Optab, out *[5]uint32) { sh := uint32(c.regoff(&p.From)) o1 = OP_RLW(c.opirr(p.As), uint32(p.To.Reg), uint32(p.Reg), sh, mb, me) - case 103: /* RLWMI rb,rs,$mb,$me,rt (M-form opcode)*/ + case 103: /* RLWNM rb,rs,$mb,$me,rt (M-form opcode)*/ mb := uint32(c.regoff(&p.RestArgs[0].Addr)) me := uint32(c.regoff(&p.RestArgs[1].Addr)) o1 = OP_RLW(c.oprrr(p.As), uint32(p.To.Reg), uint32(p.Reg), uint32(p.From.Reg), mb, me) @@ -4446,10 +4449,6 @@ func (c *ctxt9) oprrr(a obj.As) uint32 { case AHRFID: return OPVCC(19, 274, 0, 0) - case ARLWMI: - return OPVCC(20, 0, 0, 0) - case ARLWMICC: - return OPVCC(20, 0, 0, 1) case ARLWNM: return OPVCC(23, 0, 0, 0) case ARLWNMCC: |
