mirror of
https://github.com/golang/go.git
synced 2025-12-08 06:10:04 +00:00
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:
parent
247fc4a98e
commit
f4c997578a
4 changed files with 1191 additions and 0 deletions
26
src/cmd/compile/internal/mips/galign.go
Normal file
26
src/cmd/compile/internal/mips/galign.go
Normal 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
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue