From patchwork Mon Oct 9 16:59:40 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ian Lance Taylor X-Patchwork-Id: 823363 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=gcc.gnu.org (client-ip=209.132.180.131; helo=sourceware.org; envelope-from=gcc-patches-return-463789-incoming=patchwork.ozlabs.org@gcc.gnu.org; receiver=) Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.b="ut0lhUqa"; dkim-atps=neutral Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3y9mgx5f58z9s7f for ; Tue, 10 Oct 2017 03:59:56 +1100 (AEDT) DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender :mime-version:from:date:message-id:subject:to:content-type; q= dns; s=default; b=s93iKV/RFp1a2VnUh/yFYdBj2EXxokjcMhAj+UfdSvu3GU 5WeacydzMi28IfR7rlZkxOc0iPKRTC+TwMIBQvby4wCUFV38E/DyiwfjXJhzF4Fn Ele0d/AU1FVKGI3EAbeBW1yeJG7w82USVePK6va7dmq4Rhgx7RxLwpaayPXl8= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender :mime-version:from:date:message-id:subject:to:content-type; s= default; bh=sxoaWLD9faTAq+42BNsqLReMbgY=; b=ut0lhUqaRvsfE07C7dR4 qBubA8uzeb8C0vMQpVLGFMoYpPA8JKyVjOLZMDBFZeS9NNt5LMIBBWcQ+N6ypnzl 4bkCDELgHdPDrzvZvh/ZDDB8/MqxeOOndGQXdrZlp37xRb8/yWWZHPVbKW5LM17G VNrZPrB6050PqAScdW/BH14= Received: (qmail 93791 invoked by alias); 9 Oct 2017 16:59:47 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Delivered-To: mailing list gcc-patches@gcc.gnu.org Received: (qmail 93781 invoked by uid 89); 9 Oct 2017 16:59:47 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-10.4 required=5.0 tests=AWL, BAYES_00, GIT_PATCH_2, GIT_PATCH_3, KAM_ASCII_DIVIDERS, RCVD_IN_DNSWL_NONE, RCVD_IN_SORBS_SPAM, SPF_PASS autolearn=ham version=3.3.2 spammy=HTo:D*googlegroups.com, rights, reserved X-HELO: mail-oi0-f44.google.com Received: from mail-oi0-f44.google.com (HELO mail-oi0-f44.google.com) (209.85.218.44) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Mon, 09 Oct 2017 16:59:43 +0000 Received: by mail-oi0-f44.google.com with SMTP id j126so17257154oib.8 for ; Mon, 09 Oct 2017 09:59:43 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=qG7syoaELBfnBnMkdc110IXDREp8e9w81rHP1a9d2JE=; b=V8iLlDqPIjUWAOO2cPhgrv8sfyVCAuTqtQzJKgeYD/uDbiEBqMZBHiYRaT9NRN8/97 cA1Uo161ZUsS9INaOZQybtm8w72lJqcv5wCAGjxVHSNEPQUh2/rwiLEZoSdJaB2yIAxb XA03BpqYHhOINB85SPHOICi3a1uAFLj9j2y6Tacft1DMkO84lE63b4DKM9sEVE4tlUAk iYitSOQsd4MiAHpTjykFe1+260F55eHJE94TCDc8VsLDkYM0PbSUJNaWdFp4KjX4Vl89 oJJPdL30eIs1Jx032TwM0AbBffCUyxCJ/l1umyF44BZGizX8gcEsUMaUWSzHWLWhiZzR EEFg== X-Gm-Message-State: AMCzsaVVD2SWDduC8s6GkZJnyFLEYh2T3akicwPPxUTmwWJ4X3/pXe6g u7bGxuTEpsFygDp4RvLl0xedRwo5XN11Tz66oFza8UqN X-Google-Smtp-Source: AOwi7QDGUi3Pvra57eFhItfWhId4Z1QPVB+ew3939zlfHlg/VQ9aZEeJCpiyaj9Cgn1LKQmH1w43ld8Wy3i2ogP5SWk= X-Received: by 10.157.4.37 with SMTP id 34mr112661otc.156.1507568381481; Mon, 09 Oct 2017 09:59:41 -0700 (PDT) MIME-Version: 1.0 Received: by 10.168.117.78 with HTTP; Mon, 9 Oct 2017 09:59:40 -0700 (PDT) From: Ian Lance Taylor Date: Mon, 9 Oct 2017 09:59:40 -0700 Message-ID: Subject: Go patch committed to GCC 7 branch: Update MIPS architecture names To: gcc-patches , "gofrontend-dev@googlegroups.com" I've committed a set of patches by James Cowgill to the GCC 7 branch, backported from trunk. These patches update the MIPS architecture names to the names expected by Go programmers. The backported patches are: https://golang.org/cl/46150 https://golang.org/cl/46151 https://golang.org/cl/46152 https://golang.org/cl/46153 https://golang.org/cl/46154 https://gcc.gnu.org/ml/gcc-patches/2017-06/msg01777.html Bootstrapped and ran Go testsuite on x86_64-pc-linux-gnu. Committed to GCC 7 branch. Ian 2017-10-09 James Cowgill * go.test/go-test.exp (go-set-goarch): Update MIPS architecture names. Index: gcc/testsuite/go.test/go-test.exp =================================================================== --- gcc/testsuite/go.test/go-test.exp (revision 253547) +++ gcc/testsuite/go.test/go-test.exp (working copy) @@ -213,29 +213,27 @@ #error FOO #endif }] { - set goarch "mipso32" + set goarch "mips" } elseif [check_no_compiler_messages mipsn32 assembly { #if _MIPS_SIM != _ABIN32 #error FOO #endif }] { - set goarch "mipsn32" + set goarch "mips64p32" } elseif [check_no_compiler_messages mipsn64 assembly { #if _MIPS_SIM != _ABI64 #error FOO #endif }] { - set goarch "mipsn64" - } elseif [check_no_compiler_messages mipso64 assembly { - #if _MIPS_SIM != _ABIO64 - #error FOO - #endif - }] { - set goarch "mipso64" + set goarch "mips64" } else { perror "$target_triplet: unrecognized MIPS ABI" return "" } + + if [istarget "mips*el-*-*"] { + append goarch "le" + } } "powerpc*-*-*" { if [check_effective_target_ilp32] { Index: libgo/configure.ac =================================================================== --- libgo/configure.ac (revision 253547) +++ libgo/configure.ac (working copy) @@ -197,7 +197,7 @@ # 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 mipso32 mipsn32 mipso64 mipsn64 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 sparc sparc64" # All known GOARCH_FAMILY values. ALLGOARCHFAMILY="I386 ALPHA AMD64 ARM ARM64 IA64 M68K MIPS MIPS64 PPC PPC64 S390 S390X SPARC SPARC64" @@ -280,18 +280,12 @@ #error not n64 #endif], [mips_abi="n64"], - [AC_COMPILE_IFELSE([ -#if _MIPS_SIM != _ABIO64 -#error not o64 -#endif], -[mips_abi="o64"], [AC_MSG_ERROR([unknown MIPS ABI]) -[mips_abi="n32"]])])])]) +[mips_abi="n32"]])])]) case "$mips_abi" in - "o32") GOARCH=mipso32 ;; - "n32") GOARCH=mipsn32 ;; - "n64") GOARCH=mipsn64 ;; - "o64") GOARCH=mipso64 ;; + "o32") GOARCH=mips ;; + "n32") GOARCH=mips64p32 ;; + "n64") GOARCH=mips64 ;; esac case "$mips_abi" in "o32" | "n32") @@ -298,13 +292,14 @@ GOARCH_FAMILY=MIPS GOARCH_MINFRAMESIZE=4 ;; - "n64" | "o64") + "n64") GOARCH_FAMILY=MIPS64 GOARCH_MINFRAMESIZE=8 ;; esac case "${host}" in - mips*el) + mips*el-*-*) + GOARCH="${GOARCH}le" ;; *) GOARCH_BIGENDIAN=1 @@ -569,7 +564,7 @@ GCC_CHECK_UNWIND_GETIPINFO -AC_CHECK_HEADERS(port.h sched.h semaphore.h sys/file.h sys/mman.h syscall.h sys/epoll.h sys/event.h sys/inotify.h sys/ptrace.h sys/syscall.h sys/user.h sys/utsname.h sys/select.h sys/socket.h net/if.h net/if_arp.h net/route.h netpacket/packet.h sys/prctl.h sys/mount.h sys/vfs.h sys/statfs.h sys/timex.h sys/sysinfo.h utime.h linux/ether.h linux/fs.h linux/reboot.h netinet/icmp6.h netinet/in_syst.h netinet/ip.h netinet/ip_mroute.h netinet/if_ether.h) +AC_CHECK_HEADERS(port.h sched.h semaphore.h sys/file.h sys/mman.h syscall.h sys/epoll.h sys/event.h sys/inotify.h sys/ptrace.h sys/syscall.h sys/user.h sys/utsname.h sys/select.h sys/socket.h net/if.h net/if_arp.h net/route.h netpacket/packet.h sys/prctl.h sys/mount.h sys/vfs.h sys/statfs.h sys/timex.h sys/sysinfo.h utime.h linux/ether.h linux/fs.h linux/ptrace.h linux/reboot.h netinet/icmp6.h netinet/in_syst.h netinet/ip.h netinet/ip_mroute.h netinet/if_ether.h) AC_CHECK_HEADERS([linux/filter.h linux/if_addr.h linux/if_ether.h linux/if_tun.h linux/netlink.h linux/rtnetlink.h], [], [], [#ifdef HAVE_SYS_SOCKET_H Index: libgo/go/cmd/cgo/main.go =================================================================== --- libgo/go/cmd/cgo/main.go (revision 253547) +++ libgo/go/cmd/cgo/main.go (working copy) @@ -139,51 +139,47 @@ } var ptrSizeMap = map[string]int64{ - "386": 4, - "alpha": 8, - "amd64": 8, - "arm": 4, - "arm64": 8, - "m68k": 4, - "mipso32": 4, - "mipsn32": 4, - "mipso64": 8, - "mipsn64": 8, - "mips": 4, - "mipsle": 4, - "mips64": 8, - "mips64le": 8, - "ppc": 4, - "ppc64": 8, - "ppc64le": 8, - "s390": 4, - "s390x": 8, - "sparc": 4, - "sparc64": 8, + "386": 4, + "alpha": 8, + "amd64": 8, + "arm": 4, + "arm64": 8, + "m68k": 4, + "mips": 4, + "mipsle": 4, + "mips64": 8, + "mips64le": 8, + "mips64p32": 4, + "mips64p32le": 4, + "ppc": 4, + "ppc64": 8, + "ppc64le": 8, + "s390": 4, + "s390x": 8, + "sparc": 4, + "sparc64": 8, } var intSizeMap = map[string]int64{ - "386": 4, - "alpha": 8, - "amd64": 8, - "arm": 4, - "arm64": 8, - "m68k": 4, - "mipso32": 4, - "mipsn32": 4, - "mipso64": 8, - "mipsn64": 8, - "mips": 4, - "mipsle": 4, - "mips64": 8, - "mips64le": 8, - "ppc": 4, - "ppc64": 8, - "ppc64le": 8, - "s390": 4, - "s390x": 8, - "sparc": 4, - "sparc64": 8, + "386": 4, + "alpha": 8, + "amd64": 8, + "arm": 4, + "arm64": 8, + "m68k": 4, + "mips": 4, + "mipsle": 4, + "mips64": 8, + "mips64le": 8, + "mips64p32": 8, + "mips64p32le": 8, + "ppc": 4, + "ppc64": 8, + "ppc64le": 8, + "s390": 4, + "s390x": 8, + "sparc": 4, + "sparc64": 8, } var cPrefix string Index: libgo/go/go/build/syslist.go =================================================================== --- libgo/go/go/build/syslist.go (revision 253547) +++ libgo/go/go/build/syslist.go (working copy) @@ -5,4 +5,4 @@ package build const goosList = "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 mipso32 mipsn32 mipsn64 mipso64 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 sparc sparc64 " Index: libgo/go/internal/syscall/unix/getrandom_linux_mips64p32x.go =================================================================== --- libgo/go/internal/syscall/unix/getrandom_linux_mips64p32x.go (revision 0) +++ libgo/go/internal/syscall/unix/getrandom_linux_mips64p32x.go (working copy) @@ -0,0 +1,11 @@ +// Copyright 2016 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. + +// +build mips64p32 mips64p32le + +package unix + +// Linux getrandom system call number. +// See GetRandom in getrandom_linux.go. +const randomTrap uintptr = 6317 Index: libgo/go/internal/syscall/unix/getrandom_linux_mips64x.go =================================================================== --- libgo/go/internal/syscall/unix/getrandom_linux_mips64x.go (revision 253547) +++ libgo/go/internal/syscall/unix/getrandom_linux_mips64x.go (working copy) @@ -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 mips64 mips64le mipsn64 mipso64 +// +build mips64 mips64le package unix Index: libgo/go/internal/syscall/unix/getrandom_linux_mipsn32.go =================================================================== --- libgo/go/internal/syscall/unix/getrandom_linux_mipsn32.go (revision 253547) +++ libgo/go/internal/syscall/unix/getrandom_linux_mipsn32.go (working copy) @@ -1,11 +0,0 @@ -// Copyright 2016 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. - -// +build mipsn32 - -package unix - -// Linux getrandom system call number. -// See GetRandom in getrandom_linux.go. -const randomTrap uintptr = 6317 Index: libgo/go/internal/syscall/unix/getrandom_linux_mipso32.go =================================================================== --- libgo/go/internal/syscall/unix/getrandom_linux_mipso32.go (revision 253547) +++ libgo/go/internal/syscall/unix/getrandom_linux_mipso32.go (working copy) @@ -1,11 +0,0 @@ -// Copyright 2016 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. - -// +build mipso32 - -package unix - -// Linux getrandom system call number. -// See GetRandom in getrandom_linux.go. -const randomTrap uintptr = 4353 Index: libgo/go/runtime/hash32.go =================================================================== --- libgo/go/runtime/hash32.go (revision 253547) +++ libgo/go/runtime/hash32.go (working copy) @@ -6,7 +6,7 @@ // xxhash: https://code.google.com/p/xxhash/ // cityhash: https://code.google.com/p/cityhash/ -// +build 386 arm armbe m68k mipso32 mipsn32 mips mipsle ppc s390 sparc +// +build 386 arm armbe m68k mips mipsle ppc s390 sparc package runtime Index: libgo/go/runtime/hash64.go =================================================================== --- libgo/go/runtime/hash64.go (revision 253547) +++ libgo/go/runtime/hash64.go (working copy) @@ -6,7 +6,7 @@ // xxhash: https://code.google.com/p/xxhash/ // cityhash: https://code.google.com/p/cityhash/ -// +build amd64 amd64p32 arm64 mips64 mips64le ppc64 ppc64le s390x alpha arm64be ia64 mipso64 mipsn64 mips64p32 mips64p32le sparc64 +// +build amd64 amd64p32 arm64 mips64 mips64le ppc64 ppc64le s390x alpha arm64be ia64 mips64p32 mips64p32le sparc64 package runtime Index: libgo/go/runtime/lfstack_32bit.go =================================================================== --- libgo/go/runtime/lfstack_32bit.go (revision 253547) +++ libgo/go/runtime/lfstack_32bit.go (working copy) @@ -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 mipso32 mipsn32 ppc s390 sparc +// +build 386 arm nacl armbe m68k mips mipsle mips64p32 mips64p32le ppc s390 sparc package runtime Index: libgo/go/runtime/lfstack_64bit.go =================================================================== --- libgo/go/runtime/lfstack_64bit.go (revision 253547) +++ libgo/go/runtime/lfstack_64bit.go (working copy) @@ -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 amd64 arm64 mips64 mips64le ppc64 ppc64le s390x arm64be alpha mipsn64 sparc64 +// +build amd64 arm64 mips64 mips64le ppc64 ppc64le s390x arm64be alpha sparc64 package runtime Index: libgo/go/runtime/unaligned2.go =================================================================== --- libgo/go/runtime/unaligned2.go (revision 253547) +++ libgo/go/runtime/unaligned2.go (working copy) @@ -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 mipso32 mipsn32 sparc alpha ia64 mipso64 mipsn64 mips64p32 mips64p32le sparc64 +// +build arm mips mipsle mips64 mips64le armbe m68k sparc alpha ia64 mips64p32 mips64p32le sparc64 package runtime Index: libgo/go/syscall/endian_big.go =================================================================== --- libgo/go/syscall/endian_big.go (revision 253547) +++ libgo/go/syscall/endian_big.go (working copy) @@ -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 mipso32 mipsn32 mipso64 mipsn64 mips64p32 s390 sparc sparc64 +// +build ppc64 s390x mips mips64 armbe arm64be m68k ppc mips64p32 s390 sparc sparc64 package syscall Index: libgo/go/syscall/syscall_linux_mips64x.go =================================================================== --- libgo/go/syscall/syscall_linux_mips64x.go (revision 253547) +++ libgo/go/syscall/syscall_linux_mips64x.go (working copy) @@ -1,20 +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. - -// +build linux -// +build mips64 mips64le - -package syscall - -func (r *PtraceRegs) PC() uint64 { return r.Regs[64] } - -func (r *PtraceRegs) SetPC(pc uint64) { r.Regs[64] = pc } - -func PtraceGetRegs(pid int, regsout *PtraceRegs) (err error) { - return ptrace(PTRACE_GETREGS, pid, 0, uintptr(unsafe.Pointer(regsout))) -} - -func PtraceSetRegs(pid int, regs *PtraceRegs) (err error) { - return ptrace(PTRACE_SETREGS, pid, 0, uintptr(unsafe.Pointer(regs))) -} Index: libgo/go/syscall/syscall_linux_mipsx.go =================================================================== --- libgo/go/syscall/syscall_linux_mipsx.go (revision 253547) +++ libgo/go/syscall/syscall_linux_mipsx.go (working copy) @@ -3,10 +3,24 @@ // license that can be found in the LICENSE file. // +build linux -// +build mips mipsle +// +build mips mipsle mips64 mips64le mips64p32 mips64p32le package syscall -func (r *PtraceRegs) PC() uint64 { return uint64(r.Regs[64]) } +import "unsafe" -func (r *PtraceRegs) SetPC(pc uint64) { r.Regs[64] = uint32(pc) } +func (r *PtraceRegs) PC() uint64 { + return r.Cp0_epc +} + +func (r *PtraceRegs) SetPC(pc uint64) { + r.Cp0_epc = pc +} + +func PtraceGetRegs(pid int, regsout *PtraceRegs) (err error) { + return ptrace(PTRACE_GETREGS, pid, 0, uintptr(unsafe.Pointer(regsout))) +} + +func PtraceSetRegs(pid int, regs *PtraceRegs) (err error) { + return ptrace(PTRACE_SETREGS, pid, 0, uintptr(unsafe.Pointer(regs))) +} Index: libgo/match.sh =================================================================== --- libgo/match.sh (revision 253547) +++ libgo/match.sh (working copy) @@ -116,7 +116,7 @@ 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 | mipso32 | mipsn32 | mipsn64 | mipso64 | 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 | sparc | sparc64) tag1=nonmatchingtag ;; esac @@ -128,7 +128,7 @@ 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 | mipso32 | mipsn32 | mipsn64 | mipso64 | 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 | sparc | sparc64) tag2=nonmatchingtag ;; esac Index: libgo/mksysinfo.sh =================================================================== --- libgo/mksysinfo.sh (revision 253547) +++ libgo/mksysinfo.sh (working copy) @@ -302,9 +302,13 @@ upcase_fields "__user_psw_struct" "PtracePsw" >> ${OUT} || true upcase_fields "__user_fpregs_struct" "PtraceFpregs" >> ${OUT} || true upcase_fields "__user_per_struct" "PtracePer" >> ${OUT} || true + else + # mips* + regs=`grep '^type _pt_regs struct' gen-sysinfo.go || true` fi fi if test "$regs" != ""; then + regs=`echo $regs | sed -e 's/type _pt_regs struct//'` regs=`echo $regs | sed -e 's/type __*user_regs_struct struct //' -e 's/[{}]//g'` regs=`echo $regs | sed -e s'/^ *//'` Index: libgo/sysinfo.c =================================================================== --- libgo/sysinfo.c (revision 253547) +++ libgo/sysinfo.c (working copy) @@ -102,6 +102,9 @@ #if defined(HAVE_LINUX_NETLINK_H) #include #endif +#if defined(HAVE_LINUX_PTRACE_H) +#include +#endif #if defined(HAVE_LINUX_RTNETLINK_H) #include #endif Index: libgo/testsuite/gotest =================================================================== --- libgo/testsuite/gotest (revision 253547) +++ libgo/testsuite/gotest (working copy) @@ -314,7 +314,7 @@ 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 | mipso32 | mipsn32 | mipsn64 | mipso64 | 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 | sparc | sparc64) tag1=nonmatchingtag ;; esac @@ -326,7 +326,7 @@ 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 | mipso32 | mipsn32 | mipsn64 | mipso64 | 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 | sparc | sparc64) tag2=nonmatchingtag ;; esac