2005-12-13 13:07:37

by Alessandro Suardi

[permalink] [raw]
Subject: [2.6.15-rc5-git3] hpet.c causes FC4 GCC 4.0.2 to bomb with unrecognizable insn

CC drivers/char/hpet.o
drivers/char/hpet.c: In function `hpet_calibrate':
drivers/char/hpet.c:803: Unrecognizable insn:
(insn/i 95 270 264 (parallel[
(set (reg:SI 0 eax)
(asm_operands ("") ("=a") 0[
(reg:DI 1 edx)
]
[
(asm_input:DI ("A"))
] ("drivers/char/hpet.c") 452))
(set (reg:SI 1 edx)
(asm_operands ("") ("=d") 1[
(reg:DI 1 edx)
]
[
(asm_input:DI ("A"))
] ("drivers/char/hpet.c") 452))
(clobber (reg:QI 19 dirflag))
(clobber (reg:QI 18 fpsr))
(clobber (reg:QI 17 flags))
] ) -1 (insn_list 92 (nil))
(nil))
drivers/char/hpet.c:803: confused by earlier errors, bailing out
make[2]: *** [drivers/char/hpet.o] Error 1
make[1]: *** [drivers/char] Error 2
make: *** [drivers] Error 2

--alessandro

"So much can happen by accident
No rhyme, no reason - no one's innocent"

(Steve Wynn - "Under The Weather")


2005-12-17 20:37:04

by Andrew Morton

[permalink] [raw]
Subject: Re: [2.6.15-rc5-git3] hpet.c causes FC4 GCC 4.0.2 to bomb with unrecognizable insn

Alessandro Suardi <[email protected]> wrote:
>
> CC drivers/char/hpet.o
> drivers/char/hpet.c: In function `hpet_calibrate':
> drivers/char/hpet.c:803: Unrecognizable insn:
> (insn/i 95 270 264 (parallel[
> (set (reg:SI 0 eax)
> (asm_operands ("") ("=a") 0[
> (reg:DI 1 edx)
> ]
> [
> (asm_input:DI ("A"))
> ] ("drivers/char/hpet.c") 452))
> (set (reg:SI 1 edx)
> (asm_operands ("") ("=d") 1[
> (reg:DI 1 edx)
> ]
> [
> (asm_input:DI ("A"))
> ] ("drivers/char/hpet.c") 452))
> (clobber (reg:QI 19 dirflag))
> (clobber (reg:QI 18 fpsr))
> (clobber (reg:QI 17 flags))
> ] ) -1 (insn_list 92 (nil))
> (nil))
> drivers/char/hpet.c:803: confused by earlier errors, bailing out
> make[2]: *** [drivers/char/hpet.o] Error 1
> make[1]: *** [drivers/char] Error 2
> make: *** [drivers] Error 2
>

Same compiler works OK here, so it's presumably "fixed" by some some good
.config luck.

If we can find a decent workaround in-kernel it's worth putting it in.
It's quite possible that inlined hpet_time_div() - please try uninlining
it.

2005-12-17 20:50:31

by Alessandro Suardi

[permalink] [raw]
Subject: Re: [2.6.15-rc5-git3] hpet.c causes FC4 GCC 4.0.2 to bomb with unrecognizable insn

On 12/17/05, Andrew Morton <[email protected]> wrote:
> Alessandro Suardi <[email protected]> wrote:
> >
> > CC drivers/char/hpet.o
> > drivers/char/hpet.c: In function `hpet_calibrate':
> > drivers/char/hpet.c:803: Unrecognizable insn:
> > (insn/i 95 270 264 (parallel[
> > (set (reg:SI 0 eax)
> > (asm_operands ("") ("=a") 0[
> > (reg:DI 1 edx)
> > ]
> > [
> > (asm_input:DI ("A"))
> > ] ("drivers/char/hpet.c") 452))
> > (set (reg:SI 1 edx)
> > (asm_operands ("") ("=d") 1[
> > (reg:DI 1 edx)
> > ]
> > [
> > (asm_input:DI ("A"))
> > ] ("drivers/char/hpet.c") 452))
> > (clobber (reg:QI 19 dirflag))
> > (clobber (reg:QI 18 fpsr))
> > (clobber (reg:QI 17 flags))
> > ] ) -1 (insn_list 92 (nil))
> > (nil))
> > drivers/char/hpet.c:803: confused by earlier errors, bailing out
> > make[2]: *** [drivers/char/hpet.o] Error 1
> > make[1]: *** [drivers/char] Error 2
> > make: *** [drivers] Error 2
> >
>
> Same compiler works OK here, so it's presumably "fixed" by some some good
> .config luck.
>
> If we can find a decent workaround in-kernel it's worth putting it in.
> It's quite possible that inlined hpet_time_div() - please try uninlining
> it.
>

Coincidence - I was about to post the fact that my earlier report
was due to a pilot error (TM).

I had installed the compat-gcc packages due to legacy software
which expected /usr/bin/gcc to be the FC2 2.96 GCC, then I
forgot to point /usr/bin/gcc back to FC4 4.0.2 GCC.

So there is a compiler which bombs, but it's this one:

[asuardi@sandman ~]$ /usr/bin/gcc296 -v
Reading specs from /usr/lib/gcc-lib/i386-redhat-linux7/2.96/specs
gcc version 2.96 20000731 (Red Hat Linux 7.3 2.96-126)

Sorry for the false alarm about GCC 4.0.2. According to the
current Documentation/Changes the 2.96 compiler seems to
be expected to build these kernels, so perhaps there still is
something to be looked into.

If anyone is interested I can try uninlining hpet_time_div()
and rebuild with 2.96 then report back.

Thanks,

--alessandro

"Somehow all you ever need is, never really quite enough, you know"

(Bruce Springsteen - "Reno")

2005-12-17 21:33:15

by Adrian Bunk

[permalink] [raw]
Subject: Re: [2.6.15-rc5-git3] hpet.c causes FC4 GCC 4.0.2 to bomb with unrecognizable insn

On Sat, Dec 17, 2005 at 09:50:29PM +0100, Alessandro Suardi wrote:
>...
> Sorry for the false alarm about GCC 4.0.2. According to the
> current Documentation/Changes the 2.96 compiler seems to
> be expected to build these kernels, so perhaps there still is
> something to be looked into.
>
> If anyone is interested I can try uninlining hpet_time_div()
> and rebuild with 2.96 then report back.

In -mm, support for gcc < 3.2 has already been dropped making it
relatively useless to work around gcc 2.96 internal errors.

> Thanks,
>
> --alessandro

cu
Adrian

--

"Is there not promise of rain?" Ling Tan asked suddenly out
of the darkness. There had been need of rain for many days.
"Only a promise," Lao Er said.
Pearl S. Buck - Dragon Seed