Commit 05efc18c authored by Brad Fitzpatrick's avatar Brad Fitzpatrick

cmd/6g, etc: cleanup, moving code out of near-empty gg.go files

Clear out gg.go files, and move things into consistent places between
the cmd/?g directories.

Change-Id: I81e04180613b806e0bfbb88519e66111ce9f74a3
Reviewed-on: https://go-review.googlesource.com/9080Reviewed-by: default avatarJosh Bleecher Snyder <josharian@gmail.com>
Reviewed-by: default avatarIan Lance Taylor <iant@golang.org>
parent 6d3a7e79
// 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 main
import "cmd/internal/obj/x86"
import "cmd/internal/gc"
// 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.
var reg [x86.MAXREG]uint8
var panicdiv *gc.Node
/*
* cgen.c
*/
/*
* list.c
*/
...@@ -166,6 +166,8 @@ func appendpp(p *obj.Prog, as int, ftype int, freg int, foffset int64, ttype int ...@@ -166,6 +166,8 @@ func appendpp(p *obj.Prog, as int, ftype int, freg int, foffset int64, ttype int
return q return q
} }
var panicdiv *gc.Node
/* /*
* generate division. * generate division.
* generates one of: * generates one of:
......
...@@ -40,6 +40,8 @@ const ( ...@@ -40,6 +40,8 @@ const (
NREGVAR = 32 NREGVAR = 32
) )
var reg [x86.MAXREG]uint8
var regname = []string{ var regname = []string{
".AX", ".AX",
".CX", ".CX",
......
// 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 main
import "cmd/internal/obj/arm64"
import "cmd/internal/gc"
// Copyright 2014 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.
var reg [arm64.NREG + arm64.NFREG]uint8
var panicdiv *gc.Node
/*
* cgen.c
*/
/*
* list.c
*/
/*
* reg.c
*/
...@@ -124,6 +124,8 @@ func ginsnop() { ...@@ -124,6 +124,8 @@ func ginsnop() {
gins(arm64.AHINT, &con, nil) gins(arm64.AHINT, &con, nil)
} }
var panicdiv *gc.Node
/* /*
* generate division. * generate division.
* generates one of: * generates one of:
......
...@@ -39,6 +39,8 @@ const ( ...@@ -39,6 +39,8 @@ const (
NREGVAR = 64 /* 32 general + 32 floating */ NREGVAR = 64 /* 32 general + 32 floating */
) )
var reg [arm64.NREG + arm64.NFREG]uint8
var regname = []string{ var regname = []string{
".R0", ".R0",
".R1", ".R1",
......
// 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 main
import "cmd/internal/obj/x86"
import "cmd/internal/gc"
// TODO(rsc):
// assume CLD?
// 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.
// foptoas flags
const (
Frev = 1 << 0
Fpop = 1 << 1
Fpop2 = 1 << 2
)
var reg [x86.MAXREG]uint8
var panicdiv *gc.Node
/*
* cgen.c
*/
/*
* list.c
*/
...@@ -189,6 +189,8 @@ func clearfat(nl *gc.Node) { ...@@ -189,6 +189,8 @@ func clearfat(nl *gc.Node) {
} }
} }
var panicdiv *gc.Node
/* /*
* generate division. * generate division.
* caller must set: * caller must set:
......
...@@ -42,6 +42,13 @@ import ( ...@@ -42,6 +42,13 @@ import (
// At the same time, can raise StackBig in ../../runtime/stack.h. // At the same time, can raise StackBig in ../../runtime/stack.h.
var unmappedzero uint32 = 4096 var unmappedzero uint32 = 4096
// foptoas flags
const (
Frev = 1 << 0
Fpop = 1 << 1
Fpop2 = 1 << 2
)
/* /*
* return Axxx for Oxxx on type t. * return Axxx for Oxxx on type t.
*/ */
......
...@@ -37,6 +37,8 @@ const ( ...@@ -37,6 +37,8 @@ const (
NREGVAR = 16 /* 8 integer + 8 floating */ NREGVAR = 16 /* 8 integer + 8 floating */
) )
var reg [x86.MAXREG]uint8
var regname = []string{ var regname = []string{
".ax", ".ax",
".cx", ".cx",
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment