Home | History | Annotate | Download | only in x86
      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 x86
      6 
      7 import (
      8 	"cmd/compile/internal/gc"
      9 	"cmd/internal/obj"
     10 	"cmd/internal/obj/x86"
     11 	"fmt"
     12 	"os"
     13 )
     14 
     15 func Init() {
     16 	gc.Thearch.LinkArch = &x86.Link386
     17 	gc.Thearch.REGSP = x86.REGSP
     18 	switch v := obj.GO386; v {
     19 	case "387":
     20 		gc.Thearch.Use387 = true
     21 	case "sse2":
     22 	default:
     23 		fmt.Fprintf(os.Stderr, "unsupported setting GO386=%s\n", v)
     24 		gc.Exit(1)
     25 	}
     26 	gc.Thearch.MAXWIDTH = (1 << 32) - 1
     27 
     28 	gc.Thearch.Defframe = defframe
     29 	gc.Thearch.Proginfo = proginfo
     30 
     31 	gc.Thearch.SSAMarkMoves = ssaMarkMoves
     32 	gc.Thearch.SSAGenValue = ssaGenValue
     33 	gc.Thearch.SSAGenBlock = ssaGenBlock
     34 }
     35