Subject: Re: unrecognizable insn
To: Patrick Welche <prlw1@newn.cam.ac.uk>
From: Christian Biere <christianbiere@gmx.de>
List: current-users
Date: 10/09/2002 07:56:37
--=.qa:aa3lP)qZM,u
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit
Patrick Welche <prlw1@newn.cam.ac.uk> wrote:
> On i386 with source of Oct 7 07:36 GMT, I get
>
> /usr/src/tools/obj.i386/tools.NetBSD-1.6I-i386/bin/i386--netbsdelf-gcc
> -ffreestanding -pipe -Werror -Wall -Wno-main -Wno-format-zero-length
> -Wpointer-arith -Wmissing-prototypes -Wstrict-prototypes
> -Wno-uninitialized -Di386 -I. -I/usr/src/sys/arch -I/usr/src/sys
> -nostdinc -DLKM -DMAXUSERS=32 -D_KERNEL -D_KERNEL_OPT -c
> /usr/src/sys/dev/pci/if_pcn.c/usr/src/sys/dev/pci/if_pcn.c: In function
> `pcn_init':/usr/src/sys/dev/pci/if_pcn.c:1767: internal
> error--unrecognizable insn:(insn 644 643 646 (set (reg:SI 170)
> (unspec:SI[
> (const_int 512 [0x200])
> ] 5)) -1 (nil)
> (nil))
> cpp0: output pipe has been closed
I'm pretty sure it's the compiler's fault. I'm using gcc 3.2 and it hangs
at the same line of code. My system isn't overclocked. It's a plain AMD
Duron 900 Mhz with 256 DDR-RAM. AFAIK I haven't had any problems with
memory corruption yet. This should not be reproducible if it were a
problem of memory corruption. The revision of if_pcn.c is 1.14 from
2002-10-02. This is what gcc 3.2 tells me:
cc -ffreestanding -pipe -Di386 -I. -I../../../../arch -I../../../..
-nostdi nc -DLKM -DMAXUSERS=32 -D_KERNEL -D_KERNEL_OPT -c
/sys/arch/i386/compile/GENER IC/../../../../dev/pci/if_pcn.c
/sys/dev/pci/if_pcn.c: In function `pcn_init':
/sys/dev/pci/if_pcn.c:1767: unrecognizable insn:
(insn 640 639 641 (parallel[
(set (reg:CCZ 17 flags)
(compare:CCZ (const_int 512 [0x200])
(const_int 0 [0x0])))
(set (reg:SI 203)
(unspec:SI[
(const_int 512 [0x200])
] 5))
] ) -1 (nil)
(nil))
/sys/dev/pci/if_pcn.c:1767: Internal compiler error in extract_insn, at
recog.c:2148
But there's a trick. I have used "export DEFCOPTS=-pipe". Normally,
DEFCOPTS would be -O2 and if I use this the compiler won't fail. Note
that "-O2 -pipe" works as well. I would have expected optimizing might
lead to problems in rare cases but here *not* optimizing triggers the bug.
I haven't submitted a bug report yet or even looked whether it's a known
bug.
Regards,
Christian
--=.qa:aa3lP)qZM,u
Content-Type: application/pgp-signature
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.0 (NetBSD)
iD8DBQE9o8Uf0KQix3oyIMcRAnaQAJ0SSeRO7ZiLjuD6xjMDYYvTKGljmwCeOVeM
cuc0UEM6H7vMV+xDdFXIvEU=
=d4A1
-----END PGP SIGNATURE-----
--=.qa:aa3lP)qZM,u--