github.com/go-asm/go@v1.21.1-0.20240213172139-40c5ead50c48/cmd/compile/loong64/galign.go (about)

     1  // Copyright 2022 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 loong64
     6  
     7  import (
     8  	"github.com/go-asm/go/cmd/compile/ssa"
     9  	"github.com/go-asm/go/cmd/compile/ssagen"
    10  	"github.com/go-asm/go/cmd/obj/loong64"
    11  )
    12  
    13  func Init(arch *ssagen.ArchInfo) {
    14  	arch.LinkArch = &loong64.Linkloong64
    15  	arch.REGSP = loong64.REGSP
    16  	arch.MAXWIDTH = 1 << 50
    17  	arch.ZeroRange = zerorange
    18  	arch.Ginsnop = ginsnop
    19  
    20  	arch.SSAMarkMoves = func(s *ssagen.State, b *ssa.Block) {}
    21  	arch.SSAGenValue = ssaGenValue
    22  	arch.SSAGenBlock = ssaGenBlock
    23  	arch.LoadRegResult = loadRegResult
    24  	arch.SpillArgReg = spillArgReg
    25  }