cmd/compile: add support for GOARCH=mips{,le}

Change-Id: Ib489dc847787aaab7ba1be96792f885469e346ae
Reviewed-on: https://go-review.googlesource.com/31479
Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Cherry Zhang <cherryyz@google.com>
This commit is contained in:
Vladimir Stefanovic 2016-10-18 23:50:44 +02:00 committed by Brad Fitzpatrick
parent 247fc4a98e
commit f4c997578a
4 changed files with 1191 additions and 0 deletions

View file

@ -0,0 +1,26 @@
// Copyright 2016 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package mips
import (
"cmd/compile/internal/gc"
"cmd/compile/internal/ssa"
"cmd/internal/obj"
"cmd/internal/obj/mips"
)
func Init() {
gc.Thearch.LinkArch = &mips.Linkmips
if obj.GOARCH == "mipsle" {
gc.Thearch.LinkArch = &mips.Linkmipsle
}
gc.Thearch.REGSP = mips.REGSP
gc.Thearch.MAXWIDTH = (1 << 31) - 1
gc.Thearch.Defframe = defframe
gc.Thearch.Proginfo = proginfo
gc.Thearch.SSAMarkMoves = func(s *gc.SSAGenState, b *ssa.Block) {}
gc.Thearch.SSAGenValue = ssaGenValue
gc.Thearch.SSAGenBlock = ssaGenBlock
}