]> Cypherpunks repositories - gostls13.git/commitdiff
cmd/6g, etc: cleanup, moving code out of near-empty gg.go files
authorBrad Fitzpatrick <bradfitz@golang.org>
Mon, 13 Apr 2015 23:26:08 +0000 (18:26 -0500)
committerBrad Fitzpatrick <bradfitz@golang.org>
Sat, 18 Apr 2015 00:11:23 +0000 (00:11 +0000)
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/9080
Reviewed-by: Josh Bleecher Snyder <josharian@gmail.com>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
src/cmd/6g/gg.go [deleted file]
src/cmd/6g/ggen.go
src/cmd/6g/reg.go
src/cmd/7g/gg.go [deleted file]
src/cmd/7g/ggen.go
src/cmd/7g/reg.go
src/cmd/8g/gg.go [deleted file]
src/cmd/8g/ggen.go
src/cmd/8g/gsubr.go
src/cmd/8g/reg.go

diff --git a/src/cmd/6g/gg.go b/src/cmd/6g/gg.go
deleted file mode 100644 (file)
index 2deed5d..0000000
+++ /dev/null
@@ -1,24 +0,0 @@
-// 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
- */
index 17dbb48fa4ef12bf23907a0612f6ac133b029a5c..6e5e6bc4cac4a48acbfe38bedd34e6ce8264ba78 100644 (file)
@@ -166,6 +166,8 @@ func appendpp(p *obj.Prog, as int, ftype int, freg int, foffset int64, ttype int
        return q
 }
 
+var panicdiv *gc.Node
+
 /*
  * generate division.
  * generates one of:
index 7ad31f924a671a260673ccf8ecd0a13a10f7949b..ebca28262ef5946a62fce6320a734c7c1f8e1705 100644 (file)
@@ -40,6 +40,8 @@ const (
        NREGVAR = 32
 )
 
+var reg [x86.MAXREG]uint8
+
 var regname = []string{
        ".AX",
        ".CX",
diff --git a/src/cmd/7g/gg.go b/src/cmd/7g/gg.go
deleted file mode 100644 (file)
index a267482..0000000
+++ /dev/null
@@ -1,28 +0,0 @@
-// 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
- */
index 3b02b96e98ac2aa6d6b8aea05a008bb94fb15f3d..b824a3a18c7b677a66148d34d167fdc31fd4994b 100644 (file)
@@ -124,6 +124,8 @@ func ginsnop() {
        gins(arm64.AHINT, &con, nil)
 }
 
+var panicdiv *gc.Node
+
 /*
  * generate division.
  * generates one of:
index bf957c59683d34cbbd327c77ae6495d8940bf287..0e5ac7349928b00e2da03c352d06b5d187797fd8 100644 (file)
@@ -39,6 +39,8 @@ const (
        NREGVAR = 64 /* 32 general + 32 floating */
 )
 
+var reg [arm64.NREG + arm64.NFREG]uint8
+
 var regname = []string{
        ".R0",
        ".R1",
diff --git a/src/cmd/8g/gg.go b/src/cmd/8g/gg.go
deleted file mode 100644 (file)
index bfbd12e..0000000
+++ /dev/null
@@ -1,34 +0,0 @@
-// 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
- */
index 21191edeb7a7d6a2980353f19b27474c98c452f1..59025525faa7130af3ee878b0f5b4ca086a85ae2 100644 (file)
@@ -189,6 +189,8 @@ func clearfat(nl *gc.Node) {
        }
 }
 
+var panicdiv *gc.Node
+
 /*
  * generate division.
  * caller must set:
index a5ee8edb41e992d270a923909532e98007217b87..34ddfe0619535f55d2a60f696106b58c92c6502b 100644 (file)
@@ -42,6 +42,13 @@ import (
 // At the same time, can raise StackBig in ../../runtime/stack.h.
 var unmappedzero uint32 = 4096
 
+// foptoas flags
+const (
+       Frev  = 1 << 0
+       Fpop  = 1 << 1
+       Fpop2 = 1 << 2
+)
+
 /*
  * return Axxx for Oxxx on type t.
  */
index 9f2cb608e18b9090be7a2152ca923f14bc551832..50b5b97ab1c8963c586df5f8d0b56d414861b844 100644 (file)
@@ -37,6 +37,8 @@ const (
        NREGVAR = 16 /* 8 integer + 8 floating */
 )
 
+var reg [x86.MAXREG]uint8
+
 var regname = []string{
        ".ax",
        ".cx",