On Mon, Oct 9, 2017 at 9:59 AM, Ian Lance Taylor <i...@golang.org> wrote: > 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
These required some further patches on the GCC 7 branch: https://golang.org/cl/46712 by Urox Bizjak https://golang.org/cl/46839 by Andreas Krebbel This fixes GCC PR 82559. Bootstrapped and ran Go tests on x86_64-pc-linux-gnu. Committed to GCC 7 branch. Ian
Index: libgo/go/syscall/syscall_linux_alpha.go =================================================================== --- libgo/go/syscall/syscall_linux_alpha.go (revision 253769) +++ libgo/go/syscall/syscall_linux_alpha.go (working copy) @@ -8,38 +8,6 @@ import "unsafe" -type PtraceRegs struct { - R0 uint64 - R1 uint64 - R2 uint64 - R3 uint64 - R4 uint64 - R5 uint64 - R6 uint64 - R7 uint64 - R8 uint64 - R19 uint64 - R20 uint64 - R21 uint64 - R22 uint64 - R23 uint64 - R24 uint64 - R25 uint64 - R26 uint64 - R27 uint64 - R28 uint64 - Hae uint64 - Trap_a0 uint64 - Trap_a1 uint64 - Trap_a2 uint64 - Ps uint64 - Pc uint64 - Gp uint64 - R16 uint64 - R17 uint64 - R18 uint64 -} - func (r *PtraceRegs) PC() uint64 { return r.Pc } Index: libgo/go/syscall/syscall_linux_s390.go =================================================================== --- libgo/go/syscall/syscall_linux_s390.go (revision 253769) +++ libgo/go/syscall/syscall_linux_s390.go (working copy) @@ -8,9 +8,9 @@ import "unsafe" -func (r *PtraceRegs) PC() uint64 { return uint64(r.Psw.Addr) } +func (r *PtraceRegs) PC() uint64 { return uint64(r.Psw.addr) } -func (r *PtraceRegs) SetPC(pc uint64) { r.Psw.Addr = uint32(pc) } +func (r *PtraceRegs) SetPC(pc uint64) { r.Psw.addr = uint32(pc) } const syscall_PTRACE_PEEKUSR_AREA = 0x5000 const syscall_PTRACE_POKEUSR_AREA = 0x5001 Index: libgo/go/syscall/syscall_linux_s390x.go =================================================================== --- libgo/go/syscall/syscall_linux_s390x.go (revision 253769) +++ libgo/go/syscall/syscall_linux_s390x.go (working copy) @@ -8,9 +8,9 @@ import "unsafe" -func (r *PtraceRegs) PC() uint64 { return r.Psw.Addr } +func (r *PtraceRegs) PC() uint64 { return r.Psw.addr } -func (r *PtraceRegs) SetPC(pc uint64) { r.Psw.Addr = pc } +func (r *PtraceRegs) SetPC(pc uint64) { r.Psw.addr = pc } const syscall_PTRACE_PEEKUSR_AREA = 0x5000 const syscall_PTRACE_POKEUSR_AREA = 0x5001 Index: libgo/mksysinfo.sh =================================================================== --- libgo/mksysinfo.sh (revision 253769) +++ libgo/mksysinfo.sh (working copy) @@ -295,17 +295,8 @@ # _user_regs_struct. regs=`grep '^type _user_regs_struct struct' gen-sysinfo.go || true` if test "$regs" = ""; then - # s390 - regs=`grep '^type __user_regs_struct struct' gen-sysinfo.go || true` - if test "$regs" != ""; then - # Substructures of __user_regs_struct on s390 - 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 + # mips* + regs=`grep '^type _pt_regs struct' gen-sysinfo.go || true` fi if test "$regs" != ""; then regs=`echo $regs | sed -e 's/type _pt_regs struct//'`