2015-03-08 01:32:55 -07:00
|
|
|
// Copyright 2009 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.
|
|
|
|
|
2015-05-21 11:28:10 -06:00
|
|
|
package arm64
|
2015-03-08 01:32:55 -07:00
|
|
|
|
|
|
|
import (
|
2015-05-21 11:28:10 -06:00
|
|
|
"cmd/compile/internal/gc"
|
2015-03-08 01:32:55 -07:00
|
|
|
"cmd/internal/obj"
|
2015-03-08 07:16:29 -06:00
|
|
|
"cmd/internal/obj/arm64"
|
2015-03-08 01:32:55 -07:00
|
|
|
)
|
|
|
|
|
2015-03-08 07:16:29 -06:00
|
|
|
var thechar int = '7'
|
2015-03-08 01:32:55 -07:00
|
|
|
|
2015-03-08 07:16:29 -06:00
|
|
|
var thestring string = "arm64"
|
2015-03-08 01:32:55 -07:00
|
|
|
|
2015-03-08 07:16:29 -06:00
|
|
|
var thelinkarch *obj.LinkArch = &arm64.Linkarm64
|
2015-03-08 01:32:55 -07:00
|
|
|
|
|
|
|
func linkarchinit() {
|
|
|
|
}
|
|
|
|
|
|
|
|
var MAXWIDTH int64 = 1 << 50
|
|
|
|
|
|
|
|
/*
|
|
|
|
* go declares several platform-specific type aliases:
|
2015-04-13 17:04:02 -06:00
|
|
|
* int, uint, and uintptr
|
2015-03-08 01:32:55 -07:00
|
|
|
*/
|
|
|
|
var typedefs = []gc.Typedef{
|
|
|
|
gc.Typedef{"int", gc.TINT, gc.TINT64},
|
|
|
|
gc.Typedef{"uint", gc.TUINT, gc.TUINT64},
|
|
|
|
gc.Typedef{"uintptr", gc.TUINTPTR, gc.TUINT64},
|
|
|
|
}
|
|
|
|
|
|
|
|
func betypeinit() {
|
|
|
|
gc.Widthptr = 8
|
|
|
|
gc.Widthint = 8
|
|
|
|
gc.Widthreg = 8
|
|
|
|
}
|
|
|
|
|
2015-05-21 11:28:10 -06:00
|
|
|
func Main() {
|
2015-03-08 01:32:55 -07:00
|
|
|
gc.Thearch.Thechar = thechar
|
|
|
|
gc.Thearch.Thestring = thestring
|
|
|
|
gc.Thearch.Thelinkarch = thelinkarch
|
|
|
|
gc.Thearch.Typedefs = typedefs
|
2015-03-08 07:16:29 -06:00
|
|
|
gc.Thearch.REGSP = arm64.REGSP
|
|
|
|
gc.Thearch.REGCTXT = arm64.REGCTXT
|
2015-03-18 15:26:36 -06:00
|
|
|
gc.Thearch.REGCALLX = arm64.REGRT1
|
|
|
|
gc.Thearch.REGCALLX2 = arm64.REGRT2
|
|
|
|
gc.Thearch.REGRETURN = arm64.REG_R0
|
|
|
|
gc.Thearch.REGMIN = arm64.REG_R0
|
|
|
|
gc.Thearch.REGMAX = arm64.REG_R31
|
2015-04-09 05:25:48 -06:00
|
|
|
gc.Thearch.REGZERO = arm64.REGZERO
|
2015-03-18 15:26:36 -06:00
|
|
|
gc.Thearch.FREGMIN = arm64.REG_F0
|
|
|
|
gc.Thearch.FREGMAX = arm64.REG_F31
|
2015-03-08 01:32:55 -07:00
|
|
|
gc.Thearch.MAXWIDTH = MAXWIDTH
|
2015-03-18 15:26:36 -06:00
|
|
|
gc.Thearch.ReservedRegs = resvd
|
|
|
|
|
2015-03-08 01:32:55 -07:00
|
|
|
gc.Thearch.Betypeinit = betypeinit
|
2015-03-18 15:26:36 -06:00
|
|
|
gc.Thearch.Cgen_hmul = cgen_hmul
|
|
|
|
gc.Thearch.Cgen_shift = cgen_shift
|
2015-03-08 01:32:55 -07:00
|
|
|
gc.Thearch.Clearfat = clearfat
|
|
|
|
gc.Thearch.Defframe = defframe
|
2015-03-18 15:26:36 -06:00
|
|
|
gc.Thearch.Dodiv = dodiv
|
2015-03-08 01:32:55 -07:00
|
|
|
gc.Thearch.Excise = excise
|
|
|
|
gc.Thearch.Expandchecks = expandchecks
|
2015-04-03 10:23:28 -06:00
|
|
|
gc.Thearch.Getg = getg
|
2015-03-08 01:32:55 -07:00
|
|
|
gc.Thearch.Gins = gins
|
2015-05-06 10:28:19 -06:00
|
|
|
gc.Thearch.Ginscmp = ginscmp
|
2015-03-18 15:26:36 -06:00
|
|
|
gc.Thearch.Ginscon = ginscon
|
|
|
|
gc.Thearch.Ginsnop = ginsnop
|
2015-03-18 10:29:40 -06:00
|
|
|
gc.Thearch.Gmove = gmove
|
2015-03-08 01:32:55 -07:00
|
|
|
gc.Thearch.Linkarchinit = linkarchinit
|
|
|
|
gc.Thearch.Peep = peep
|
|
|
|
gc.Thearch.Proginfo = proginfo
|
|
|
|
gc.Thearch.Regtyp = regtyp
|
|
|
|
gc.Thearch.Sameaddr = sameaddr
|
|
|
|
gc.Thearch.Smallindir = smallindir
|
|
|
|
gc.Thearch.Stackaddr = stackaddr
|
2015-04-08 11:34:42 -06:00
|
|
|
gc.Thearch.Blockcopy = blockcopy
|
2015-03-18 15:26:36 -06:00
|
|
|
gc.Thearch.Sudoaddable = sudoaddable
|
|
|
|
gc.Thearch.Sudoclean = sudoclean
|
2015-03-08 01:32:55 -07:00
|
|
|
gc.Thearch.Excludedregs = excludedregs
|
|
|
|
gc.Thearch.RtoB = RtoB
|
|
|
|
gc.Thearch.FtoB = RtoB
|
|
|
|
gc.Thearch.BtoR = BtoR
|
|
|
|
gc.Thearch.BtoF = BtoF
|
|
|
|
gc.Thearch.Optoas = optoas
|
|
|
|
gc.Thearch.Doregbits = doregbits
|
|
|
|
gc.Thearch.Regnames = regnames
|
|
|
|
|
|
|
|
gc.Main()
|
|
|
|
gc.Exit(0)
|
|
|
|
}
|