aarch64translation

package
v0.0.0-...-1a8d72d Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 2, 2025 License: GPL-3.0 Imports: 23 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var AllRegisterNames = append(append([]string{}, x0toX30RegisterNames...), spRegisterName, xzrRegisterName)
View Source
var ValidGPRegisterNames = append(append([]string{}, x0toX30RegisterNames...), xzrRegisterName)
View Source
var ValidGPorSPRegisterNames = append(append([]string{}, x0toX30RegisterNames...), spRegisterName)

Functions

func ArgumentToAarch64GPRegister

func ArgumentToAarch64GPRegister(
	argument gen.ArgumentInfo,
) (registers.GPRegister, core.ResultList)

func ArgumentToAarch64GPorSPRegister

func ArgumentToAarch64GPorSPRegister(
	argument gen.ArgumentInfo,
) (registers.GPorSPRegister, core.ResultList)

func ArgumentToAarch64Immediate12

func ArgumentToAarch64Immediate12(
	argument gen.ArgumentInfo,
) (immediates.Immediate12, core.ResultList)

func ArgumentToAarch64Immediate16

func ArgumentToAarch64Immediate16(
	argument gen.ArgumentInfo,
) (immediates.Immediate16, core.ResultList)

func ArgumentToAarch64MovShift

func ArgumentToAarch64MovShift(
	argument gen.ArgumentInfo,
) (instructions.MovShift, core.ResultList)

func ArgumentToFunctionInfo

func ArgumentToFunctionInfo(
	argument gen.ArgumentInfo,
) (*gen.FunctionInfo, core.ResultList)

func ArgumentToImmediateInfo

func ArgumentToImmediateInfo(
	argument gen.ArgumentInfo,
) (*gen.ImmediateInfo, core.ResultList)

func ArgumentToLabelInfo

func ArgumentToLabelInfo(argument gen.ArgumentInfo) (*gen.LabelInfo, core.ResultList)

func AssertIntegerTypeOfSize

func AssertIntegerTypeOfSize(
	typ gen.ReferencedTypeInfo,
	expectedSize *big.Int,
) core.ResultList

func BigIntToAarch64Immediate12

func BigIntToAarch64Immediate12(
	view *core.UnmanagedSourceView,
	bigInt *big.Int,
) (value immediates.Immediate12, results core.ResultList)

func BigIntToAarch64Immediate16

func BigIntToAarch64Immediate16(
	view *core.UnmanagedSourceView,
	bigInt *big.Int,
) (value immediates.Immediate16, results core.ResultList)

func BigIntToAarch64MovShift

func BigIntToAarch64MovShift(
	view *core.UnmanagedSourceView,
	bigInt *big.Int,
) (instructions.MovShift, core.ResultList)

func BinaryInstructionToAarch64

func BinaryInstructionToAarch64(
	info *gen.InstructionInfo,
) (Xd, Xn, Xm registers.GPRegister, results core.ResultList)

BinaryInstructionToAarch64 converts a binary instruction to its AArch64 representation.

Assumes that the number of targets and arguments has already been validated using the ValidateBinaryInstruction function.

func Immediate12GPRegisterTargetInstructionToAarch64

func Immediate12GPRegisterTargetInstructionToAarch64(
	info *gen.InstructionInfo,
) (
	Xd registers.GPRegister,
	Xn registers.GPorSPRegister,
	imm immediates.Immediate12,
	results core.ResultList,
)

Immediate12GPRegisterTargetInstructionToAarch64 converts a binary instruction with its target as GPRegister, first argument as a GPorSPRegister and its second argument as an Immediate12 to it's codegen representation.

Assumes that the number of targets and arguments has already been validated using the ValidateBinaryInstruction function.

func Immediate12InstructionToAarch64

func Immediate12InstructionToAarch64(
	info *gen.InstructionInfo,
) (
	Xd, Xn registers.GPorSPRegister,
	imm immediates.Immediate12,
	results core.ResultList,
)

func IsIntegerType

func IsIntegerType(typ gen.ReferencedTypeInfo) *big.Int

Checks if the provided type is an integer type. If it is, returns the size of the integer type, in bits. Otherwise, returns nil.

func RegisterNameToAarch64GPRegister

func RegisterNameToAarch64GPRegister(
	name string,
) (registers.GPRegister, bool)

func RegisterNameToAarch64GPorSPRegister

func RegisterNameToAarch64GPorSPRegister(
	name string,
) (registers.GPorSPRegister, bool)

func RegisterToAarch64GPOrSPRegister

func RegisterToAarch64GPOrSPRegister(
	register *gen.RegisterInfo,
) (registers.GPorSPRegister, core.ResultList)

func RegisterToAarch64GPRegister

func RegisterToAarch64GPRegister(
	register *gen.RegisterInfo,
) (registers.GPRegister, core.ResultList)

func TargetToAarch64GPRegister

func TargetToAarch64GPRegister(
	target *gen.TargetInfo,
) (registers.GPRegister, core.ResultList)

func TargetToAarch64GPorSPRegister

func TargetToAarch64GPorSPRegister(
	target *gen.TargetInfo,
) (registers.GPorSPRegister, core.ResultList)

func ToMachoObject

func ToMachoObject(
	data *transform.TargetData,
) (*transform.TargetData, core.ResultList)

func TypeNameToSize

func TypeNameToSize(name string) *big.Int

TypeNameToSize converts a type name to its size in bits. For example, "$64" will return 64, and "$128" will return 128. If the type name is not a valid integer type name, it returns nil.

func Uint64DiffToOffset19Align4

func Uint64DiffToOffset19Align4(
	dst, src uint64,
) (immediates.Offset19Align4, error)

func Uint64DiffToOffset26Align4

func Uint64DiffToOffset26Align4(
	dst, src uint64,
) (immediates.Offset26Align4, error)

func ValidateBinaryInstruction

func ValidateBinaryInstruction(
	info *gen.InstructionInfo,
) core.ResultList

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL