summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorian <ian@138bc75d-0d04-0410-961f-82ee72b054a4>2018-01-10 19:19:02 +0000
committerian <ian@138bc75d-0d04-0410-961f-82ee72b054a4>2018-01-10 19:19:02 +0000
commit3a4ffbd25e104dd12528bb74d67f1a55e24f264a (patch)
tree34b34e772f43c55d03e99b4b25c33db309e9bb94
parent5d9902f2a01c08f10288dc47b5d378df0caa9943 (diff)
downloadgcc-3a4ffbd25e104dd12528bb74d67f1a55e24f264a.tar.gz
libgo: add platform support for SuperH
Reviewed-on: https://go-review.googlesource.com/84555 git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@256446 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r--gcc/go/gofrontend/MERGE2
-rwxr-xr-xlibgo/configure34
-rw-r--r--libgo/configure.ac34
-rw-r--r--libgo/go/cmd/cgo/main.go4
-rw-r--r--libgo/go/go/build/syslist.go2
-rw-r--r--libgo/go/runtime/hash32.go2
-rw-r--r--libgo/go/runtime/lfstack_32bit.go2
-rw-r--r--libgo/go/runtime/unaligned2.go2
-rw-r--r--libgo/go/syscall/endian_big.go2
-rw-r--r--libgo/go/syscall/endian_little.go2
-rwxr-xr-xlibgo/match.sh4
-rwxr-xr-xlibgo/testsuite/gotest4
12 files changed, 79 insertions, 15 deletions
diff --git a/gcc/go/gofrontend/MERGE b/gcc/go/gofrontend/MERGE
index e66cc488769..dd7febbd9c8 100644
--- a/gcc/go/gofrontend/MERGE
+++ b/gcc/go/gofrontend/MERGE
@@ -1,4 +1,4 @@
-9705a1f4c37ad2c099e9fe6cd587d22a2a2ab2c3
+d8a9f7433a9e8a81c992ad2908818d2e84f3698b
The first line of this file holds the git revision number of the last
merge done from the gofrontend repository.
diff --git a/libgo/configure b/libgo/configure
index eeccf25bccc..28e283c6316 100755
--- a/libgo/configure
+++ b/libgo/configure
@@ -13645,10 +13645,10 @@ esac
# supported by the gofrontend and all architectures supported by the
# gc toolchain.
# N.B. Keep in sync with gcc/testsuite/go.test/go-test.exp (go-set-goarch).
-ALLGOARCH="386 alpha amd64 amd64p32 arm armbe arm64 arm64be ia64 m68k mips mipsle mips64 mips64le mips64p32 mips64p32le ppc ppc64 ppc64le s390 s390x sparc sparc64"
+ALLGOARCH="386 alpha amd64 amd64p32 arm armbe arm64 arm64be ia64 m68k mips mipsle mips64 mips64le mips64p32 mips64p32le ppc ppc64 ppc64le s390 s390x sh shbe sparc sparc64"
# All known GOARCH_FAMILY values.
-ALLGOARCHFAMILY="I386 ALPHA AMD64 ARM ARM64 IA64 M68K MIPS MIPS64 PPC PPC64 S390 S390X SPARC SPARC64"
+ALLGOARCHFAMILY="I386 ALPHA AMD64 ARM ARM64 IA64 M68K MIPS MIPS64 PPC PPC64 S390 S390X SH SPARC SPARC64"
GOARCH=unknown
GOARCH_FAMILY=unknown
@@ -13851,6 +13851,36 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
GOARCH_CACHELINESIZE=256
GOARCH_PCQUANTUM=2
;;
+ sh3eb*-*-*)
+ GOARCH=shbe
+ GOARCH_FAMILY=SH
+ GOARCH_BIGENDIAN=true
+ GOARCH_CACHELINESIZE=16
+ GOARCH_PCQUANTUM=2
+ GOARCH_MINFRAMESIZE=4
+ ;;
+ sh3*-*-*)
+ GOARCH=sh
+ GOARCH_FAMILY=SH
+ GOARCH_CACHELINESIZE=16
+ GOARCH_PCQUANTUM=2
+ GOARCH_MINFRAMESIZE=4
+ ;;
+ sh4eb*-*-*)
+ GOARCH=shbe
+ GOARCH_FAMILY=SH
+ GOARCH_BIGENDIAN=true
+ GOARCH_CACHELINESIZE=32
+ GOARCH_PCQUANTUM=2
+ GOARCH_MINFRAMESIZE=4
+ ;;
+ sh4*-*-*)
+ GOARCH=sh
+ GOARCH_FAMILY=SH
+ GOARCH_CACHELINESIZE=32
+ GOARCH_PCQUANTUM=2
+ GOARCH_MINFRAMESIZE=4
+ ;;
sparc*-*-*)
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
diff --git a/libgo/configure.ac b/libgo/configure.ac
index 9a9da38d605..1077c9e114d 100644
--- a/libgo/configure.ac
+++ b/libgo/configure.ac
@@ -208,10 +208,10 @@ AC_SUBST(USE_DEJAGNU)
# supported by the gofrontend and all architectures supported by the
# gc toolchain.
# N.B. Keep in sync with gcc/testsuite/go.test/go-test.exp (go-set-goarch).
-ALLGOARCH="386 alpha amd64 amd64p32 arm armbe arm64 arm64be ia64 m68k mips mipsle mips64 mips64le mips64p32 mips64p32le ppc ppc64 ppc64le s390 s390x sparc sparc64"
+ALLGOARCH="386 alpha amd64 amd64p32 arm armbe arm64 arm64be ia64 m68k mips mipsle mips64 mips64le mips64p32 mips64p32le ppc ppc64 ppc64le s390 s390x sh shbe sparc sparc64"
# All known GOARCH_FAMILY values.
-ALLGOARCHFAMILY="I386 ALPHA AMD64 ARM ARM64 IA64 M68K MIPS MIPS64 PPC PPC64 S390 S390X SPARC SPARC64"
+ALLGOARCHFAMILY="I386 ALPHA AMD64 ARM ARM64 IA64 M68K MIPS MIPS64 PPC PPC64 S390 S390X SH SPARC SPARC64"
GOARCH=unknown
GOARCH_FAMILY=unknown
@@ -366,6 +366,36 @@ GOARCH_MINFRAMESIZE=8
GOARCH_CACHELINESIZE=256
GOARCH_PCQUANTUM=2
;;
+ sh3eb*-*-*)
+ GOARCH=shbe
+ GOARCH_FAMILY=SH
+ GOARCH_BIGENDIAN=true
+ GOARCH_CACHELINESIZE=16
+ GOARCH_PCQUANTUM=2
+ GOARCH_MINFRAMESIZE=4
+ ;;
+ sh3*-*-*)
+ GOARCH=sh
+ GOARCH_FAMILY=SH
+ GOARCH_CACHELINESIZE=16
+ GOARCH_PCQUANTUM=2
+ GOARCH_MINFRAMESIZE=4
+ ;;
+ sh4eb*-*-*)
+ GOARCH=shbe
+ GOARCH_FAMILY=SH
+ GOARCH_BIGENDIAN=true
+ GOARCH_CACHELINESIZE=32
+ GOARCH_PCQUANTUM=2
+ GOARCH_MINFRAMESIZE=4
+ ;;
+ sh4*-*-*)
+ GOARCH=sh
+ GOARCH_FAMILY=SH
+ GOARCH_CACHELINESIZE=32
+ GOARCH_PCQUANTUM=2
+ GOARCH_MINFRAMESIZE=4
+ ;;
sparc*-*-*)
AC_COMPILE_IFELSE([
#if defined(__sparcv9) || defined(__arch64__)
diff --git a/libgo/go/cmd/cgo/main.go b/libgo/go/cmd/cgo/main.go
index 7e522a35f99..f5c231ced6d 100644
--- a/libgo/go/cmd/cgo/main.go
+++ b/libgo/go/cmd/cgo/main.go
@@ -170,6 +170,8 @@ var ptrSizeMap = map[string]int64{
"ppc64le": 8,
"s390": 4,
"s390x": 8,
+ "sh": 4,
+ "shbe": 4,
"sparc": 4,
"sparc64": 8,
}
@@ -192,6 +194,8 @@ var intSizeMap = map[string]int64{
"ppc64le": 8,
"s390": 4,
"s390x": 8,
+ "sh": 4,
+ "shbe": 4,
"sparc": 4,
"sparc64": 8,
}
diff --git a/libgo/go/go/build/syslist.go b/libgo/go/go/build/syslist.go
index 290ba9efa0c..6bf72630e7c 100644
--- a/libgo/go/go/build/syslist.go
+++ b/libgo/go/go/build/syslist.go
@@ -5,4 +5,4 @@
package build
const goosList = "aix android darwin dragonfly freebsd linux nacl netbsd openbsd plan9 solaris windows zos "
-const goarchList = "386 amd64 amd64p32 arm armbe arm64 arm64be alpha m68k ppc64 ppc64le mips mipsle mips64 mips64le mips64p32 mips64p32le ppc s390 s390x sparc sparc64 "
+const goarchList = "386 amd64 amd64p32 arm armbe arm64 arm64be alpha m68k ppc64 ppc64le mips mipsle mips64 mips64le mips64p32 mips64p32le ppc s390 s390x sh shbe sparc sparc64"
diff --git a/libgo/go/runtime/hash32.go b/libgo/go/runtime/hash32.go
index 401fe2857d9..22daec52526 100644
--- a/libgo/go/runtime/hash32.go
+++ b/libgo/go/runtime/hash32.go
@@ -6,7 +6,7 @@
// xxhash: https://code.google.com/p/xxhash/
// cityhash: https://code.google.com/p/cityhash/
-// +build 386 arm armbe m68k mips mipsle ppc s390 sparc
+// +build 386 arm armbe m68k mips mipsle ppc s390 sh shbe sparc
package runtime
diff --git a/libgo/go/runtime/lfstack_32bit.go b/libgo/go/runtime/lfstack_32bit.go
index ab0edab68f5..bbc421a90fd 100644
--- a/libgo/go/runtime/lfstack_32bit.go
+++ b/libgo/go/runtime/lfstack_32bit.go
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-// +build 386 arm nacl armbe m68k mips mipsle mips64p32 mips64p32le ppc s390 sparc
+// +build 386 arm nacl armbe m68k mips mipsle mips64p32 mips64p32le ppc s390 sh shbe sparc
package runtime
diff --git a/libgo/go/runtime/unaligned2.go b/libgo/go/runtime/unaligned2.go
index a33c87acd56..891459ea842 100644
--- a/libgo/go/runtime/unaligned2.go
+++ b/libgo/go/runtime/unaligned2.go
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-// +build arm mips mipsle mips64 mips64le armbe m68k sparc alpha ia64 mips64p32 mips64p32le sparc64
+// +build arm mips mipsle mips64 mips64le armbe m68k sparc alpha ia64 mips64p32 mips64p32le sh shbe sparc64
package runtime
diff --git a/libgo/go/syscall/endian_big.go b/libgo/go/syscall/endian_big.go
index f8ee7cfc233..24a4d1df240 100644
--- a/libgo/go/syscall/endian_big.go
+++ b/libgo/go/syscall/endian_big.go
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
//
-// +build ppc64 s390x mips mips64 armbe arm64be m68k ppc mips64p32 s390 sparc sparc64
+// +build ppc64 s390x mips mips64 armbe arm64be m68k ppc mips64p32 s390 shbe sparc sparc64
package syscall
diff --git a/libgo/go/syscall/endian_little.go b/libgo/go/syscall/endian_little.go
index b6c9ed0f9f7..b91d4bb72de 100644
--- a/libgo/go/syscall/endian_little.go
+++ b/libgo/go/syscall/endian_little.go
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
//
-// +build 386 amd64 amd64p32 arm arm64 ppc64le mips64le mipsle alpha ia64 mips64p32le
+// +build 386 amd64 amd64p32 arm arm64 ppc64le mips64le mipsle alpha ia64 mips64p32le sh
package syscall
diff --git a/libgo/match.sh b/libgo/match.sh
index fac75eabec6..62405556ede 100755
--- a/libgo/match.sh
+++ b/libgo/match.sh
@@ -116,7 +116,7 @@ for f in $gofiles; do
aix | android | darwin | dragonfly | freebsd | linux | nacl | netbsd | openbsd | plan9 | solaris | windows)
tag1=nonmatchingtag
;;
- 386 | amd64 | amd64p32 | arm | armbe | arm64 | arm64be | alpha | ia64 | m68k | ppc64 | ppc64le | mips | mipsle | mips64 | mips64le | mips64p32 | mips64p32le | ppc | s390 | s390x | sparc | sparc64)
+ 386 | amd64 | amd64p32 | arm | armbe | arm64 | arm64be | alpha | ia64 | m68k | ppc64 | ppc64le | mips | mipsle | mips64 | mips64le | mips64p32 | mips64p32le | ppc | s390 | s390x | sh | shbe | sparc | sparc64)
tag1=nonmatchingtag
;;
esac
@@ -128,7 +128,7 @@ for f in $gofiles; do
aix | android | darwin | dragonfly | freebsd | linux | nacl | netbsd | openbsd | plan9 | solaris | windows)
tag2=nonmatchingtag
;;
- 386 | amd64 | amd64p32 | arm | armbe | arm64 | arm64be | alpha | ia64 | m68k | ppc64 | ppc64le | mips | mipsle | mips64 | mips64le | mips64p32 | mips64p32le | ppc | s390 | s390x | sparc | sparc64)
+ 386 | amd64 | amd64p32 | arm | armbe | arm64 | arm64be | alpha | ia64 | m68k | ppc64 | ppc64le | mips | mipsle | mips64 | mips64le | mips64p32 | mips64p32le | ppc | s390 | s390x | sh | shbe | sparc | sparc64)
tag2=nonmatchingtag
;;
esac
diff --git a/libgo/testsuite/gotest b/libgo/testsuite/gotest
index 2b6e472d6c2..8ec12cd1667 100755
--- a/libgo/testsuite/gotest
+++ b/libgo/testsuite/gotest
@@ -314,7 +314,7 @@ x)
aix | android | darwin | dragonfly | freebsd | linux | nacl | netbsd | openbsd | plan9 | solaris | windows)
tag1=nonmatchingtag
;;
- 386 | amd64 | amd64p32 | arm | armbe | arm64 | arm64be | alpha | ia64 | m68k | ppc64 | ppc64le | mips | mipsle | mips64 | mips64le | mips64p32 | mips64p32le | ppc | s390 | s390x | sparc | sparc64)
+ 386 | amd64 | amd64p32 | arm | armbe | arm64 | arm64be | alpha | ia64 | m68k | ppc64 | ppc64le | mips | mipsle | mips64 | mips64le | mips64p32 | mips64p32le | ppc | s390 | s390x | sh | shbe | sparc | sparc64)
tag1=nonmatchingtag
;;
esac
@@ -326,7 +326,7 @@ x)
aix | android | darwin | dragonfly | freebsd | linux | nacl | netbsd | openbsd | plan9 | solaris | windows)
tag2=nonmatchingtag
;;
- 386 | amd64 | amd64p32 | arm | armbe | arm64 | arm64be | alpha | ia64 | m68k | ppc64 | ppc64le | mips | mipsle | mips64 | mips64le | mips64p32 | mips64p32le | ppc | s390 | s390x | sparc | sparc64)
+ 386 | amd64 | amd64p32 | arm | armbe | arm64 | arm64be | alpha | ia64 | m68k | ppc64 | ppc64le | mips | mipsle | mips64 | mips64le | mips64p32 | mips64p32le | ppc | s390 | s390x | sh | shbe | sparc | sparc64)
tag2=nonmatchingtag
;;
esac