Commit 17eba6e6 authored by Russ Cox's avatar Russ Cox

cmd/compile, cmd/link: create from 5g, 5l, etc

Trivial merging of 5g, 6g, ... into go tool compile,
and similarlly 5l, 6l, ... into go tool link.
The files compile/main.go and link/main.go are new.
Everything else in those directories is a move followed by
change of imports and package name.

This CL breaks the build. Manual fixups are in the next CL.

See golang-dev thread titled "go tool compile, etc" for background.

Change-Id: Id35ff5a5859ad9037c61275d637b1bd51df6828b
Reviewed-on: https://go-review.googlesource.com/10287Reviewed-by: default avatarDave Cheney <dave@cheney.net>
Reviewed-by: default avatarRob Pike <r@golang.org>
parent 2a141ded
...@@ -2,10 +2,10 @@ ...@@ -2,10 +2,10 @@
// Use of this source code is governed by a BSD-style // Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file. // license that can be found in the LICENSE file.
package main package amd64
import ( import (
"cmd/internal/gc" "cmd/compile/internal/gc"
"cmd/internal/obj" "cmd/internal/obj"
"cmd/internal/obj/x86" "cmd/internal/obj/x86"
) )
......
...@@ -2,10 +2,10 @@ ...@@ -2,10 +2,10 @@
// Use of this source code is governed by a BSD-style // Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file. // license that can be found in the LICENSE file.
package main package amd64
import ( import (
"cmd/internal/gc" "cmd/compile/internal/gc"
"cmd/internal/obj" "cmd/internal/obj"
"cmd/internal/obj/x86" "cmd/internal/obj/x86"
) )
...@@ -65,7 +65,7 @@ func betypeinit() { ...@@ -65,7 +65,7 @@ func betypeinit() {
} }
} }
func main() { func Main() {
if obj.Getgoos() == "nacl" { if obj.Getgoos() == "nacl" {
resvd = append(resvd, x86.REG_BP, x86.REG_R15) resvd = append(resvd, x86.REG_BP, x86.REG_R15)
} else if obj.Framepointer_enabled != 0 { } else if obj.Framepointer_enabled != 0 {
......
...@@ -2,10 +2,10 @@ ...@@ -2,10 +2,10 @@
// Use of this source code is governed by a BSD-style // Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file. // license that can be found in the LICENSE file.
package main package amd64
import ( import (
"cmd/internal/gc" "cmd/compile/internal/gc"
"cmd/internal/obj" "cmd/internal/obj"
"cmd/internal/obj/x86" "cmd/internal/obj/x86"
) )
......
...@@ -28,11 +28,11 @@ ...@@ -28,11 +28,11 @@
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE. // THE SOFTWARE.
package main package amd64
import ( import (
"cmd/internal/gc" "cmd/compile/internal/big"
"cmd/internal/gc/big" "cmd/compile/internal/gc"
"cmd/internal/obj" "cmd/internal/obj"
"cmd/internal/obj/x86" "cmd/internal/obj/x86"
"fmt" "fmt"
......
...@@ -28,10 +28,10 @@ ...@@ -28,10 +28,10 @@
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE. // THE SOFTWARE.
package main package amd64
import ( import (
"cmd/internal/gc" "cmd/compile/internal/gc"
"cmd/internal/obj" "cmd/internal/obj"
"cmd/internal/obj/x86" "cmd/internal/obj/x86"
"fmt" "fmt"
......
...@@ -2,10 +2,10 @@ ...@@ -2,10 +2,10 @@
// Use of this source code is governed by a BSD-style // Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file. // license that can be found in the LICENSE file.
package main package amd64
import ( import (
"cmd/internal/gc" "cmd/compile/internal/gc"
"cmd/internal/obj" "cmd/internal/obj"
"cmd/internal/obj/x86" "cmd/internal/obj/x86"
) )
......
...@@ -28,10 +28,10 @@ ...@@ -28,10 +28,10 @@
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE. // THE SOFTWARE.
package main package amd64
import ( import (
"cmd/internal/gc" "cmd/compile/internal/gc"
"cmd/internal/obj" "cmd/internal/obj"
"cmd/internal/obj/x86" "cmd/internal/obj/x86"
) )
......
...@@ -2,10 +2,10 @@ ...@@ -2,10 +2,10 @@
// Use of this source code is governed by a BSD-style // Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file. // license that can be found in the LICENSE file.
package main package arm
import ( import (
"cmd/internal/gc" "cmd/compile/internal/gc"
"cmd/internal/obj" "cmd/internal/obj"
"cmd/internal/obj/arm" "cmd/internal/obj/arm"
) )
......
...@@ -2,10 +2,10 @@ ...@@ -2,10 +2,10 @@
// Use of this source code is governed by a BSD-style // Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file. // license that can be found in the LICENSE file.
package main package arm
import ( import (
"cmd/internal/gc" "cmd/compile/internal/gc"
"cmd/internal/obj" "cmd/internal/obj"
"cmd/internal/obj/arm" "cmd/internal/obj/arm"
) )
......
...@@ -2,10 +2,10 @@ ...@@ -2,10 +2,10 @@
// Use of this source code is governed by a BSD-style // Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file. // license that can be found in the LICENSE file.
package main package arm
import ( import (
"cmd/internal/gc" "cmd/compile/internal/gc"
"cmd/internal/obj" "cmd/internal/obj"
"cmd/internal/obj/arm" "cmd/internal/obj/arm"
) )
...@@ -37,7 +37,7 @@ func betypeinit() { ...@@ -37,7 +37,7 @@ func betypeinit() {
gc.Widthreg = 4 gc.Widthreg = 4
} }
func main() { func Main() {
gc.Thearch.Thechar = thechar gc.Thearch.Thechar = thechar
gc.Thearch.Thestring = thestring gc.Thearch.Thestring = thestring
gc.Thearch.Thelinkarch = thelinkarch gc.Thearch.Thelinkarch = thelinkarch
......
...@@ -2,10 +2,10 @@ ...@@ -2,10 +2,10 @@
// Use of this source code is governed by a BSD-style // Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file. // license that can be found in the LICENSE file.
package main package arm
import ( import (
"cmd/internal/gc" "cmd/compile/internal/gc"
"cmd/internal/obj" "cmd/internal/obj"
"cmd/internal/obj/arm" "cmd/internal/obj/arm"
) )
......
...@@ -28,10 +28,10 @@ ...@@ -28,10 +28,10 @@
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE. // THE SOFTWARE.
package main package arm
import ( import (
"cmd/internal/gc" "cmd/compile/internal/gc"
"cmd/internal/obj" "cmd/internal/obj"
"cmd/internal/obj/arm" "cmd/internal/obj/arm"
"fmt" "fmt"
......
...@@ -28,10 +28,10 @@ ...@@ -28,10 +28,10 @@
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE. // THE SOFTWARE.
package main package arm
import ( import (
"cmd/internal/gc" "cmd/compile/internal/gc"
"cmd/internal/obj" "cmd/internal/obj"
"cmd/internal/obj/arm" "cmd/internal/obj/arm"
"fmt" "fmt"
......
...@@ -2,10 +2,10 @@ ...@@ -2,10 +2,10 @@
// Use of this source code is governed by a BSD-style // Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file. // license that can be found in the LICENSE file.
package main package arm
import ( import (
"cmd/internal/gc" "cmd/compile/internal/gc"
"cmd/internal/obj" "cmd/internal/obj"
"cmd/internal/obj/arm" "cmd/internal/obj/arm"
) )
......
...@@ -28,10 +28,10 @@ ...@@ -28,10 +28,10 @@
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE. // THE SOFTWARE.
package main package arm
import "cmd/internal/obj/arm" import "cmd/internal/obj/arm"
import "cmd/internal/gc" import "cmd/compile/internal/gc"
const ( const (
NREGVAR = 32 NREGVAR = 32
......
...@@ -2,10 +2,10 @@ ...@@ -2,10 +2,10 @@
// Use of this source code is governed by a BSD-style // Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file. // license that can be found in the LICENSE file.
package main package arm64
import ( import (
"cmd/internal/gc" "cmd/compile/internal/gc"
"cmd/internal/obj" "cmd/internal/obj"
"cmd/internal/obj/arm64" "cmd/internal/obj/arm64"
) )
......
...@@ -2,10 +2,10 @@ ...@@ -2,10 +2,10 @@
// Use of this source code is governed by a BSD-style // Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file. // license that can be found in the LICENSE file.
package main package arm64
import ( import (
"cmd/internal/gc" "cmd/compile/internal/gc"
"cmd/internal/obj" "cmd/internal/obj"
"cmd/internal/obj/arm64" "cmd/internal/obj/arm64"
) )
...@@ -37,7 +37,7 @@ func betypeinit() { ...@@ -37,7 +37,7 @@ func betypeinit() {
gc.Widthreg = 8 gc.Widthreg = 8
} }
func main() { func Main() {
gc.Thearch.Thechar = thechar gc.Thearch.Thechar = thechar
gc.Thearch.Thestring = thestring gc.Thearch.Thestring = thestring
gc.Thearch.Thelinkarch = thelinkarch gc.Thearch.Thelinkarch = thelinkarch
......
...@@ -2,10 +2,10 @@ ...@@ -2,10 +2,10 @@
// Use of this source code is governed by a BSD-style // Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file. // license that can be found in the LICENSE file.
package main package arm64
import ( import (
"cmd/internal/gc" "cmd/compile/internal/gc"
"cmd/internal/obj" "cmd/internal/obj"
"cmd/internal/obj/arm64" "cmd/internal/obj/arm64"
"fmt" "fmt"
......
...@@ -28,10 +28,10 @@ ...@@ -28,10 +28,10 @@
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE. // THE SOFTWARE.
package main package arm64
import ( import (
"cmd/internal/gc" "cmd/compile/internal/gc"
"cmd/internal/obj" "cmd/internal/obj"
"cmd/internal/obj/arm64" "cmd/internal/obj/arm64"
"fmt" "fmt"
......
...@@ -28,10 +28,10 @@ ...@@ -28,10 +28,10 @@
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE. // THE SOFTWARE.
package main package arm64
import ( import (
"cmd/internal/gc" "cmd/compile/internal/gc"
"cmd/internal/obj" "cmd/internal/obj"
"cmd/internal/obj/arm64" "cmd/internal/obj/arm64"
"fmt" "fmt"
......
...@@ -2,10 +2,10 @@ ...@@ -2,10 +2,10 @@
// Use of this source code is governed by a BSD-style // Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file. // license that can be found in the LICENSE file.
package main package arm64
import ( import (
"cmd/internal/gc" "cmd/compile/internal/gc"
"cmd/internal/obj" "cmd/internal/obj"
"cmd/internal/obj/arm64" "cmd/internal/obj/arm64"
) )
......
...@@ -28,10 +28,10 @@ ...@@ -28,10 +28,10 @@
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE. // THE SOFTWARE.
package main package arm64
import ( import (
"cmd/internal/gc" "cmd/compile/internal/gc"
"cmd/internal/obj/arm64" "cmd/internal/obj/arm64"
) )
......
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
package gc package gc
import ( import (
"cmd/internal/gc/big" "cmd/compile/internal/big"
"cmd/internal/obj" "cmd/internal/obj"
"strings" "strings"
) )
......
...@@ -6,7 +6,7 @@ package gc ...@@ -6,7 +6,7 @@ package gc
import ( import (
"bytes" "bytes"
"cmd/internal/gc/big" "cmd/compile/internal/big"
"cmd/internal/obj" "cmd/internal/obj"
) )
......
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
package gc package gc
import ( import (
"cmd/internal/gc/big" "cmd/compile/internal/big"
"cmd/internal/obj" "cmd/internal/obj"
"fmt" "fmt"
) )
......
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
package gc package gc
import ( import (
"cmd/internal/gc/big" "cmd/compile/internal/big"
"cmd/internal/obj" "cmd/internal/obj"
"fmt" "fmt"
"math" "math"
......
...@@ -2,10 +2,10 @@ ...@@ -2,10 +2,10 @@
// Use of this source code is governed by a BSD-style // Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file. // license that can be found in the LICENSE file.
package main package ppc64
import ( import (
"cmd/internal/gc" "cmd/compile/internal/gc"
"cmd/internal/obj" "cmd/internal/obj"
"cmd/internal/obj/ppc64" "cmd/internal/obj/ppc64"
) )
......
...@@ -2,10 +2,10 @@ ...@@ -2,10 +2,10 @@
// Use of this source code is governed by a BSD-style // Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file. // license that can be found in the LICENSE file.
package main package ppc64
import ( import (
"cmd/internal/gc" "cmd/compile/internal/gc"
"cmd/internal/obj" "cmd/internal/obj"
"cmd/internal/obj/ppc64" "cmd/internal/obj/ppc64"
) )
...@@ -45,7 +45,7 @@ func betypeinit() { ...@@ -45,7 +45,7 @@ func betypeinit() {
gc.Widthreg = 8 gc.Widthreg = 8
} }
func main() { func Main() {
gc.Thearch.Thechar = thechar gc.Thearch.Thechar = thechar
gc.Thearch.Thestring = thestring gc.Thearch.Thestring = thestring
gc.Thearch.Thelinkarch = thelinkarch gc.Thearch.Thelinkarch = thelinkarch
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
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