github.com/gagliardetto/golang-go@v0.0.0-20201020153340-53909ea70814/cmd/compile/internal/x86/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 x86 6 7 import ( 8 "github.com/gagliardetto/golang-go/cmd/compile/internal/gc" 9 "github.com/gagliardetto/golang-go/cmd/internal/obj/x86" 10 "github.com/gagliardetto/golang-go/cmd/internal/objabi" 11 "fmt" 12 "os" 13 ) 14 15 func Init(arch *gc.Arch) { 16 arch.LinkArch = &x86.Link386 17 arch.REGSP = x86.REGSP 18 switch v := objabi.GO386; v { 19 case "387": 20 arch.Use387 = true 21 arch.SSAGenValue = ssaGenValue387 22 arch.SSAGenBlock = ssaGenBlock387 23 case "sse2": 24 arch.SSAGenValue = ssaGenValue 25 arch.SSAGenBlock = ssaGenBlock 26 default: 27 fmt.Fprintf(os.Stderr, "unsupported setting GO386=%s\n", v) 28 gc.Exit(1) 29 } 30 arch.MAXWIDTH = (1 << 32) - 1 31 32 arch.ZeroRange = zerorange 33 arch.Ginsnop = ginsnop 34 arch.Ginsnopdefer = ginsnop 35 36 arch.SSAMarkMoves = ssaMarkMoves 37 }