diff options
author | Ian Lance Taylor <ian@gcc.gnu.org> | 2018-05-02 22:28:46 +0000 |
---|---|---|
committer | Ian Lance Taylor <ian@gcc.gnu.org> | 2018-05-02 22:28:46 +0000 |
commit | 746d6ed4ad8118e79eefa8f0d95c0ae5a9c4b9c0 (patch) | |
tree | f758bdf5feaa7053b02002423457107591a69b03 | |
parent | e1aeb9bc9e8704c99a6fb8a83983e42ea8967637 (diff) | |
download | gcc-746d6ed4ad8118e79eefa8f0d95c0ae5a9c4b9c0.zip gcc-746d6ed4ad8118e79eefa8f0d95c0ae5a9c4b9c0.tar.gz gcc-746d6ed4ad8118e79eefa8f0d95c0ae5a9c4b9c0.tar.bz2 |
libgo: add support for the Nios II architecture
Reviewed-on: https://go-review.googlesource.com/90775
From-SVN: r259866
-rw-r--r-- | gcc/go/gofrontend/MERGE | 2 | ||||
-rwxr-xr-x | libgo/configure | 7 | ||||
-rw-r--r-- | libgo/configure.ac | 7 | ||||
-rw-r--r-- | libgo/go/cmd/cgo/main.go | 2 | ||||
-rw-r--r-- | libgo/go/go/build/syslist.go | 2 | ||||
-rw-r--r-- | libgo/go/internal/syscall/unix/getrandom_linux_generic.go | 2 | ||||
-rw-r--r-- | libgo/go/runtime/hash32.go | 2 | ||||
-rw-r--r-- | libgo/go/runtime/lfstack_32bit.go | 2 | ||||
-rw-r--r-- | libgo/go/runtime/unaligned2.go | 2 | ||||
-rw-r--r-- | libgo/go/syscall/endian_little.go | 2 | ||||
-rw-r--r-- | libgo/go/syscall/libcall_linux_ustat.go | 2 | ||||
-rwxr-xr-x | libgo/goarch.sh | 7 | ||||
-rwxr-xr-x | libgo/match.sh | 4 | ||||
-rwxr-xr-x | libgo/testsuite/gotest | 4 |
14 files changed, 31 insertions, 16 deletions
diff --git a/gcc/go/gofrontend/MERGE b/gcc/go/gofrontend/MERGE index 61a5bc2..09c1047 100644 --- a/gcc/go/gofrontend/MERGE +++ b/gcc/go/gofrontend/MERGE @@ -1,4 +1,4 @@ -380527c032f02446438c71b0ac0026bcab416be5 +24cd2e0542cc227200c3f91b9e0eefaa726cbc1c 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 c5f8e8a..11e04aa 100755 --- a/libgo/configure +++ b/libgo/configure @@ -13653,10 +13653,10 @@ esac # - libgo/go/syscall/endian_XX.go # - possibly others # - possibly update files in libgo/go/internal/syscall/unix -ALLGOARCH="386 alpha amd64 amd64p32 arm armbe arm64 arm64be ia64 m68k mips mipsle mips64 mips64le mips64p32 mips64p32le ppc ppc64 ppc64le riscv64 s390 s390x sh shbe sparc sparc64" +ALLGOARCH="386 alpha amd64 amd64p32 arm armbe arm64 arm64be ia64 m68k mips mipsle mips64 mips64le mips64p32 mips64p32le nios2 ppc ppc64 ppc64le riscv64 s390 s390x sh shbe sparc sparc64" # All known GOARCH family values. -ALLGOARCHFAMILY="I386 ALPHA AMD64 ARM ARM64 IA64 M68K MIPS MIPS64 PPC PPC64 RISCV64 S390 S390X SH SPARC SPARC64" +ALLGOARCHFAMILY="I386 ALPHA AMD64 ARM ARM64 IA64 M68K MIPS MIPS64 NIOS2 PPC PPC64 RISCV64 S390 S390X SH SPARC SPARC64" GOARCH=unknown case ${host} in @@ -13745,6 +13745,9 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ;; esac ;; + nios2-*-*) + GOARCH=nios2 + ;; rs6000*-*-* | powerpc*-*-*) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ diff --git a/libgo/configure.ac b/libgo/configure.ac index eabe294..9f4bf50 100644 --- a/libgo/configure.ac +++ b/libgo/configure.ac @@ -224,10 +224,10 @@ AC_SUBST(USE_DEJAGNU) # - libgo/go/syscall/endian_XX.go # - possibly others # - possibly update files in libgo/go/internal/syscall/unix -ALLGOARCH="386 alpha amd64 amd64p32 arm armbe arm64 arm64be ia64 m68k mips mipsle mips64 mips64le mips64p32 mips64p32le ppc ppc64 ppc64le riscv64 s390 s390x sh shbe sparc sparc64" +ALLGOARCH="386 alpha amd64 amd64p32 arm armbe arm64 arm64be ia64 m68k mips mipsle mips64 mips64le mips64p32 mips64p32le nios2 ppc ppc64 ppc64le riscv64 s390 s390x sh shbe sparc sparc64" # All known GOARCH family values. -ALLGOARCHFAMILY="I386 ALPHA AMD64 ARM ARM64 IA64 M68K MIPS MIPS64 PPC PPC64 RISCV64 S390 S390X SH SPARC SPARC64" +ALLGOARCHFAMILY="I386 ALPHA AMD64 ARM ARM64 IA64 M68K MIPS MIPS64 NIOS2 PPC PPC64 RISCV64 S390 S390X SH SPARC SPARC64" GOARCH=unknown case ${host} in @@ -290,6 +290,9 @@ changequote([,])dnl ;; esac ;; + nios2-*-*) + GOARCH=nios2 + ;; rs6000*-*-* | powerpc*-*-*) AC_COMPILE_IFELSE([ #ifdef _ARCH_PPC64 diff --git a/libgo/go/cmd/cgo/main.go b/libgo/go/cmd/cgo/main.go index 6baabfd..890a365 100644 --- a/libgo/go/cmd/cgo/main.go +++ b/libgo/go/cmd/cgo/main.go @@ -165,6 +165,7 @@ var ptrSizeMap = map[string]int64{ "mips64le": 8, "mips64p32": 4, "mips64p32le": 4, + "nios2": 4, "ppc": 4, "ppc64": 8, "ppc64le": 8, @@ -190,6 +191,7 @@ var intSizeMap = map[string]int64{ "mips64le": 8, "mips64p32": 8, "mips64p32le": 8, + "nios2": 4, "ppc": 4, "ppc64": 8, "ppc64le": 8, diff --git a/libgo/go/go/build/syslist.go b/libgo/go/go/build/syslist.go index 679d195..0c39634 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 riscv64 s390 s390x sh shbe sparc sparc64" +const goarchList = "386 amd64 amd64p32 arm armbe arm64 arm64be alpha m68k ppc64 ppc64le mips mipsle mips64 mips64le mips64p32 mips64p32le nios2 ppc riscv64 s390 s390x sh shbe sparc sparc64" diff --git a/libgo/go/internal/syscall/unix/getrandom_linux_generic.go b/libgo/go/internal/syscall/unix/getrandom_linux_generic.go index d6af3de..2d513df 100644 --- a/libgo/go/internal/syscall/unix/getrandom_linux_generic.go +++ b/libgo/go/internal/syscall/unix/getrandom_linux_generic.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 arm64 riscv64 +// +build arm64 nios2 riscv64 package unix diff --git a/libgo/go/runtime/hash32.go b/libgo/go/runtime/hash32.go index 22daec5..3449127 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 sh shbe sparc +// +build 386 arm armbe m68k mips mipsle nios2 ppc s390 sh shbe sparc package runtime diff --git a/libgo/go/runtime/lfstack_32bit.go b/libgo/go/runtime/lfstack_32bit.go index bbc421a..1288c1a 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 sh shbe sparc +// +build 386 arm nacl armbe m68k mips mipsle mips64p32 mips64p32le nios2 ppc s390 sh shbe sparc package runtime diff --git a/libgo/go/runtime/unaligned2.go b/libgo/go/runtime/unaligned2.go index 891459e..9f52e8d 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 sh shbe sparc64 +// +build alpha arm armbe ia64 m68k mips mipsle mips64 mips64le mips64p32 mips64p32le nios2 sh shbe sparc sparc64 package runtime diff --git a/libgo/go/syscall/endian_little.go b/libgo/go/syscall/endian_little.go index 4a73121..a5d32ae 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 sh riscv64 +// +build 386 alpha amd64 amd64p32 arm arm64 ia64 mips64le mipsle mips64p32le nios2 ppc64le riscv64 sh package syscall diff --git a/libgo/go/syscall/libcall_linux_ustat.go b/libgo/go/syscall/libcall_linux_ustat.go index 3aff344..f515fce 100644 --- a/libgo/go/syscall/libcall_linux_ustat.go +++ b/libgo/go/syscall/libcall_linux_ustat.go @@ -4,7 +4,7 @@ // GNU/Linux library ustat call. // This is not supported on some kernels, such as arm64. -// +build !arm64,!riscv64 +// +build !arm64,!nios2,!riscv64 package syscall diff --git a/libgo/goarch.sh b/libgo/goarch.sh index c63cbba..11bca7b 100755 --- a/libgo/goarch.sh +++ b/libgo/goarch.sh @@ -126,6 +126,13 @@ case $goarch in ;; esac ;; + nios2) + family=NIOS2 + cachelinesize=32 + minframesize=16 + pcquantum=4 + ptrsize=4 + ;; ppc) family=PPC bigendian=true diff --git a/libgo/match.sh b/libgo/match.sh index 9247ec6..fb80013 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 | riscv64 | s390 | s390x | sh | shbe | sparc | sparc64) + 386 | amd64 | amd64p32 | arm | armbe | arm64 | arm64be | alpha | ia64 | m68k | mips | mipsle | mips64 | mips64le | mips64p32 | mips64p32le | nios2 | ppc | ppc64 | ppc64le | riscv64 | 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 | riscv64 | s390 | s390x | sh | shbe | sparc | sparc64) + 386 | amd64 | amd64p32 | arm | armbe | arm64 | arm64be | alpha | ia64 | m68k | mips | mipsle | mips64 | mips64le | mips64p32 | mips64p32le | nios2 | ppc | ppc64 | ppc64le | riscv64 | s390 | s390x | sh | shbe | sparc | sparc64) tag2=nonmatchingtag ;; esac diff --git a/libgo/testsuite/gotest b/libgo/testsuite/gotest index 434c26d..d9353d1 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 | riscv64 | s390 | s390x | sh | shbe | sparc | sparc64) + 386 | amd64 | amd64p32 | arm | armbe | arm64 | arm64be | alpha | ia64 | m68k | mips | mipsle | mips64 | mips64le | mips64p32 | mips64p32le·| nios2 | ppc | ppc64 | ppc64le | riscv64 | 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 | riscv64 | s390 | s390x | sh | shbe | sparc | sparc64) + 386 | amd64 | amd64p32 | arm | armbe | arm64 | arm64be | alpha | ia64 | m68k | mips | mipsle | mips64 | mips64le | mips64p32 | mips64p32le·| nios2 | ppc | ppc64 | ppc64le | riscv64 | s390 | s390x | sh | shbe | sparc | sparc64) tag2=nonmatchingtag ;; esac |