aboutsummaryrefslogtreecommitdiff
path: root/src/cmd/compile/internal/ssa/config.go
diff options
context:
space:
mode:
Diffstat (limited to 'src/cmd/compile/internal/ssa/config.go')
-rw-r--r--src/cmd/compile/internal/ssa/config.go25
1 files changed, 24 insertions, 1 deletions
diff --git a/src/cmd/compile/internal/ssa/config.go b/src/cmd/compile/internal/ssa/config.go
index 933672d007..919386e889 100644
--- a/src/cmd/compile/internal/ssa/config.go
+++ b/src/cmd/compile/internal/ssa/config.go
@@ -36,6 +36,7 @@ type Config struct {
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 //
DebugTest bool // default true unless $GOSSAHASH != ""; as a debugging aid, make new code conditional on this and use GOSSAHASH to binary search for failing cases
sparsePhiCutoff uint64 // Sparse phi location algorithm used above this #blocks*#variables score
curFunc *Func
@@ -204,6 +205,7 @@ func NewConfig(arch string, fe Frontend, ctxt *obj.Link, optimize bool) *Config
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":
c.IntSize = 8
@@ -219,7 +221,10 @@ func NewConfig(arch string, fe Frontend, ctxt *obj.Link, optimize bool) *Config
c.noDuffDevice = true // TODO: Resolve PPC64 DuffDevice (has zero, but not copy)
c.NeedsFpScratch = true
c.hasGReg = true
- case "mips64", "mips64le":
+ case "mips64":
+ c.BigEndian = true
+ fallthrough
+ case "mips64le":
c.IntSize = 8
c.PtrSize = 8
c.RegSize = 8
@@ -245,6 +250,24 @@ func NewConfig(arch string, fe Frontend, ctxt *obj.Link, optimize bool) *Config
c.LinkReg = linkRegS390X
c.hasGReg = true
c.noDuffDevice = true
+ c.BigEndian = true
+ case "mips":
+ c.BigEndian = true
+ fallthrough
+ case "mipsle":
+ c.IntSize = 4
+ c.PtrSize = 4
+ c.RegSize = 4
+ c.lowerBlock = rewriteBlockMIPS
+ c.lowerValue = rewriteValueMIPS
+ c.registers = registersMIPS[:]
+ c.gpRegMask = gpRegMaskMIPS
+ c.fpRegMask = fpRegMaskMIPS
+ c.specialRegMask = specialRegMaskMIPS
+ c.FPReg = framepointerRegMIPS
+ c.LinkReg = linkRegMIPS
+ c.hasGReg = true
+ c.noDuffDevice = true
default:
fe.Fatalf(0, "arch %s not implemented", arch)
}