github.com/q45/go@v0.0.0-20151101211701-a4fb8c13db3f/src/cmd/compile/internal/arm/galign.go (about)

     1  // Copyright 2009 The Go Authors. All rights reserved.
     2  // Use of this source code is governed by a BSD-style
     3  // license that can be found in the LICENSE file.
     4  
     5  package arm
     6  
     7  import (
     8  	"cmd/compile/internal/gc"
     9  	"cmd/internal/obj"
    10  	"cmd/internal/obj/arm"
    11  )
    12  
    13  var thechar int = '5'
    14  
    15  var thestring string = "arm"
    16  
    17  var thelinkarch *obj.LinkArch = &arm.Linkarm
    18  
    19  func linkarchinit() {
    20  }
    21  
    22  var MAXWIDTH int64 = (1 << 32) - 1
    23  
    24  /*
    25   * go declares several platform-specific type aliases:
    26   * int, uint, and uintptr
    27   */
    28  var typedefs = []gc.Typedef{
    29  	{"int", gc.TINT, gc.TINT32},
    30  	{"uint", gc.TUINT, gc.TUINT32},
    31  	{"uintptr", gc.TUINTPTR, gc.TUINT32},
    32  }
    33  
    34  func betypeinit() {
    35  	gc.Widthptr = 4
    36  	gc.Widthint = 4
    37  	gc.Widthreg = 4
    38  }
    39  
    40  func Main() {
    41  	gc.Thearch.Thechar = thechar
    42  	gc.Thearch.Thestring = thestring
    43  	gc.Thearch.Thelinkarch = thelinkarch
    44  	gc.Thearch.Typedefs = typedefs
    45  	gc.Thearch.REGSP = arm.REGSP
    46  	gc.Thearch.REGCTXT = arm.REGCTXT
    47  	gc.Thearch.REGCALLX = arm.REG_R1
    48  	gc.Thearch.REGCALLX2 = arm.REG_R2
    49  	gc.Thearch.REGRETURN = arm.REG_R0
    50  	gc.Thearch.REGMIN = arm.REG_R0
    51  	gc.Thearch.REGMAX = arm.REGEXT
    52  	gc.Thearch.FREGMIN = arm.REG_F0
    53  	gc.Thearch.FREGMAX = arm.FREGEXT
    54  	gc.Thearch.MAXWIDTH = MAXWIDTH
    55  	gc.Thearch.ReservedRegs = resvd
    56  
    57  	gc.Thearch.Betypeinit = betypeinit
    58  	gc.Thearch.Cgen64 = cgen64
    59  	gc.Thearch.Cgen_hmul = cgen_hmul
    60  	gc.Thearch.Cgen_shift = cgen_shift
    61  	gc.Thearch.Clearfat = clearfat
    62  	gc.Thearch.Cmp64 = cmp64
    63  	gc.Thearch.Defframe = defframe
    64  	gc.Thearch.Excise = excise
    65  	gc.Thearch.Expandchecks = expandchecks
    66  	gc.Thearch.Getg = getg
    67  	gc.Thearch.Gins = gins
    68  	gc.Thearch.Ginscmp = ginscmp
    69  	gc.Thearch.Ginscon = ginscon
    70  	gc.Thearch.Ginsnop = ginsnop
    71  	gc.Thearch.Gmove = gmove
    72  	gc.Thearch.Cgenindex = cgenindex
    73  	gc.Thearch.Linkarchinit = linkarchinit
    74  	gc.Thearch.Peep = peep
    75  	gc.Thearch.Proginfo = proginfo
    76  	gc.Thearch.Regtyp = regtyp
    77  	gc.Thearch.Sameaddr = sameaddr
    78  	gc.Thearch.Smallindir = smallindir
    79  	gc.Thearch.Stackaddr = stackaddr
    80  	gc.Thearch.Blockcopy = blockcopy
    81  	gc.Thearch.Sudoaddable = sudoaddable
    82  	gc.Thearch.Sudoclean = sudoclean
    83  	gc.Thearch.Excludedregs = excludedregs
    84  	gc.Thearch.RtoB = RtoB
    85  	gc.Thearch.FtoB = RtoB
    86  	gc.Thearch.BtoR = BtoR
    87  	gc.Thearch.BtoF = BtoF
    88  	gc.Thearch.Optoas = optoas
    89  	gc.Thearch.Doregbits = doregbits
    90  	gc.Thearch.Regnames = regnames
    91  
    92  	gc.Main()
    93  	gc.Exit(0)
    94  }