Documentation ¶
Index ¶
Constants ¶
View Source
const ( LABEL_SYMBOL_BASE = ".L" CONST_SYMBOL_BASE = ".LC" // Flags SectionFlag_allocatable = "a" SectionFlag_writable = "w" SectionFlag_executable = "x" SectionFlag_sectiongroup = "G" SectionFlag_strings = "S" SectionFlag_threadlocalstorage = "T" // argument of "G" flag Linkage_linkonce = "comdat" // Types SectionType_bits = "@progbits" SectionType_nobits = "@nobits" SectionType_note = "@note" SymbolType_function = "@function" PICThunkSectionFlags = SectionFlag_allocatable + SectionFlag_executable + SectionFlag_sectiongroup STACK_WORD_SIZE = int64(4) )
View Source
const PARAM_START_WORD = int64(2) // return addr and saved up
Variables ¶
Functions ¶
This section is empty.
Types ¶
type AssemblyCode ¶
type AssemblyCode struct { NaturalType int LabelSymbols *xtc_asm.SymbolTable Assemblies []xtc_core.IAssembly // contains filtered or unexported fields }
func NewAssemblyCode ¶
func NewAssemblyCode(naturalType int, labelSymbols *xtc_asm.SymbolTable) *AssemblyCode
func (*AssemblyCode) GetAssemblies ¶
func (self *AssemblyCode) GetAssemblies() []xtc_core.IAssembly
func (*AssemblyCode) GetStatistics ¶
func (self *AssemblyCode) GetStatistics() *xtc_asm.Statistics
func (*AssemblyCode) ToSource ¶
func (self *AssemblyCode) ToSource() string
type CodeGenerator ¶
type CodeGenerator struct {
// contains filtered or unexported fields
}
func NewCodeGenerator ¶
func NewCodeGenerator(errorHandler *xtc_core.ErrorHandler, options *xtc_core.Options) *CodeGenerator
func (*CodeGenerator) Generate ¶
func (self *CodeGenerator) Generate(ir *xtc_ir.IR) (*AssemblyCode, error)
func (*CodeGenerator) VisitExpr ¶
func (self *CodeGenerator) VisitExpr(unknown xtc_core.IExpr) interface{}
func (*CodeGenerator) VisitStmt ¶
func (self *CodeGenerator) VisitStmt(unknown xtc_core.IStmt) interface{}
Click to show internal directories.
Click to hide internal directories.