Documentation ¶
Index ¶
- Constants
- func ARM64Suffix(prog *obj.Prog, cond string) bool
- func ARMConditionCodes(prog *obj.Prog, cond string) bool
- func ARMMRCOffset(op obj.As, cond string, x0, x1, x2, x3, x4, x5 int64) (offset int64, op0 obj.As, ok bool)
- func IsAMD4OP(op obj.As) bool
- func IsARM64CMP(op obj.As) bool
- func IsARM64STLXR(op obj.As) bool
- func IsARMCMP(op obj.As) bool
- func IsARMFloatCmp(op obj.As) bool
- func IsARMMRC(op obj.As) bool
- func IsARMMULA(op obj.As) bool
- func IsARMSTREX(op obj.As) bool
- func IsMIPS64CMP(op obj.As) bool
- func IsMIPS64MUL(op obj.As) bool
- func IsPPC64CMP(op obj.As) bool
- func IsPPC64NEG(op obj.As) bool
- func IsPPC64RLD(op obj.As) bool
- func IsS390xCMP(op obj.As) bool
- func IsS390xNEG(op obj.As) bool
- func IsS390xRLD(op obj.As) bool
- func IsS390xWithIndex(op obj.As) bool
- func IsS390xWithLength(op obj.As) bool
- func IsSPARC64CMP(op obj.As) bool
- func ParseARM64Suffix(cond string) (uint8, bool)
- func ParseARMCondition(cond string) (uint8, bool)
- func ParseSPARC64Suffix(cond string) (uint8, bool)
- func SPARC64Suffix(prog *obj.Prog, cond string) bool
- type Arch
Constants ¶
const ( RFP = -(iota + 1) RSB RSP RPC )
Pseudo-registers whose names are the constant name without the leading R.
Variables ¶
This section is empty.
Functions ¶
func ARM64Suffix ¶
ARM64Suffix handles the special suffix for the ARM64. It returns a boolean to indicate success; failure means cond was unrecognized.
func ARMConditionCodes ¶
ARMConditionCodes handles the special condition code situation for the ARM. It returns a boolean to indicate success; failure means cond was unrecognized.
func ARMMRCOffset ¶
func ARMMRCOffset(op obj.As, cond string, x0, x1, x2, x3, x4, x5 int64) (offset int64, op0 obj.As, ok bool)
ARMMRCOffset implements the peculiar encoding of the MRC and MCR instructions. The difference between MRC and MCR is represented by a bit high in the word, not in the usual way by the opcode itself. Asm must use AMRC for both instructions, so we return the opcode for MRC so that asm doesn't need to import obj/arm.
func IsAMD4OP ¶
IsAMD4OP reports whether the op (as defined by an ppc64.A* constant) is The FMADD-like instructions behave similarly.
func IsARM64CMP ¶
IsARM64CMP reports whether the op (as defined by an arm.A* constant) is one of the comparison instructions that require special handling.
func IsARM64STLXR ¶
IsARM64STLXR reports whether the op (as defined by an arm64.A* constant) is one of the STLXR-like instructions that require special handling.
func IsARMCMP ¶
IsARMCMP reports whether the op (as defined by an arm.A* constant) is one of the comparison instructions that require special handling.
func IsARMFloatCmp ¶
IsARMFloatCmp reports whether the op is a floating comparison instruction.
func IsARMMULA ¶
IsARMMULA reports whether the op (as defined by an arm.A* constant) is MULA, MULAWT or MULAWB, the 4-operand instructions.
func IsARMSTREX ¶
IsARMSTREX reports whether the op (as defined by an arm.A* constant) is one of the STREX-like instructions that require special handling.
func IsMIPS64CMP ¶
IsMIPS64CMP reports whether the op (as defined by an mips.A* constant) is one of the CMP instructions that require special handling.
func IsMIPS64MUL ¶
IsMIPS64MUL reports whether the op (as defined by an mips.A* constant) is one of the MUL/DIV/REM instructions that require special handling.
func IsPPC64CMP ¶
IsPPC64CMP reports whether the op (as defined by an ppc64.A* constant) is one of the CMP instructions that require special handling.
func IsPPC64NEG ¶
IsPPC64NEG reports whether the op (as defined by an ppc64.A* constant) is one of the NEG-like instructions that require special handling.
func IsPPC64RLD ¶
IsPPC64RLD reports whether the op (as defined by an ppc64.A* constant) is one of the RLD-like instructions that require special handling. The FMADD-like instructions behave similarly.
func IsS390xCMP ¶
IsS390xCMP reports whether the op (as defined by an s390x.A* constant) is one of the CMP instructions that require special handling.
func IsS390xNEG ¶
IsS390xNEG reports whether the op (as defined by an s390x.A* constant) is one of the NEG-like instructions that require special handling.
func IsS390xRLD ¶
IsS390xRLD reports whether the op (as defined by an s390x.A* constant) is one of the RLD-like instructions that require special handling. The FMADD-like instructions behave similarly.
func IsS390xWithIndex ¶
IsS390xWithIndex reports whether the op (as defined by an s390x.A* constant) refers to an instruction which takes an index as its first argument.
func IsS390xWithLength ¶
IsS390xWithLength reports whether the op (as defined by an s390x.A* constant) refers to an instruction which takes a length as its first argument.
func IsSPARC64CMP ¶
IsSPARC64CMP reports whether the op (as defined by an arm.A* constant) is one of the comparison instructions that require special handling.
func ParseARM64Suffix ¶
ParseARM64Suffix parses the suffix attached to an ARM64 instruction. The input is a single string consisting of period-separated condition codes, such as ".P.W". An initial period is ignored.
func ParseARMCondition ¶
ParseARMCondition parses the conditions attached to an ARM instruction. The input is a single string consisting of period-separated condition codes, such as ".P.W". An initial period is ignored.
func ParseSPARC64Suffix ¶
ParseSPARC64Suffix parses the suffix attached to an SPARC64 instruction.
Types ¶
type Arch ¶
type Arch struct { *obj.LinkArch // Map of instruction names to enumeration. Instructions map[string]obj.As // Map of register names to enumeration. Register map[string]int16 // Table of register prefix names. These are things like R for R(0) and SPR for SPR(268). RegisterPrefix map[string]bool // RegisterNumber converts R(10) into arm.REG_R10. RegisterNumber func(string, int16) (int16, bool) // Instruction is a jump. IsJump func(word string) bool }
Arch wraps the link architecture object with more architecture-specific information.