Documentation
¶
Index ¶
- Constants
- type AttrKind
- type CallInstr
- type FuncInfo
- type Transformer
- func (p *Transformer) Alignof(typ llvm.Type) int
- func (p *Transformer) GetFuncInfo(ctx llvm.Context, typ llvm.Type) (info FuncInfo)
- func (p *Transformer) GetTypeInfo(ctx llvm.Context, ftyp llvm.Type, typ llvm.Type, index int) *TypeInfo
- func (p *Transformer) IsWrapType(ctx llvm.Context, ftyp llvm.Type, typ llvm.Type, index int) bool
- func (p *Transformer) LowerWideVectorCalls(m llvm.Module)
- func (p *Transformer) LowerWindowsVectorParams(m llvm.Module)
- func (p *Transformer) SetSkipFuncs(names []string)
- func (p *Transformer) Sizeof(typ llvm.Type) int
- func (p *Transformer) TransformModule(path string, m llvm.Module)
- type TypeInfo
- type TypeInfo386
- type TypeInfoAmd64
- type TypeInfoArm
- type TypeInfoArm64
- type TypeInfoEsp32
- type TypeInfoRiscv32
- func (p *TypeInfoRiscv32) GetTypeInfo(ctx llvm.Context, ftyp llvm.Type, typ llvm.Type, index int) *TypeInfo
- func (p *TypeInfoRiscv32) IsWrapType(ctx llvm.Context, ftyp llvm.Type, typ llvm.Type, index int) bool
- func (p *TypeInfoRiscv32) SkipEmptyParams() bool
- func (p *TypeInfoRiscv32) SupportByVal() bool
- type TypeInfoRiscv64
- func (p *TypeInfoRiscv64) GetTypeInfo(ctx llvm.Context, ftyp llvm.Type, typ llvm.Type, index int) *TypeInfo
- func (p *TypeInfoRiscv64) IsWrapType(ctx llvm.Context, ftyp llvm.Type, typ llvm.Type, index int) bool
- func (p *TypeInfoRiscv64) SkipEmptyParams() bool
- func (p *TypeInfoRiscv64) SupportByVal() bool
- type TypeInfoSys
- type TypeInfoWasm
- type TypeInfoWindows386
- func (p *TypeInfoWindows386) GetTypeInfo(ctx llvm.Context, ftyp llvm.Type, typ llvm.Type, index int) *TypeInfo
- func (p *TypeInfoWindows386) IsWrapType(ctx llvm.Context, ftyp llvm.Type, typ llvm.Type, index int) bool
- func (p *TypeInfoWindows386) SkipEmptyParams() bool
- func (p *TypeInfoWindows386) SupportByVal() bool
- type TypeInfoWindowsAmd64
- func (p *TypeInfoWindowsAmd64) GetTypeInfo(ctx llvm.Context, ftyp llvm.Type, typ llvm.Type, index int) *TypeInfo
- func (p *TypeInfoWindowsAmd64) IsWrapType(ctx llvm.Context, ftyp llvm.Type, typ llvm.Type, index int) bool
- func (p *TypeInfoWindowsAmd64) SkipEmptyParams() bool
- func (p *TypeInfoWindowsAmd64) SupportByVal() bool
- type TypeInfoWindowsArm64
Constants ¶
const ( MABI_LP64 = "lp64" MABI_LP64F = "lp64f" MABI_LP64D = "lp64d" )
const ( MABI_ILP32 = "ilp32" MABI_ILP32F = "ilp32f" MABI_ILP32D = "ilp32d" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AttrKind ¶
type AttrKind int
const ( AttrNone AttrKind = iota // keep org type AttrVoid // return type void / param type void (size == 0) skip AttrPointer // type => type* AttrWidthType // type => width int i16/i24/i32/i40/i48/i56/i64 float/double AttrWidthType2 // type => width two int {i64,i16} float/double AttrExtract // extract struct type )
type FuncInfo ¶
type Transformer ¶
type Transformer struct {
// contains filtered or unexported fields
}
func NewTransformer ¶
func (*Transformer) GetFuncInfo ¶
func (*Transformer) GetTypeInfo ¶
func (*Transformer) IsWrapType ¶
func (*Transformer) LowerWideVectorCalls ¶ added in v1.0.10
func (p *Transformer) LowerWideVectorCalls(m llvm.Module)
LowerWideVectorCalls gives LLGo's amd64 wide-vector values a feature-neutral memory ABI before FMV builds forwarding entries. A baseline caller and an AVX2 callee must not independently choose XMM versus YMM call carriers. This also covers multiple-result tuples; source Go aggregates already use their Go storage representation. Native C wide-vector bindings are rejected by the frontend and are not part of this internal ABI.
func (*Transformer) LowerWindowsVectorParams ¶ added in v1.0.7
func (p *Transformer) LowerWindowsVectorParams(m llvm.Module)
LowerWindowsVectorParams exposes the native Win64 indirect vector-parameter ABI before FMV creates musttail forwarding functions. Otherwise LLVM's late ABI lowering copies a vector into the forwarding function's own stack frame, then passes a dangling pointer when the tail jump releases that frame. Vector results still use XMM0. This does not lower aggregate parameters or zero-sized CPU-query receivers; the subsequent aggregate ABI pass handles those.
func (*Transformer) SetSkipFuncs ¶
func (p *Transformer) SetSkipFuncs(names []string)
SetSkipFuncs configures function full names that should not be transformed. Names are LLVM symbol names (for example, "internal/bytealg.Compare"). The list is applied to both function signature rewriting and call-site rewriting.
func (*Transformer) TransformModule ¶
func (p *Transformer) TransformModule(path string, m llvm.Module)
type TypeInfo ¶
type TypeInfo struct {
Type llvm.Type
NativeType llvm.Type // native aggregate layout when it differs from Type
Kind AttrKind
Type1 llvm.Type // AttrWidthType
Type2 llvm.Type // AttrWidthType2
Size int
Align int
ByValAlign int // explicit stack alignment for AttrPointer parameters
StackAlign int // alignstack attribute for direct HFA parameters
// PreservePointerABI prevents later argument/return promotion from restoring
// a feature-dependent vector ABI across baseline and specialized functions.
PreservePointerABI bool
}
type TypeInfo386 ¶
type TypeInfo386 struct {
*Transformer
}
func (*TypeInfo386) GetTypeInfo ¶
func (*TypeInfo386) IsWrapType ¶
func (*TypeInfo386) SkipEmptyParams ¶
func (p *TypeInfo386) SkipEmptyParams() bool
func (*TypeInfo386) SupportByVal ¶
func (p *TypeInfo386) SupportByVal() bool
type TypeInfoAmd64 ¶
type TypeInfoAmd64 struct {
*Transformer
// contains filtered or unexported fields
}
func (*TypeInfoAmd64) GetTypeInfo ¶
func (*TypeInfoAmd64) IsWrapType ¶
func (*TypeInfoAmd64) SkipEmptyParams ¶
func (p *TypeInfoAmd64) SkipEmptyParams() bool
func (*TypeInfoAmd64) SupportByVal ¶
func (p *TypeInfoAmd64) SupportByVal() bool
type TypeInfoArm ¶
type TypeInfoArm struct {
*Transformer
}
func (*TypeInfoArm) GetTypeInfo ¶
func (*TypeInfoArm) IsWrapType ¶
func (*TypeInfoArm) SkipEmptyParams ¶
func (p *TypeInfoArm) SkipEmptyParams() bool
func (*TypeInfoArm) SupportByVal ¶
func (p *TypeInfoArm) SupportByVal() bool
type TypeInfoArm64 ¶
type TypeInfoArm64 struct {
*Transformer
// contains filtered or unexported fields
}
func (*TypeInfoArm64) GetTypeInfo ¶
func (*TypeInfoArm64) IsWrapType ¶
func (*TypeInfoArm64) SkipEmptyParams ¶
func (p *TypeInfoArm64) SkipEmptyParams() bool
func (*TypeInfoArm64) SupportByVal ¶
func (p *TypeInfoArm64) SupportByVal() bool
type TypeInfoEsp32 ¶
type TypeInfoEsp32 struct {
*Transformer
}
func (*TypeInfoEsp32) GetTypeInfo ¶
func (*TypeInfoEsp32) IsWrapType ¶
func (*TypeInfoEsp32) SkipEmptyParams ¶
func (p *TypeInfoEsp32) SkipEmptyParams() bool
func (*TypeInfoEsp32) SupportByVal ¶
func (p *TypeInfoEsp32) SupportByVal() bool
type TypeInfoRiscv32 ¶
type TypeInfoRiscv32 struct {
*Transformer
// contains filtered or unexported fields
}
func (*TypeInfoRiscv32) GetTypeInfo ¶
func (*TypeInfoRiscv32) IsWrapType ¶
func (*TypeInfoRiscv32) SkipEmptyParams ¶
func (p *TypeInfoRiscv32) SkipEmptyParams() bool
func (*TypeInfoRiscv32) SupportByVal ¶
func (p *TypeInfoRiscv32) SupportByVal() bool
type TypeInfoRiscv64 ¶
type TypeInfoRiscv64 struct {
*Transformer
// contains filtered or unexported fields
}
func (*TypeInfoRiscv64) GetTypeInfo ¶
func (*TypeInfoRiscv64) IsWrapType ¶
func (*TypeInfoRiscv64) SkipEmptyParams ¶
func (p *TypeInfoRiscv64) SkipEmptyParams() bool
func (*TypeInfoRiscv64) SupportByVal ¶
func (p *TypeInfoRiscv64) SupportByVal() bool
type TypeInfoSys ¶
type TypeInfoWasm ¶
type TypeInfoWasm struct {
*Transformer
}
func (*TypeInfoWasm) GetTypeInfo ¶
func (*TypeInfoWasm) IsWrapType ¶
func (*TypeInfoWasm) SkipEmptyParams ¶
func (p *TypeInfoWasm) SkipEmptyParams() bool
func (*TypeInfoWasm) SupportByVal ¶
func (p *TypeInfoWasm) SupportByVal() bool
type TypeInfoWindows386 ¶ added in v1.0.1
type TypeInfoWindows386 struct {
*Transformer
}
TypeInfoWindows386 implements the Microsoft x86 structure-return rules and the cdecl aggregate parameter rules emitted by Clang for the MSVC target.
func (*TypeInfoWindows386) GetTypeInfo ¶ added in v1.0.1
func (*TypeInfoWindows386) IsWrapType ¶ added in v1.0.1
func (*TypeInfoWindows386) SkipEmptyParams ¶ added in v1.0.1
func (p *TypeInfoWindows386) SkipEmptyParams() bool
func (*TypeInfoWindows386) SupportByVal ¶ added in v1.0.1
func (p *TypeInfoWindows386) SupportByVal() bool
type TypeInfoWindowsAmd64 ¶ added in v1.0.1
type TypeInfoWindowsAmd64 struct {
*Transformer
}
TypeInfoWindowsAmd64 implements the Microsoft x64 ABI aggregate rules. Unlike the SysV ABI, ordinary aggregates are never split across multiple registers. Aggregates of exactly 1, 2, 4, or 8 bytes use one integer register; all other non-empty aggregates are passed or returned indirectly.
func (*TypeInfoWindowsAmd64) GetTypeInfo ¶ added in v1.0.1
func (*TypeInfoWindowsAmd64) IsWrapType ¶ added in v1.0.1
func (*TypeInfoWindowsAmd64) SkipEmptyParams ¶ added in v1.0.1
func (p *TypeInfoWindowsAmd64) SkipEmptyParams() bool
func (*TypeInfoWindowsAmd64) SupportByVal ¶ added in v1.0.1
func (p *TypeInfoWindowsAmd64) SupportByVal() bool
type TypeInfoWindowsArm64 ¶ added in v1.0.1
type TypeInfoWindowsArm64 struct {
*TypeInfoArm64
}
Windows on ARM64 follows the AAPCS64 aggregate classification implemented by TypeInfoArm64. Keep a distinct selected type so OS-specific ABI changes cannot silently fall back to an architecture-only implementation.
func (*TypeInfoWindowsArm64) GetTypeInfo ¶ added in v1.0.1
func (*TypeInfoWindowsArm64) SkipEmptyParams ¶ added in v1.0.1
func (p *TypeInfoWindowsArm64) SkipEmptyParams() bool