x86_linux

package
v0.0.0-...-6e409f7 Latest Latest
Warning

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

Go to latest
Published: Oct 13, 2014 License: MIT Imports: 7 Imported by: 0

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

View Source
var CALLEE_SAVE_REGISTERS = []int{x86.BX, x86.BP, x86.SI, x86.DI}

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{}

Jump to

Keyboard shortcuts

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