github.com/shogo82148/std@v1.22.1-0.20240327122250-4e474527810c/cmd/asm/internal/arch/arm64.go (about)

     1  // Copyright 2015 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  // This file encapsulates some of the odd characteristics of the ARM64
     6  // instruction set, to minimize its interaction with the core of the
     7  // assembler.
     8  
     9  package arch
    10  
    11  import (
    12  	"github.com/shogo82148/std/cmd/internal/obj"
    13  	"github.com/shogo82148/std/cmd/internal/obj/arm64"
    14  )
    15  
    16  // GetARM64SpecialOperand returns the internal representation of a special operand.
    17  func GetARM64SpecialOperand(name string) arm64.SpecialOperand
    18  
    19  // IsARM64ADR reports whether the op (as defined by an arm64.A* constant) is
    20  // one of the comparison instructions that require special handling.
    21  func IsARM64ADR(op obj.As) bool
    22  
    23  // IsARM64CMP reports whether the op (as defined by an arm64.A* constant) is
    24  // one of the comparison instructions that require special handling.
    25  func IsARM64CMP(op obj.As) bool
    26  
    27  // IsARM64STLXR reports whether the op (as defined by an arm64.A*
    28  // constant) is one of the STLXR-like instructions that require special
    29  // handling.
    30  func IsARM64STLXR(op obj.As) bool
    31  
    32  // IsARM64TBL reports whether the op (as defined by an arm64.A*
    33  // constant) is one of the TBL-like instructions and one of its
    34  // inputs does not fit into prog.Reg, so require special handling.
    35  func IsARM64TBL(op obj.As) bool
    36  
    37  // IsARM64CASP reports whether the op (as defined by an arm64.A*
    38  // constant) is one of the CASP-like instructions, and its 2nd
    39  // destination is a register pair that require special handling.
    40  func IsARM64CASP(op obj.As) bool
    41  
    42  // ARM64Suffix handles the special suffix for the ARM64.
    43  // It returns a boolean to indicate success; failure means
    44  // cond was unrecognized.
    45  func ARM64Suffix(prog *obj.Prog, cond string) bool
    46  
    47  // ARM64RegisterShift constructs an ARM64 register with shift operation.
    48  func ARM64RegisterShift(reg, op, count int16) (int64, error)
    49  
    50  // ARM64RegisterExtension constructs an ARM64 register with extension or arrangement.
    51  func ARM64RegisterExtension(a *obj.Addr, ext string, reg, num int16, isAmount, isIndex bool) error
    52  
    53  // ARM64RegisterArrangement constructs an ARM64 vector register arrangement.
    54  func ARM64RegisterArrangement(reg int16, name, arng string) (int64, error)
    55  
    56  // ARM64RegisterListOffset generates offset encoding according to AArch64 specification.
    57  func ARM64RegisterListOffset(firstReg, regCnt int, arrangement int64) (int64, error)