Documentation ¶
Index ¶
- Constants
- type Amd64
- func (Amd64) CodeString(code MachineCode) string
- func (Amd64) Epilogue(asm *Asm) *Asm
- func (Amd64) Id() ArchId
- func (Amd64) Init(asm *Asm, start SaveSlot, end SaveSlot) *Asm
- func (arch Amd64) MemString(m Mem) string
- func (arch Amd64) Op0(asm *Asm, op Op0) *Asm
- func (arch Amd64) Op1(asm *Asm, op Op1, a Arg) *Asm
- func (arch Amd64) Op2(asm *Asm, op Op2, src Arg, dst Arg) *Asm
- func (arch Amd64) Op3(asm *Asm, op Op3, a Arg, b Arg, dst Arg) *Asm
- func (arch Amd64) Op4(asm *Asm, op Op4, a Arg, b Arg, c Arg, dst Arg) *Asm
- func (Amd64) Prologue(asm *Asm) *Asm
- func (Amd64) RegIdConfig() RegIdConfig
- func (Amd64) RegIdKind(id RegId) Kind
- func (Amd64) RegIdString(id RegId) string
- func (Amd64) RegIdValid(id RegId) bool
- func (Amd64) RegString(r Reg) string
- func (Amd64) RegValid(r Reg) bool
- func (Amd64) String() string
- type Arch
- type ArchId
- type Arg
- 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 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 = "amd64" // ArchId NOARCH = common.NOARCH AMD64 = common.AMD64 // 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 // 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 LEA2 = common.LEA2 // CMP = common.CMP // XCHG = common.XCHG NEG2 = common.NEG2 NOT2 = common.NOT2 JMPIF = common.JMPIF // Op2Misc ALLOC = common.ALLOC FREE = common.FREE PUSH = common.PUSH POP = common.POP // 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 // Op4 LEA4 = common.LEA4 )
View Source
const ( RAX RCX RDX RBX RSP RBP RSI RDI R8 R9 R10 R11 R12 R13 R14 R15 RLo RegId = RAX RHi RegId = R15 // suggested register to point to local variables RVAR = RSI )
============================================================================ register
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Amd64 ¶
type Amd64 struct { }
func (Amd64) CodeString ¶
func (Amd64) CodeString(code MachineCode) string
func (Amd64) Op2 ¶
============================================================================ dst OP= src
func (Amd64) 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:
movq 0x8(%rsp), %rdi
equivalent to
asm.Asm(MOV, MakeMem(8, RSP, Uint64), MakeReg(RDI, Uint64))
func (Amd64) RegIdConfig ¶
func (Amd64) RegIdConfig() RegIdConfig
func (Amd64) RegIdString ¶
func (Amd64) 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 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.