Subject: port-sparc64/28065: compiling GENERIC kernel for hp700 fails "error: unrecognizable insn"
To: None <gnats-bugs@gnats.NetBSD.org>
From: None <michael@nosflow.com>
List: netbsd-bugs
Date: 11/07/2004 08:51:52
>Number:         28065
>Category:       port-sparc64
>Synopsis:       compiling GENERIC kernel for hp700 fails "error: unrecognizable insn"
>Confidential:   no
>Severity:       critical
>Priority:       low
>Responsible:    port-sparc64-maintainer
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sun Nov 07 08:52:00 UTC 2004
>Closed-Date:
>Last-Modified:
>Originator:     Michael Wolfson
>Release:        2.0_BETA on sparc64
>Organization:
>Environment:
NetBSD ultra 2.0_BETA NetBSD 2.0_BETA (GENERIC) #0: Thu May 20 18:40:11 UTC 2004  autobuild@tgm.netbsd.org:/autobuild/netbsd-2-0/sparc64/OBJ/autobuild/netbsd-2-0/src/sys/arch/sparc64/compile/GENERIC sparc64
>Description:
I cross-built the toolchain using today's sources for hp700 on a sparc64 in the hopes of compiling a snapshot of hp700.  It failed with what looked like the same compiler error in several places.

What's interesting is that I had no trouble cross-compiling from MacOS X 10.3.5/Darwin 7.5.8, which is why I'm filing this under sparc64.

I eventually commented out inet6, isp, procfs, and ntfs, and had to give up at kern/init_sysctl.c because there was no appropriate thing to disable to get past the borked file.


#   compile  GENERIC/nd6.o
/usr/src/cross/hp700/bin/hppa--netbsd-gcc -ffreestanding -mpa-risc-1-1 -msoft-fl
oat -mdisable-fpregs -mno-space-regs -mfast-indirect-calls -mportable-runtime -W
error -Wall -Wno-main -Wno-format-zero-length -Wpointer-arith -Wmissing-prototyp
es -Wstrict-prototypes -Wno-sign-compare -fno-zero-initialized-in-bss -Dhppa -Dh
p700 -I. -I../../../../arch -I../../../.. -nostdinc -DFPEMUL -DLKM -DGSCVERBOSE 
-DMAXUSERS=32 -D_KERNEL -D_KERNEL_OPT -I../../../../dist/ipf -c ../../../../neti
net6/nd6.c

*** Failed target:  nd6.o
*** Failed command: echo '# ' "compile GENERIC/nd6.o"; echo /usr/src/cross/hp700
/bin/hppa--netbsd-gcc -ffreestanding -mpa-risc-1-1 -msoft-float -mdisable-fpregs
 -mno-space-regs -mfast-indirect-calls -mportable-runtime -Werror -Wall -Wno-mai
n -Wno-format-zero-length -Wpointer-arith -Wmissing-prototypes -Wstrict-prototyp
es -Wno-sign-compare -fno-zero-initialized-in-bss -Dhppa -Dhp700 -I. -I../../../
../arch -I../../../.. -nostdinc -DFPEMUL -DLKM -DGSCVERBOSE -DMAXUSERS=32 -D_KER
NEL -D_KERNEL_OPT -I../../../../dist/ipf -c ../../../../netinet6/nd6.c; /usr/src
/cross/hp700/bin/hppa--netbsd-gcc -ffreestanding -mpa-risc-1-1 -msoft-float -mdi
sable-fpregs -mno-space-regs -mfast-indirect-calls -mportable-runtime -Werror -W
all -Wno-main -Wno-format-zero-length -Wpointer-arith -Wmissing-prototypes -Wstr
ict-prototypes -Wno-sign-compare -fno-zero-initialized-in-bss -Dhppa -Dhp700 -I.
 -I../../../../arch -I../../../.. -nostdinc -DFPEMUL -DLKM -DGSCVERBOSE -DMAXUSE
RS=32 -D_KERNEL -D_KERNEL_OPT -I../../../../dist/ipf -c ../../../../netinet6/nd6
.c
*** Error code 1

Stop.

../../../../netinet6/nd6.c: In function `nd6_setmtu0':
../../../../netinet6/nd6.c:230: error: unrecognizable insn:
(insn 34 33 35 6 0x40d334a0 (set (reg:DI 97)
        (plus:DI (reg:DI 103)
            (const_int -5056 [0xffffffffffffec40]))) -1 (nil)
    (expr_list:REG_DEAD (reg:DI 103)
        (nil)))
../../../../netinet6/nd6.c:230: internal compiler error: in extract_insn, at recog.c:2175
Please submit a full bug report,


######
If I compile with inet6 commented out, it bails further down at isp:
#   compile  GENERIC/iha.o
/usr/src/cross/hp700/bin/hppa--netbsd-gcc -ffreestanding -mpa-risc-1-1 -msoft-fl
oat -mdisable-fpregs -mno-space-regs -mfast-indirect-calls -mportable-runtime -W
error -Wall -Wno-main -Wno-format-zero-length -Wpointer-arith -Wmissing-prototyp
es -Wstrict-prototypes -Wno-sign-compare -fno-zero-initialized-in-bss -Dhppa -Dh
p700 -I. -I../../../../arch -I../../../.. -nostdinc -DFPEMUL -DLKM -DGSCVERBOSE 
-DMAXUSERS=32 -D_KERNEL -D_KERNEL_OPT -I../../../../dist/ipf -c ../../../../dev/
ic/iha.c
#   compile  GENERIC/isp.o
/usr/src/cross/hp700/bin/hppa--netbsd-gcc -ffreestanding -mpa-risc-1-1 -msoft-fl
oat -mdisable-fpregs -mno-space-regs -mfast-indirect-calls -mportable-runtime -W
error -Wall -Wno-main -Wno-format-zero-length -Wpointer-arith -Wmissing-prototyp
es -Wstrict-prototypes -Wno-sign-compare -fno-zero-initialized-in-bss -Dhppa -Dh
p700 -I. -I../../../../arch -I../../../.. -nostdinc -DFPEMUL -DLKM -DGSCVERBOSE 
-DMAXUSERS=32 -D_KERNEL -D_KERNEL_OPT -I../../../../dist/ipf -c ../../../../dev/
ic/isp.c
../../../../dev/ic/isp.c: In function `isp_fclink_test':
../../../../dev/ic/isp.c:1798: error: unrecognizable insn:
(insn 279 278 280 23 0x412c0fc0 (set (reg:DI 214)
        (plus:DI (reg:DI 215)
            (const_int 6144 [0x1800]))) -1 (nil)
    (expr_list:REG_DEAD (reg:DI 215)
        (nil)))
../../../../dev/ic/isp.c:1798: internal compiler error: in extract_insn, at reco
g.c:2175
Please submit a full bug report,

[...]
#   compile  GENERIC/procfs_vnops.o
/usr/src/cross/hp700/bin/hppa--netbsd-gcc -ffreestanding -mpa-risc-1-1 -msoft-fl
oat -mdisable-fpregs -mno-space-regs -mfast-indirect-calls -mportable-runtime -W
error -Wall -Wno-main -Wno-format-zero-length -Wpointer-arith -Wmissing-prototyp
es -Wstrict-prototypes -Wno-sign-compare -fno-zero-initialized-in-bss -Dhppa -Dh
p700 -I. -I../../../../arch -I../../../.. -nostdinc -DFPEMUL -DLKM -DGSCVERBOSE 
-DMAXUSERS=32 -D_KERNEL -D_KERNEL_OPT -I../../../../dist/ipf -c ../../../../misc
fs/procfs/procfs_vnops.c
../../../../miscfs/procfs/procfs_vnops.c: In function `procfs_readdir':
../../../../miscfs/procfs/procfs_vnops.c:1317: error: unrecognizable insn:
(insn 861 860 862 109 0x40fa3a40 (set (reg:DI 429)
        (plus:DI (reg:DI 430)
            (const_int -7424 [0xffffffffffffe300]))) -1 (nil)
    (expr_list:REG_DEAD (reg:DI 430)
        (expr_list:REG_EQUAL (const_int 7166760209311818496 [0x63757270726f6300]
)
            (nil))))
../../../../miscfs/procfs/procfs_vnops.c:1317: internal compiler error: in extra
ct_insn, at recog.c:2175
Please submit a full bug report,

>How-To-Repeat:
./build.sh -m hp700 -O /usr/src/obj/hp700 -T /usr/src/cross/hp700 tools
/usr/src/cross/hp700/bin/nbconfig GENERIC
/usr/src/cross/hp700/bin/nbmake-hp700 depend
/usr/src/cross/hp700/bin/nbmake-hp700
>Fix:

>Release-Note:
>Audit-Trail:
>Unformatted: