Skip to content

Commit 11d7775

Browse files
benshi001bradfitz
authored andcommitted
cmd/compile: remove some nacl SSA rules
Updates #30439 Change-Id: I7ef5301fbd650d26a37a1241ddf7ca1ccd58b89d Reviewed-on: https://go-review.googlesource.com/c/go/+/200941 Reviewed-by: Brad Fitzpatrick <[email protected]>
1 parent 6adaf17 commit 11d7775

File tree

6 files changed

+1
-124
lines changed

6 files changed

+1
-124
lines changed

src/cmd/compile/internal/amd64/ssa.go

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -947,13 +947,6 @@ func ssaGenValue(s *gc.SSAGenState, v *ssa.Value) {
947947
p.To.Sym = gc.BoundsCheckFunc[v.AuxInt]
948948
s.UseArgs(int64(2 * gc.Widthptr)) // space used in callee args area by assembly stubs
949949

950-
case ssa.OpAMD64LoweredPanicExtendA, ssa.OpAMD64LoweredPanicExtendB, ssa.OpAMD64LoweredPanicExtendC:
951-
p := s.Prog(obj.ACALL)
952-
p.To.Type = obj.TYPE_MEM
953-
p.To.Name = obj.NAME_EXTERN
954-
p.To.Sym = gc.ExtendCheckFunc[v.AuxInt]
955-
s.UseArgs(int64(3 * gc.Widthptr)) // space used in callee args area by assembly stubs
956-
957950
case ssa.OpAMD64NEGQ, ssa.OpAMD64NEGL,
958951
ssa.OpAMD64BSWAPQ, ssa.OpAMD64BSWAPL,
959952
ssa.OpAMD64NOTQ, ssa.OpAMD64NOTL:

src/cmd/compile/internal/ssa/gen/AMD64.rules

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -567,11 +567,6 @@
567567
(PanicBounds [kind] x y mem) && boundsABI(kind) == 1 -> (LoweredPanicBoundsB [kind] x y mem)
568568
(PanicBounds [kind] x y mem) && boundsABI(kind) == 2 -> (LoweredPanicBoundsC [kind] x y mem)
569569

570-
// For amd64p32
571-
(PanicExtend [kind] hi lo y mem) && boundsABI(kind) == 0 -> (LoweredPanicExtendA [kind] hi lo y mem)
572-
(PanicExtend [kind] hi lo y mem) && boundsABI(kind) == 1 -> (LoweredPanicExtendB [kind] hi lo y mem)
573-
(PanicExtend [kind] hi lo y mem) && boundsABI(kind) == 2 -> (LoweredPanicExtendC [kind] hi lo y mem)
574-
575570
// ***************************
576571
// Above: lowering rules
577572
// Below: optimizations

src/cmd/compile/internal/ssa/gen/AMD64Ops.go

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,6 @@ func init() {
9494
cx = buildReg("CX")
9595
dx = buildReg("DX")
9696
bx = buildReg("BX")
97-
si = buildReg("SI")
9897
gp = buildReg("AX CX DX BX BP SI DI R8 R9 R10 R11 R12 R13 R14 R15")
9998
fp = buildReg("X0 X1 X2 X3 X4 X5 X6 X7 X8 X9 X10 X11 X12 X13 X14 X15")
10099
gpsp = gp | buildReg("SP")
@@ -718,12 +717,6 @@ func init() {
718717
{name: "LoweredPanicBoundsB", argLength: 3, aux: "Int64", reg: regInfo{inputs: []regMask{cx, dx}}, typ: "Mem"}, // arg0=idx, arg1=len, arg2=mem, returns memory. AuxInt contains report code (see PanicBounds in generic.go).
719718
{name: "LoweredPanicBoundsC", argLength: 3, aux: "Int64", reg: regInfo{inputs: []regMask{ax, cx}}, typ: "Mem"}, // arg0=idx, arg1=len, arg2=mem, returns memory. AuxInt contains report code (see PanicBounds in generic.go).
720719

721-
// amd64p32 only: PanicBounds ops take 32-bit indexes.
722-
// The Extend ops are the same as the Bounds ops except the indexes are 64-bit.
723-
{name: "LoweredPanicExtendA", argLength: 4, aux: "Int64", reg: regInfo{inputs: []regMask{si, dx, bx}}, typ: "Mem"}, // arg0=idxHi, arg1=idxLo, arg2=len, arg3=mem, returns memory. AuxInt contains report code (see PanicExtend in genericOps.go).
724-
{name: "LoweredPanicExtendB", argLength: 4, aux: "Int64", reg: regInfo{inputs: []regMask{si, cx, dx}}, typ: "Mem"}, // arg0=idxHi, arg1=idxLo, arg2=len, arg3=mem, returns memory. AuxInt contains report code (see PanicExtend in genericOps.go).
725-
{name: "LoweredPanicExtendC", argLength: 4, aux: "Int64", reg: regInfo{inputs: []regMask{si, ax, cx}}, typ: "Mem"}, // arg0=idxHi, arg1=idxLo, arg2=len, arg3=mem, returns memory. AuxInt contains report code (see PanicExtend in genericOps.go).
726-
727720
// Constant flag values. For any comparison, there are 5 possible
728721
// outcomes: the three from the signed total order (<,==,>) and the
729722
// three from the unsigned total order. The == cases overlap.

src/cmd/compile/internal/ssa/gen/ARMOps.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,7 @@ func init() {
154154
reg: regInfo{
155155
inputs: []regMask{buildReg("R1"), buildReg("R0")},
156156
outputs: []regMask{buildReg("R0"), buildReg("R1")},
157-
clobbers: buildReg("R2 R3 R14"), // also clobbers R12 on NaCl (modified in ../config.go)
157+
clobbers: buildReg("R2 R3 R14"),
158158
},
159159
clobberFlags: true,
160160
typ: "(UInt32,UInt32)",

src/cmd/compile/internal/ssa/opGen.go

Lines changed: 0 additions & 39 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/cmd/compile/internal/ssa/rewriteAMD64.go

Lines changed: 0 additions & 65 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)