Home | History | Annotate | Download | only in amd64
      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 amd64
      6 
      7 import (
      8 	"cmd/compile/internal/gc"
      9 	"cmd/internal/obj"
     10 	"cmd/internal/obj/x86"
     11 )
     12 
     13 var leaptr = x86.ALEAQ
     14 
     15 func Init() {
     16 	gc.Thearch.LinkArch = &x86.Linkamd64
     17 	if obj.GOARCH == "amd64p32" {
     18 		gc.Thearch.LinkArch = &x86.Linkamd64p32
     19 		leaptr = x86.ALEAL
     20 	}
     21 	gc.Thearch.REGSP = x86.REGSP
     22 	gc.Thearch.MAXWIDTH = 1 << 50
     23 
     24 	gc.Thearch.Defframe = defframe
     25 	gc.Thearch.Proginfo = proginfo
     26 
     27 	gc.Thearch.SSAMarkMoves = ssaMarkMoves
     28 	gc.Thearch.SSAGenValue = ssaGenValue
     29 	gc.Thearch.SSAGenBlock = ssaGenBlock
     30 }
     31