go.go 17.6 KB
Newer Older
1 2 3 4 5 6 7 8
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.

package gc

import (
	"bytes"
9
	"cmd/compile/internal/big"
10 11 12 13 14 15 16 17 18 19
	"cmd/internal/obj"
)

// avoid <ctype.h>

// The parser's maximum stack size.
// We have to use a #define macro here since yacc
// or bison will check for its definition and use
// a potentially smaller value if it is undefined.
const (
20 21 22 23 24 25 26 27 28 29 30 31
	NHUNK           = 50000
	BUFSIZ          = 8192
	NSYMB           = 500
	NHASH           = 1024
	MAXALIGN        = 7
	UINF            = 100
	PRIME1          = 3
	BADWIDTH        = -1000000000
	MaxStackVarSize = 10 * 1024 * 1024
)

const (
32 33
	// These values are known by runtime.
	// The MEMx and NOEQx values must run in parallel.  See algtype.
34
	AMEM = iota
35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55
	AMEM0
	AMEM8
	AMEM16
	AMEM32
	AMEM64
	AMEM128
	ANOEQ
	ANOEQ0
	ANOEQ8
	ANOEQ16
	ANOEQ32
	ANOEQ64
	ANOEQ128
	ASTRING
	AINTER
	ANILINTER
	ASLICE
	AFLOAT32
	AFLOAT64
	ACPLX64
	ACPLX128
56
	AUNK = 100
57 58 59
)

const (
60 61 62 63 64
	// Maximum size in bits for Mpints before signalling
	// overflow and also mantissa precision for Mpflts.
	Mpprec = 512
	// Turn on for constant arithmetic debugging output.
	Mpdebug = false
65 66
)

67
// Mpint represents an integer constant.
68
type Mpint struct {
Russ Cox's avatar
Russ Cox committed
69 70 71
	Val  big.Int
	Ovf  bool // set if Val overflowed compiler limit (sticky)
	Rune bool // set if syntax indicates default type rune
72 73
}

74
// Mpflt represents a floating-point constant.
75
type Mpflt struct {
76
	Val big.Float
77 78
}

79
// Mpcplx represents a complex constant.
80 81 82 83 84 85
type Mpcplx struct {
	Real Mpflt
	Imag Mpflt
}

type Val struct {
86
	// U contains one of:
Russ Cox's avatar
Russ Cox committed
87 88 89 90 91 92
	// bool     bool when n.ValCtype() == CTBOOL
	// *Mpint   int when n.ValCtype() == CTINT, rune when n.ValCtype() == CTRUNE
	// *Mpflt   float when n.ValCtype() == CTFLT
	// *Mpcplx  pair of floats when n.ValCtype() == CTCPLX
	// string   string when n.ValCtype() == CTSTR
	// *Nilval  when n.ValCtype() == CTNIL
93
	U interface{}
94 95
}

Russ Cox's avatar
Russ Cox committed
96 97 98 99 100
type NilVal struct{}

func (v Val) Ctype() int {
	switch x := v.U.(type) {
	default:
101
		Fatalf("unexpected Ctype for %T", v.U)
102 103
		panic("not reached")
	case nil:
Russ Cox's avatar
Russ Cox committed
104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122
		return 0
	case *NilVal:
		return CTNIL
	case bool:
		return CTBOOL
	case *Mpint:
		if x.Rune {
			return CTRUNE
		}
		return CTINT
	case *Mpflt:
		return CTFLT
	case *Mpcplx:
		return CTCPLX
	case string:
		return CTSTR
	}
}

123
type Pkg struct {
124 125
	Name     string // package name
	Path     string // string literal used in import statement
126
	Pathsym  *Sym
127 128 129 130 131
	Prefix   string // escaped path for use in symbol table
	Imported uint8  // export data of this package was parsed
	Exported int8   // import line written in export data
	Direct   int8   // imported directly
	Safe     bool   // whether the package is marked as safe
132
	Syms     map[string]*Sym
133 134 135
}

type Sym struct {
136 137 138 139 140 141 142 143
	Lexical   uint16
	Flags     uint8
	Link      *Sym
	Uniqgen   uint32
	Importdef *Pkg   // where imported definition was found
	Linkname  string // link name

	// saved and restored by dcopy
144
	Pkg        *Pkg
145 146 147 148 149 150
	Name       string // variable name
	Def        *Node  // definition: ONAME OTYPE OPACK or OLITERAL
	Label      *Label // corresponding label (ephemeral)
	Block      int32  // blocknumber to catch redeclaration
	Lastlineno int32  // last declaration for diagnostic
	Origpkg    *Pkg   // original package for . import
151
	Lsym       *obj.LSym
152
	Fsym       *Sym // funcsym
153 154 155 156
}

type Type struct {
	Etype       uint8
157
	Nointerface bool
158 159
	Noalg       uint8
	Chan        uint8
160
	Trecur      uint8 // to detect loops
161
	Printed     uint8
162
	Embedded    uint8 // TFIELD embedded type
163
	Siggen      uint8
164
	Funarg      uint8 // on TSTRUCT and TFIELD
165
	Copyany     uint8
166
	Local       bool // created in this file
167
	Deferwidth  uint8
168
	Broke       uint8 // broken type definition.
169
	Isddd       bool  // TFIELD is ... argument
170
	Align       uint8
171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216
	Haspointers uint8 // 0 unknown, 1 no, 2 yes

	Nod    *Node // canonical OTYPE node
	Orig   *Type // original type (type literal or predefined type)
	Lineno int

	// TFUNC
	Thistuple int
	Outtuple  int
	Intuple   int
	Outnamed  uint8

	Method  *Type
	Xmethod *Type

	Sym    *Sym
	Vargen int32 // unique name for OTYPE/ONAME

	Nname  *Node
	Argwid int64

	// most nodes
	Type  *Type // actual type for TFIELD, element type for TARRAY, TCHAN, TMAP, TPTRxx
	Width int64 // offset in TFIELD, width in all others

	// TFIELD
	Down  *Type   // next struct field, also key type in TMAP
	Outer *Type   // outer struct
	Note  *string // literal string annotation

	// TARRAY
	Bound int64 // negative is dynamic array

	// TMAP
	Bucket *Type // internal type representing a hash bucket
	Hmap   *Type // internal type representing a Hmap (map header object)
	Hiter  *Type // internal type representing hash iterator state
	Map    *Type // link from the above 3 internal types back to the map type.

	Maplineno   int32 // first use of TFORW as map key
	Embedlineno int32 // first use of TFORW as embedded type

	// for TFORW, where to copy the eventual value to
	Copyto *NodeList

	Lastfn *Node // for usefield
217 218 219
}

type Label struct {
220 221 222
	Used uint8
	Sym  *Sym
	Def  *Node
223
	Use  []*Node
224 225 226 227 228 229 230
	Link *Label

	// for use during gen
	Gotopc   *obj.Prog // pointer to unresolved gotos
	Labelpc  *obj.Prog // pointer to code
	Breakpc  *obj.Prog // pointer to code
	Continpc *obj.Prog // pointer to code
231 232 233
}

type InitEntry struct {
234 235
	Xoffset int64 // struct, array only
	Expr    *Node // bytes of run-time computed expressions
236 237 238 239 240 241 242 243 244 245
}

type InitPlan struct {
	Lit  int64
	Zero int64
	Expr int64
	E    []InitEntry
}

const (
246
	SymExport   = 1 << 0 // to be exported
247
	SymPackage  = 1 << 1
248
	SymExported = 1 << 2 // already written out by export
249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264
	SymUniq     = 1 << 3
	SymSiggen   = 1 << 4
	SymAsm      = 1 << 5
	SymAlgGen   = 1 << 6
)

var dclstack *Sym

type Iter struct {
	Done  int
	Tfunc *Type
	T     *Type
}

const (
	Txxx = iota
265

266 267 268 269 270 271 272 273 274 275 276
	TINT8
	TUINT8
	TINT16
	TUINT16
	TINT32
	TUINT32
	TINT64
	TUINT64
	TINT
	TUINT
	TUINTPTR
277

278 279
	TCOMPLEX64
	TCOMPLEX128
280

281 282
	TFLOAT32
	TFLOAT64
283

284
	TBOOL
285

286 287
	TPTR32
	TPTR64
288

289 290 291 292 293 294 295 296 297 298 299 300
	TFUNC
	TARRAY
	T_old_DARRAY
	TSTRUCT
	TCHAN
	TMAP
	TINTER
	TFORW
	TFIELD
	TANY
	TSTRING
	TUNSAFEPTR
301 302

	// pseudo-types for literals
303 304 305
	TIDEAL
	TNIL
	TBLANK
306 307

	// pseudo-type for frame layout
308 309 310
	TFUNCARGS
	TCHANARGS
	TINTERMETH
311

312 313 314 315 316
	NTYPE
)

const (
	CTxxx = iota
317

318 319 320 321 322 323 324 325 326 327
	CTINT
	CTRUNE
	CTFLT
	CTCPLX
	CTSTR
	CTBOOL
	CTNIL
)

const (
328 329
	/* types of channel */
	/* must match ../../pkg/nreflect/type.go:/Chandir */
330 331 332 333 334 335 336 337
	Cxxx  = 0
	Crecv = 1 << 0
	Csend = 1 << 1
	Cboth = Crecv | Csend
)

// declaration context
const (
338
	Pxxx      = uint8(iota)
339 340 341 342 343 344 345 346 347
	PEXTERN   // global variable
	PAUTO     // local variables
	PPARAM    // input arguments
	PPARAMOUT // output results
	PPARAMREF // closure variable reference
	PFUNC     // global function

	PDISCARD // discard during parse of duplicate import

348
	PHEAP = uint8(1 << 7) // an extra bit to identify an escaped variable
349 350 351
)

const (
352 353
	Etop      = 1 << 1 // evaluated at statement level
	Erv       = 1 << 2 // evaluated in value context
354
	Etype     = 1 << 3
355 356 357 358 359 360 361 362
	Ecall     = 1 << 4  // call-only expressions are ok
	Efnstruct = 1 << 5  // multivalue function returns are ok
	Eiota     = 1 << 6  // iota is ok
	Easgn     = 1 << 7  // assigning to expression
	Eindir    = 1 << 8  // indirecting through expression
	Eaddr     = 1 << 9  // taking address of expression
	Eproc     = 1 << 10 // inside a go statement
	Ecomplit  = 1 << 11 // type in composite literal
363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388
)

type Typedef struct {
	Name   string
	Etype  int
	Sameas int
}

type Sig struct {
	name   string
	pkg    *Pkg
	isym   *Sym
	tsym   *Sym
	type_  *Type
	mtype  *Type
	offset int32
	link   *Sig
}

type Io struct {
	infile     string
	bin        *obj.Biobuf
	nlsemi     int
	eofnl      int
	last       int
	peekc      int
389 390
	peekc1     int    // second peekc for ...
	cp         string // used for content when bin==nil
391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407
	importsafe bool
}

type Dlist struct {
	field *Type
}

type Idir struct {
	link *Idir
	dir  string
}

/*
 * argument passing to/from
 * smagic and umagic
 */
type Magic struct {
408 409 410 411 412 413 414 415 416 417 418 419
	W   int // input for both - width
	S   int // output for both - shift
	Bad int // output for both - unexpected failure

	// magic multiplier for signed literal divisors
	Sd int64 // input - literal divisor
	Sm int64 // output - multiplier

	// magic multiplier for unsigned literal divisors
	Ud uint64 // input - literal divisor
	Um uint64 // output - multiplier
	Ua int    // output - adder
420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478
}

/*
 * note this is the runtime representation
 * of the compilers arrays.
 *
 * typedef	struct
 * {				// must not move anything
 *	uchar	array[8];	// pointer to data
 *	uchar	nel[4];		// number of elements
 *	uchar	cap[4];		// allocated number of elements
 * } Array;
 */
var Array_array int // runtime offsetof(Array,array) - same for String

var Array_nel int // runtime offsetof(Array,nel) - same for String

var Array_cap int // runtime offsetof(Array,cap)

var sizeof_Array int // runtime sizeof(Array)

/*
 * note this is the runtime representation
 * of the compilers strings.
 *
 * typedef	struct
 * {				// must not move anything
 *	uchar	array[8];	// pointer to data
 *	uchar	nel[4];		// number of elements
 * } String;
 */
var sizeof_String int // runtime sizeof(String)

var dotlist [10]Dlist // size is max depth of embeddeds

var curio Io

var pushedio Io

var lexlineno int32

var lineno int32

var prevlineno int32

var pragcgobuf string

var infile string

var outfile string

var bout *obj.Biobuf

var nerrors int

var nsavederrors int

var nsyntaxerrors int

479
var decldepth int32
480 481 482 483 484 485 486 487 488 489 490 491 492 493 494

var safemode int

var nolocalimports int

var lexbuf bytes.Buffer
var strbuf bytes.Buffer

var litbuf string

var Debug [256]int

var debugstr string

var Debug_checknil int
495
var Debug_typeassert int
496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548

var importmyname *Sym // my name for package

var localpkg *Pkg // package being compiled

var importpkg *Pkg // package being imported

var structpkg *Pkg // package that declared struct, during import

var builtinpkg *Pkg // fake package for builtins

var gostringpkg *Pkg // fake pkg for Go strings

var itabpkg *Pkg // fake pkg for itab cache

var Runtimepkg *Pkg // package runtime

var racepkg *Pkg // package runtime/race

var typepkg *Pkg // fake package for runtime type info (headers)

var typelinkpkg *Pkg // fake package for runtime type info (data)

var weaktypepkg *Pkg // weak references to runtime type info

var unsafepkg *Pkg // package unsafe

var trackpkg *Pkg // fake package for field tracking

var Tptr int // either TPTR32 or TPTR64

var myimportpath string

var idirs *Idir

var localimport string

var asmhdr string

var Types [NTYPE]*Type

var idealstring *Type

var idealbool *Type

var bytetype *Type

var runetype *Type

var errortype *Type

var Simtype [NTYPE]uint8

549 550 551 552 553 554 555 556 557
var (
	Isptr     [NTYPE]bool
	isforw    [NTYPE]bool
	Isint     [NTYPE]bool
	Isfloat   [NTYPE]bool
	Iscomplex [NTYPE]bool
	Issigned  [NTYPE]bool
	issimple  [NTYPE]bool
)
558

559 560 561 562 563 564 565 566 567 568 569 570
var (
	okforeq    [NTYPE]bool
	okforadd   [NTYPE]bool
	okforand   [NTYPE]bool
	okfornone  [NTYPE]bool
	okforcmp   [NTYPE]bool
	okforbool  [NTYPE]bool
	okforcap   [NTYPE]bool
	okforlen   [NTYPE]bool
	okforarith [NTYPE]bool
	okforconst [NTYPE]bool
)
571

572 573 574 575
var (
	okfor [OEND][]bool
	iscmp [OEND]bool
)
576 577 578 579 580 581 582 583 584 585 586 587 588

var Minintval [NTYPE]*Mpint

var Maxintval [NTYPE]*Mpint

var minfltval [NTYPE]*Mpflt

var maxfltval [NTYPE]*Mpflt

var xtop *NodeList

var externdcl *NodeList

589
var exportlist []*Node
590 591 592 593 594

var importlist *NodeList // imported functions and methods with inlinable bodies

var funcsyms *NodeList

595
var dclcontext uint8 // PEXTERN/PAUTO
596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632

var incannedimport int

var statuniqgen int // name generator for static temps

var loophack int

var iota_ int32

var lastconst *NodeList

var lasttype *Node

var Maxarg int64

var Stksize int64 // stack size for current frame

var stkptrsize int64 // prefix of stack containing pointers

var blockgen int32 // max block number

var block int32 // current block number

var Hasdefer int // flag that curfn has defer statetment

var Curfn *Node

var Widthptr int

var Widthint int

var Widthreg int

var typesw *Node

var nblank *Node

633 634 635 636
var hunk string

var nhunk int32

637 638
var thunk int32

639
var Funcdepth int32
640

641
var typecheckok bool
642 643 644 645 646 647 648 649 650 651 652 653 654 655 656

var compiling_runtime int

var compiling_wrappers int

var use_writebarrier int

var pure_go int

var flag_installsuffix string

var flag_race int

var flag_largemodel int

657 658 659 660 661 662
// Pending annotations for next func declaration.
var (
	noescape       bool
	nosplit        bool
	nowritebarrier bool
	systemstack    bool
663
	norace         bool
664
)
665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688

var debuglive int

var Ctxt *obj.Link

var nointerface bool

var writearchive int

var bstdout obj.Biobuf

var Nacl bool

var continpc *obj.Prog

var breakpc *obj.Prog

var Pc *obj.Prog

var nodfp *Node

var Disable_checknil int

type Flow struct {
689 690 691
	Prog   *obj.Prog // actual instruction
	P1     *Flow     // predecessors of this instruction: p1,
	P2     *Flow     // and then p2 linked though p2link.
692
	P2link *Flow
693
	S1     *Flow // successors of this instruction (at most two: s1 and s2).
694
	S2     *Flow
695 696 697 698 699 700 701 702 703 704
	Link   *Flow // next instruction in function code

	Active int32 // usable by client

	Id     int32  // sequence number in flow graph
	Rpo    int32  // reverse post ordering
	Loop   uint16 // x5 for every loop
	Refset uint8  // diagnostic generated

	Data interface{} // for use by client
705 706 707 708 709
}

type Graph struct {
	Start *Flow
	Num   int
710 711 712 713

	// After calling flowrpo, rpo lists the flow nodes in reverse postorder,
	// and each non-dead Flow node f has g->rpo[f->rpo] == f.
	Rpo []*Flow
714 715 716 717 718 719 720
}

/*
 *	interface to back end
 */

const (
721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741
	// Pseudo-op, like TEXT, GLOBL, TYPE, PCDATA, FUNCDATA.
	Pseudo = 1 << 1

	// There's nothing to say about the instruction,
	// but it's still okay to see.
	OK = 1 << 2

	// Size of right-side write, or right-side read if no write.
	SizeB = 1 << 3
	SizeW = 1 << 4
	SizeL = 1 << 5
	SizeQ = 1 << 6
	SizeF = 1 << 7
	SizeD = 1 << 8

	// Left side (Prog.from): address taken, read, write.
	LeftAddr  = 1 << 9
	LeftRead  = 1 << 10
	LeftWrite = 1 << 11

	// Register in middle (Prog.reg); only ever read. (arm, ppc64)
742 743
	RegRead    = 1 << 12
	CanRegRead = 1 << 13
744 745

	// Right side (Prog.to): address taken, read, write.
746 747 748
	RightAddr  = 1 << 14
	RightRead  = 1 << 15
	RightWrite = 1 << 16
749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770

	// Instruction kinds
	Move  = 1 << 17 // straight move
	Conv  = 1 << 18 // size conversion
	Cjmp  = 1 << 19 // conditional jump
	Break = 1 << 20 // breaks control flow (no fallthrough)
	Call  = 1 << 21 // function call
	Jump  = 1 << 22 // jump
	Skip  = 1 << 23 // data instruction

	// Set, use, or kill of carry bit.
	// Kill means we never look at the carry bit after this kind of instruction.
	SetCarry  = 1 << 24
	UseCarry  = 1 << 25
	KillCarry = 1 << 26

	// Special cases for register use. (amd64, 386)
	ShiftCX  = 1 << 27 // possible shift by CX
	ImulAXDX = 1 << 28 // possible multiply into DX:AX

	// Instruction updates whichever of from/to is type D_OREG. (ppc64)
	PostInc = 1 << 29
771 772 773
)

type Arch struct {
774 775 776 777 778 779 780 781 782 783 784
	Thechar      int
	Thestring    string
	Thelinkarch  *obj.LinkArch
	Typedefs     []Typedef
	REGSP        int
	REGCTXT      int
	REGCALLX     int // BX
	REGCALLX2    int // AX
	REGRETURN    int // AX
	REGMIN       int
	REGMAX       int
785
	REGZERO      int // architectural zero register, if available
786 787 788 789 790 791 792
	FREGMIN      int
	FREGMAX      int
	MAXWIDTH     int64
	ReservedRegs []int

	AddIndex     func(*Node, int64, *Node) bool // optional
	Betypeinit   func()
793 794
	Bgen_float   func(*Node, bool, int, *obj.Prog) // optional
	Cgen64       func(*Node, *Node)                // only on 32-bit systems
795 796 797 798 799 800 801 802 803 804 805
	Cgenindex    func(*Node, *Node, bool) *obj.Prog
	Cgen_bmul    func(int, *Node, *Node, *Node) bool
	Cgen_float   func(*Node, *Node) // optional
	Cgen_hmul    func(*Node, *Node, *Node)
	Cgen_shift   func(int, bool, *Node, *Node, *Node)
	Clearfat     func(*Node)
	Cmp64        func(*Node, *Node, int, int, *obj.Prog) // only on 32-bit systems
	Defframe     func(*obj.Prog)
	Dodiv        func(int, *Node, *Node, *Node)
	Excise       func(*Flow)
	Expandchecks func(*obj.Prog)
806
	Getg         func(*Node)
807
	Gins         func(int, *Node, *Node) *obj.Prog
808 809 810 811 812 813 814 815

	// Ginscmp generates code comparing n1 to n2 and jumping away if op is satisfied.
	// The returned prog should be Patch'ed with the jump target.
	// If op is not satisfied, code falls through to the next emitted instruction.
	// Likely is the branch prediction hint: +1 for likely, -1 for unlikely, 0 for no opinion.
	//
	// Ginscmp must be able to handle all kinds of arguments for n1 and n2,
	// not just simple registers, although it can assume that there are no
816 817 818
	// function calls needed during the evaluation, and on 32-bit systems
	// the values are guaranteed not to be 64-bit values, so no in-memory
	// temporaries are necessary.
819 820
	Ginscmp func(op int, t *Type, n1, n2 *Node, likely int) *obj.Prog

821 822 823 824 825 826
	// Ginsboolval inserts instructions to convert the result
	// of a just-completed comparison to a boolean value.
	// The first argument is the conditional jump instruction
	// corresponding to the desired value.
	// The second argument is the destination.
	// If not present, Ginsboolval will be emulated with jumps.
827 828
	Ginsboolval func(int, *Node)

829 830 831 832 833 834 835 836 837 838 839
	Ginscon      func(int, int64, *Node)
	Ginsnop      func()
	Gmove        func(*Node, *Node)
	Igenindex    func(*Node, *Node, bool) *obj.Prog
	Linkarchinit func()
	Peep         func(*obj.Prog)
	Proginfo     func(*obj.Prog) // fills in Prog.Info
	Regtyp       func(*obj.Addr) bool
	Sameaddr     func(*obj.Addr, *obj.Addr) bool
	Smallindir   func(*obj.Addr, *obj.Addr) bool
	Stackaddr    func(*obj.Addr) bool
840
	Blockcopy    func(*Node, *Node, int64, int64, int64)
841 842 843 844 845 846 847 848 849 850
	Sudoaddable  func(int, *Node, *obj.Addr) bool
	Sudoclean    func()
	Excludedregs func() uint64
	RtoB         func(int) uint64
	FtoB         func(int) uint64
	BtoR         func(uint64) int
	BtoF         func(uint64) int
	Optoas       func(int, *Type) int
	Doregbits    func(int) uint64
	Regnames     func(*int) []string
851
	Use387       bool // should 8g use 387 FP instructions instead of sse2.
852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868
}

var pcloc int32

var Thearch Arch

var Newproc *Node

var Deferproc *Node

var Deferreturn *Node

var Panicindex *Node

var panicslice *Node

var throwreturn *Node