Documentation ¶
Index ¶
- Constants
- type Arch
- type ArchId
- type Arg
- type Arm64
- func (arch Arm64) Cast(asm *Asm, src Arg, dst Arg)
- func (Arm64) CodeString(code MachineCode) string
- func (arch Arm64) Epilogue(asm *Asm) *Asm
- func (Arm64) Id() ArchId
- func (Arm64) Init(asm *Asm, start SaveSlot, end SaveSlot) *Asm
- func (arch Arm64) MemString(m Mem) string
- func (arch Arm64) Op0(asm *Asm, op Op0) *Asm
- func (arch Arm64) Op1(asm *Asm, op Op1, a Arg) *Asm
- func (arch Arm64) Op2(asm *Asm, op Op2, src Arg, dst Arg) *Asm
- func (arch Arm64) Op3(asm *Asm, op Op3, a Arg, b Arg, dst Arg) *Asm
- func (Arm64) Op4(asm *Asm, op Op4, a Arg, b Arg, c Arg, dst Arg) *Asm
- func (Arm64) Prologue(asm *Asm) *Asm
- func (Arm64) RegIdConfig() RegIdConfig
- func (Arm64) RegIdKind(id RegId) Kind
- func (Arm64) RegIdString(id RegId) string
- func (Arm64) RegIdValid(id RegId) bool
- func (Arm64) RegString(r Reg) string
- func (Arm64) RegValid(r Reg) bool
- func (Arm64) String() string
- type Asm
- type AsmCode
- type Const
- func ConstInt(val int) Const
- func ConstInt16(val int16) Const
- func ConstInt32(val int32) Const
- func ConstInt64(val int64) Const
- func ConstInt8(val int8) Const
- func ConstInterface(ival interface{}, t reflect.Type) (Const, error)
- func ConstPointer(val *uint8) Const
- func ConstUint(val uint) Const
- func ConstUint16(val uint16) Const
- func ConstUint32(val uint32) Const
- func ConstUint64(val uint64) Const
- func ConstUint8(val uint8) Const
- func ConstUintptr(val uintptr) Const
- func MakeConst(val int64, kind Kind) Const
- type Expr
- type Immediate3
- type Kind
- type MachineCode
- type Mem
- type Op0
- type Op1
- type Op1Misc
- type Op2
- type Op2Misc
- type Op3
- type Op4
- type Reg
- type RegId
- type RegIdConfig
- type RegIds
- type Save
- type SaveSlot
- type Size
- type SoftReg
- type SoftRegId
- type SoftRegs
Constants ¶
View Source
const ( MMAP_SUPPORTED = common.MMAP_SUPPORTED SUPPORTED = MMAP_SUPPORTED NAME = "arm64" // ArchId NOARCH = common.NOARCH ARM64 = common.ARM64 // SaveSlot InvalidSlot = common.InvalidSlot // Kind Invalid = common.Invalid Bool = common.Bool Int = common.Int Int8 = common.Int8 Int16 = common.Int16 Int32 = common.Int32 Int64 = common.Int64 Uint = common.Uint Uint8 = common.Uint8 Uint16 = common.Uint16 Uint32 = common.Uint32 Uint64 = common.Uint64 Uintptr = common.Uintptr Float32 = common.Float32 Float64 = common.Float64 Ptr = common.Ptr KLo = common.KLo KHi = common.KHi // RegId NoRegId = common.NoRegId // SoftRegId FirstSoftRegId = common.FirstSoftRegId LastSoftRegId = common.LastSoftRegId FirstTempRegId = common.FirstTempRegId LastTempRegId = common.LastTempRegId // Op0 BAD = common.BAD NOP = common.NOP RET = common.RET // Op1 ZERO = common.ZERO INC = common.INC DEC = common.DEC NOT1 = common.NOT1 NEG1 = common.NEG1 JMP = common.JMP // Op1Misc ALLOC = common.ALLOC FREE = common.FREE // Op2Misc PUSH = common.PUSH POP = common.POP // Op2 ADD2 = common.ADD2 SUB2 = common.SUB2 ADC2 = common.ADC2 SBB2 = common.SBB2 MUL2 = common.MUL2 DIV2 = common.DIV2 REM2 = common.REM2 AND2 = common.AND2 OR2 = common.OR2 XOR2 = common.XOR2 SHL2 = common.SHL2 SHR2 = common.SHR2 AND_NOT2 = common.AND_NOT2 LAND2 = common.LAND2 LOR2 = common.LOR2 MOV = common.MOV CAST = common.CAST // CMP = common.CMP // XCHG = common.XCHG NEG2 = common.NEG2 NOT2 = common.NOT2 JMPIF = common.JMPIF // Op3 ADD3 = common.ADD3 SUB3 = common.SUB3 ADC3 = common.ADC3 SBB3 = common.SBB3 MUL3 = common.MUL3 DIV3 = common.DIV3 REM3 = common.REM3 AND3 = common.AND3 OR3 = common.OR3 XOR3 = common.XOR3 SHL3 = common.SHL3 SHR3 = common.SHR3 AND_NOT3 = common.AND_NOT3 LAND3 = common.LAND3 LOR3 = common.LOR3 GETIDX = common.GETIDX SETIDX = common.SETIDX )
View Source
const ( // integer registers X0 X1 X2 X3 X4 X5 X6 X7 X8 X9 X10 X11 X12 X13 X14 X15 X16 X17 X18 X19 X20 X21 X22 X23 X24 X25 X26 X27 X28 X29 X30 // depending on context, zero register or stack pointer XZR, XSP = RegId(ARM64-1)<<8 + iota, RegId(ARM64-1)<<8 + iota // floating-point registers D0 = RegId(ARM64-1)<<8 + iota D1 D2 D3 D4 D5 D6 D7 D8 D9 D10 D11 D12 D13 D14 D15 D16 D17 D18 D19 D20 D21 D22 D23 D24 D25 D26 D27 D28 D29 D30 D31 RLo = X0 RHi = D31 // stack pointer RSP = XSP // suggested register to point to local variables RVAR = X29 )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Arm64 ¶
type Arm64 struct { }
func (Arm64) CodeString ¶
func (Arm64) CodeString(code MachineCode) string
print arm64 machine code as sequence of 4-byte instructions
func (Arm64) Prologue ¶
Prologue used to add the following instruction to generated code, but now it does nothing, because adding ANY code is the user's responsibility:
ldr x29, [sp, #8]
equivalent to: asm.Asm(MOV, MakeMem(8, XSP, Uint64), MakeReg(X29, Uint64))
func (Arm64) RegIdConfig ¶
func (Arm64) RegIdConfig() RegIdConfig
func (Arm64) RegIdString ¶
func (Arm64) RegIdValid ¶
type Const ¶
func ConstInt16 ¶
func ConstInt32 ¶
func ConstInt64 ¶
func ConstPointer ¶
guaranteed to work only if val points to non-Go memory, as for example C/C++ memory
func ConstUint16 ¶
func ConstUint32 ¶
func ConstUint64 ¶
func ConstUint8 ¶
func ConstUintptr ¶
type Immediate3 ¶
type Immediate3 uint8
style of immediate constants embeddable in a single Op3 instruction
const ( Imm3None Immediate3 = iota Imm3AddSub // 12 bits wide, possibly shifted left by 12 bits Imm3Bitwise // complicated Imm3Shift // 0..63 for 64 bit registers; 0..31 for 32 bit registers Imm3Index // 0..4095 index for GETIDX or SETIDX )
type MachineCode ¶
type MachineCode = common.MachineCode // assembled machine code
type RegIdConfig ¶
type RegIdConfig = common.RegIdConfig
type SoftReg ¶
func MakeSoftReg ¶
Source Files ¶
Click to show internal directories.
Click to hide internal directories.