public inbox for gcc-prs@sourceware.org
help / color / mirror / Atom feed
* c/5707: i386 compiler can't build libgcc2.c with -msoft-float
@ 2002-02-16 7:46 eric.norum
0 siblings, 0 replies; 3+ messages in thread
From: eric.norum @ 2002-02-16 7:46 UTC (permalink / raw)
To: gcc-gnats; +Cc: joel.sherrill
>Number: 5707
>Category: c
>Synopsis: i386 compiler can't build libgcc2.c with -msoft-float
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: unassigned
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Sat Feb 16 07:46:01 PST 2002
>Closed-Date:
>Last-Modified:
>Originator: Eric Norum <eric.norum@usask.ca>
>Release: 2002-02-14 snapshot
>Organization:
>Environment:
Redhat 7.2 linux
>Description:
Here's what I can cut the failing program down to (this is part of libgcc2.c).
=================================================================
typedef float DFtype __attribute__ ((mode (DF)));
typedef int DItype __attribute__ ((mode (DI)));
typedef int SItype __attribute__ ((mode (SI)));
typedef unsigned int USItype __attribute__ ((mode (SI)));
typedef unsigned int UDItype __attribute__ ((mode (DI)));
DFtype
__floatdidf (DItype u)
{
DFtype d;
d = (SItype) (u >> (sizeof (SItype) * 8));
d *= (((UDItype) 1) << ((sizeof (SItype) * 8) / 2));
d *= (((UDItype) 1) << ((sizeof (SItype) * 8) / 2));
d += (USItype) (u & ((((UDItype) 1) << (sizeof (SItype) * 8)) - 1));
return d;
}
=================================================================
Compiler details:
../gcc/configure --enable-languages="c,c++" --prefix=/tmp/cjnk
source@norum1 1633> /tmp/cjnk/bin/gcc --version
gcc (GCC) 3.1 20020214 (experimental)
Copyright (C) 2002 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
=================================================================
Here's what happens when it's compiled with optimization turned on:
source@norum1 1635> /tmp/cjnk/bin/gcc -c -O2 -msoft-float b.c
b.c: In function `__floatdidf':
b.c:17: unrecognizable insn:
(insn 13 12 16 (set (reg/v:DF 60)
(float:DF (subreg:SI (reg:DI 61) 0))) -1 (insn_list 12 (nil))
(expr_list:REG_DEAD (reg:DI 61)
(nil)))
b.c:17: Internal compiler error in extract_insn, at recog.c:2129
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://www.gnu.org/software/gcc/bugs.html> for instructions.
=================================================================
And here's what happens when it's compiled with optimization turned off:
source@norum1 1636> /tmp/cjnk/bin/gcc -c -msoft-float b.c
b.c: In function `__floatdidf':
b.c:17: Internal compiler error in instantiate_virtual_regs_1, at function.c:3880
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://www.gnu.org/software/gcc/bugs.html> for instructions.
=================================================================
>How-To-Repeat:
Try to build libgcc2.c with -msoft-float
>Fix:
>Release-Note:
>Audit-Trail:
>Unformatted:
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: c/5707: i386 compiler can't build libgcc2.c with -msoft-float
@ 2002-03-05 14:36 Richard Henderson
0 siblings, 0 replies; 3+ messages in thread
From: Richard Henderson @ 2002-03-05 14:36 UTC (permalink / raw)
To: nobody; +Cc: gcc-prs
The following reply was made to PR c/5707; it has been noted by GNATS.
From: Richard Henderson <rth@redhat.com>
To: Joel Sherrill <joel.sherrill@OARcorp.com>
Cc: gcc-gnats@gcc.gnu.org, gcc-prs@gcc.gnu.org, eric.norum@usask.ca,
gcc-bugs@gcc.gnu.org, Jan Hubicka <jh@suse.cz>
Subject: Re: c/5707: i386 compiler can't build libgcc2.c with -msoft-float
Date: Tue, 5 Mar 2002 14:10:10 -0800
On Tue, Mar 05, 2002 at 06:15:19AM -0600, Joel Sherrill wrote:
> Richard/Jan could you try this out and take a stab at fixing it? This
> is a real pain for the embedded community using i386dx/ex and 486sx
> derived CPUs.
See if this is all you need.
r~
Index: config/i386/i386.md
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/i386/i386.md,v
retrieving revision 1.339
diff -c -p -d -u -r1.339 i386.md
--- i386.md 2002/02/21 21:16:18 1.339
+++ i386.md 2002/03/05 22:26:35
@@ -5136,7 +5136,7 @@
(define_expand "floatsidf2"
[(set (match_operand:DF 0 "register_operand" "")
(float:DF (match_operand:SI 1 "nonimmediate_operand" "")))]
- ""
+ "TARGET_80387 || TARGET_SSE2"
"")
(define_insn "*floatsidf2_i387"
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: c/5707: i386 compiler can't build libgcc2.c with -msoft-float
@ 2002-03-05 4:16 Joel Sherrill
0 siblings, 0 replies; 3+ messages in thread
From: Joel Sherrill @ 2002-03-05 4:16 UTC (permalink / raw)
To: nobody; +Cc: gcc-prs
The following reply was made to PR c/5707; it has been noted by GNATS.
From: Joel Sherrill <joel.sherrill@OARcorp.com>
To: joel.sherrill@oarcorp.com, gcc-gnats@gcc.gnu.org,
gcc-prs@gcc.gnu.org, eric.norum@usask.ca, gcc-bugs@gcc.gnu.org,
Jan Hubicka <jh@suse.cz>, rth@redhat.com
Cc:
Subject: Re: c/5707: i386 compiler can't build libgcc2.c with -msoft-float
Date: Tue, 05 Mar 2002 06:15:19 -0600
Eric sent me email privately confirming that PR5707 is present on
i386-linux-gcc as well as on i386-rtems-gcc. It's the -msoft-float that
causes the problem. When we tried adding -msoft-float as a multilib
to the i386-elf target in the past, it has broken as well. This is
on the main line CVS and a regression from 3.0.4.
http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=5707
Richard/Jan could you try this out and take a stab at fixing it? This
is a real pain for the embedded community using i386dx/ex and 486sx
derived CPUs.
Thanks.
--
Joel Sherrill, Ph.D. Director of Research & Development
joel@OARcorp.com On-Line Applications Research
Ask me about RTEMS: a free RTOS Huntsville AL 35805
Support Available (256) 722-9985
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2002-03-05 22:36 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-02-16 7:46 c/5707: i386 compiler can't build libgcc2.c with -msoft-float eric.norum
2002-03-05 4:16 Joel Sherrill
2002-03-05 14:36 Richard Henderson
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).