From: Carlos Eduardo Seo Date: Wed, 22 Mar 2017 15:25:44 +0000 (-0300) Subject: cmd/compile/internal/ppc64, cmd/compile/internal/ssa: Remove OldArch checks X-Git-Tag: go1.9beta1~1036 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=c644a76;p=gostls13.git cmd/compile/internal/ppc64, cmd/compile/internal/ssa: Remove OldArch checks Starting in go1.9, the minimum processor requirement for ppc64 is POWER8. Therefore, the checks for OldArch and the code enabled by it are not necessary anymore. Updates #19074 Change-Id: I33d6a78b2462c80d57c5dbcba2e13424630afab4 Reviewed-on: https://go-review.googlesource.com/38404 Run-TryBot: Lynn Boger TryBot-Result: Gobot Gobot Reviewed-by: Brad Fitzpatrick --- diff --git a/src/cmd/compile/internal/ppc64/ssa.go b/src/cmd/compile/internal/ppc64/ssa.go index 563db6d2f2..2d7ea63a76 100644 --- a/src/cmd/compile/internal/ppc64/ssa.go +++ b/src/cmd/compile/internal/ppc64/ssa.go @@ -765,27 +765,6 @@ func ssaGenValue(s *gc.SSAGenState, v *ssa.Value) { // rtmp := 1 // isel rt,0,rtmp,!cond // rt is target in ppc asm - if v.Block.Func.Config.OldArch { - p := s.Prog(ppc64.AMOVD) - p.From.Type = obj.TYPE_CONST - p.From.Offset = 1 - p.To.Type = obj.TYPE_REG - p.To.Reg = v.Reg() - - pb := s.Prog(condOps[v.Op]) - pb.To.Type = obj.TYPE_BRANCH - - p = s.Prog(ppc64.AMOVD) - p.From.Type = obj.TYPE_CONST - p.From.Offset = 0 - p.To.Type = obj.TYPE_REG - p.To.Reg = v.Reg() - - p = s.Prog(obj.ANOP) - gc.Patch(pb, p) - break - } - // Modern PPC uses ISEL p := s.Prog(ppc64.AMOVD) p.From.Type = obj.TYPE_CONST p.From.Offset = 1 @@ -797,30 +776,6 @@ func ssaGenValue(s *gc.SSAGenState, v *ssa.Value) { case ssa.OpPPC64FLessEqual, // These include a second branch for EQ -- dealing with NaN prevents REL= to !REL conversion ssa.OpPPC64FGreaterEqual: - if v.Block.Func.Config.OldArch { - p := s.Prog(ppc64.AMOVW) - p.From.Type = obj.TYPE_CONST - p.From.Offset = 1 - p.To.Type = obj.TYPE_REG - p.To.Reg = v.Reg() - - pb0 := s.Prog(condOps[v.Op]) - pb0.To.Type = obj.TYPE_BRANCH - pb1 := s.Prog(ppc64.ABEQ) - pb1.To.Type = obj.TYPE_BRANCH - - p = s.Prog(ppc64.AMOVW) - p.From.Type = obj.TYPE_CONST - p.From.Offset = 0 - p.To.Type = obj.TYPE_REG - p.To.Reg = v.Reg() - - p = s.Prog(obj.ANOP) - gc.Patch(pb0, p) - gc.Patch(pb1, p) - break - } - // Modern PPC uses ISEL p := s.Prog(ppc64.AMOVD) p.From.Type = obj.TYPE_CONST p.From.Offset = 1 diff --git a/src/cmd/compile/internal/ssa/config.go b/src/cmd/compile/internal/ssa/config.go index ab541ccafc..2be01d7a6f 100644 --- a/src/cmd/compile/internal/ssa/config.go +++ b/src/cmd/compile/internal/ssa/config.go @@ -34,7 +34,6 @@ type Config struct { noDuffDevice bool // Don't use Duff's device nacl bool // GOOS=nacl use387 bool // GO386=387 - OldArch bool // True for older versions of architecture, e.g. true for PPC64BE, false for PPC64LE NeedsFpScratch bool // No direct move between GP and FP register sets BigEndian bool // sparsePhiCutoff uint64 // Sparse phi location algorithm used above this #blocks*#variables score @@ -208,7 +207,6 @@ func NewConfig(arch string, types Types, ctxt *obj.Link, optimize bool) *Config c.hasGReg = true c.noDuffDevice = obj.GOOS == "darwin" // darwin linker cannot handle BR26 reloc with non-zero addend case "ppc64": - c.OldArch = true c.BigEndian = true fallthrough case "ppc64le":