1
0
mirror of https://github.com/golang/go synced 2024-09-30 11:18:33 -06:00

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 <laboger@linux.vnet.ibm.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
This commit is contained in:
Carlos Eduardo Seo 2017-03-22 12:25:44 -03:00 committed by Lynn Boger
parent 189053aee2
commit c644a76e1f
2 changed files with 0 additions and 47 deletions

View File

@ -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

View File

@ -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":