package asm

import "cmd/internal/asm"

Package asm holds code shared among the assemblers.

Index

Constants

const (
	MAXALIGN = 7
	FPCHIP   = 1
	NSYMB    = 500
	BUFSIZ   = 8192
	HISTSZ   = 20
	EOF      = -1
	IGN      = -2
	NHASH    = 503
	NMACRO   = 10
)
const (
	CLAST = iota
	CMACARG
	CMACRO
	CPREPROC
)
const (
	NARG = 25
)
const (
	VARMAC = 0x80
)

Variables

var (
	LSCONST int
	LCONST  int
	LFCONST int
	LNAME   int
	LVAR    int
	LLAB    int

	Thechar     rune
	Thestring   string
	Thelinkarch *obj.LinkArch

	Arches map[string]*obj.LinkArch

	Cclean  func()
	Yyparse func()
	Syminit func(*Sym)

	Lexinit []Lextab
)

Initialized by client.

var (
	Dlist []string

	Lineno int32

	Pass int
	PC   int32

	Ctxt *obj.Link
)

Functions

func GETC

func GETC() int

func ISALPHA

func ISALPHA(c int) bool

func Main

func Main()

func Settext

func Settext(s *obj.LSym)

func Yyerror

func Yyerror(a string, args ...interface{})

func Yylex

func Yylex(yylval *Yylval) int

Types

type Io

type Io struct {
	Link *Io
	P    []byte
	F    *os.File
	B    [1024]byte
}

type Lextab

type Lextab struct {
	Name  string
	Type  int
	Value int64
}

type Macro

type Macro struct {
	Text string
	Narg int
	Dots bool
}

type Ref

type Ref struct {
	Class int
}

type Sym

type Sym struct {
	Link      *Sym
	Ref       *Ref
	Macro     *Macro
	Value     int64
	Type      int
	Name      string
	Labelname string
	Sym       int8
}

func LabelLookup

func LabelLookup(s *Sym) *Sym

func Lookup

func Lookup(symb string) *Sym

type Yylval

type Yylval struct {
	Sym  *Sym
	Lval int64
	Sval string
	Dval float64
}

Source Files

asm.go lexbody.go macbody.go

Version
v1.5.0-beta.2
Published
Jul 17, 2015
Platform
linux/amd64
Imports
10 packages
Last checked
5 minutes ago

Tools for package owners.