[Bug target/55175] i386/sfp-exceptions.c:52:7: error: impossible constraint in 'asm'

2012-11-05 Thread corsepiu at gcc dot gnu.org


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55175



--- Comment #9 from Ralf Corsepius corsepiu at gcc dot gnu.org 2012-11-05 
11:44:22 UTC ---

(In reply to comment #8)

 H have backported similar change to 4.7 branch.

Thanks for the backport.



 Please reopen the PR if there are still problems.

Unfortunately, your patch doesn't seem to help much:



GCC-4.7's soft-float still seems to be pulling in fp routine from inside of

newlib:

...

/opt/rtems-4.11/lib/gcc/i386-rtems4.11/4.7.2/../../../../i386-rtems4.11/lib/soft-float/libc.a(lib_a-svfprintf.o):

In function `_svfprintf_r':

/builddir/build/BUILD/rtems-4.11-i386-rtems4.11-gcc-4.7.2/build/i386-rtems4.11/soft-float/newlib/libc/stdio/../../../../../../gcc-4.7.2/newlib/libc/stdio/vfprintf.c:1072:

undefined reference to `__truncxfdf2'

/builddir/build/BUILD/rtems-4.11-i386-rtems4.11-gcc-4.7.2/build/i386-rtems4.11/soft-float/newlib/libc/stdio/../../../../../../gcc-4.7.2/newlib/libc/stdio/vfprintf.c:1084:

undefined reference to `__ltdf2'

/builddir/build/BUILD/rtems-4.11-i386-rtems4.11-gcc-4.7.2/build/i386-rtems4.11/soft-float/newlib/libc/stdio/../../../../../../gcc-4.7.2/newlib/libc/stdio/vfprintf.c:1556:

undefined reference to `__eqdf2'

/builddir/build/BUILD/rtems-4.11-i386-rtems4.11-gcc-4.7.2/build/i386-rtems4.11/soft-float/newlib/libc/stdio/../../../../../../gcc-4.7.2/newlib/libc/stdio/vfprintf.c:1603:

undefined reference to `__nedf2'


[Bug target/55175] i386/sfp-exceptions.c:52:7: error: impossible constraint in 'asm'

2012-11-05 Thread ubizjak at gmail dot com


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55175



--- Comment #10 from Uros Bizjak ubizjak at gmail dot com 2012-11-05 12:11:53 
UTC ---

(In reply to comment #9)

 (In reply to comment #8)

  H have backported similar change to 4.7 branch.

 Thanks for the backport.

 

  Please reopen the PR if there are still problems.

 Unfortunately, your patch doesn't seem to help much:

 

 GCC-4.7's soft-float still seems to be pulling in fp routine from inside of

 newlib:



This is the other way around: newlib doesn't find libgcc.



This is newlib's problem.


[Bug target/55175] i386/sfp-exceptions.c:52:7: error: impossible constraint in 'asm'

2012-11-05 Thread ubizjak at gmail dot com


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55175



--- Comment #11 from Uros Bizjak ubizjak at gmail dot com 2012-11-05 12:28:53 
UTC ---

(In reply to comment #9)

 (In reply to comment #8)

  H have backported similar change to 4.7 branch.

 Thanks for the backport.

 

  Please reopen the PR if there are still problems.

 Unfortunately, your patch doesn't seem to help much:

 

 GCC-4.7's soft-float still seems to be pulling in fp routine from inside of

 newlib:



You should use t-softfp instead of 386/t-softfp for i[34567]86-*-rtems* in

libgcc/config.host.



In fact, there should be no i386/t-softfp for any x86 target.


[Bug target/55175] i386/sfp-exceptions.c:52:7: error: impossible constraint in 'asm'

2012-11-05 Thread corsepiu at gcc dot gnu.org


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55175



--- Comment #12 from Ralf Corsepius corsepiu at gcc dot gnu.org 2012-11-05 
12:41:56 UTC ---

(In reply to comment #11)



 You should use t-softfp instead of 386/t-softfp for i[34567]86-*-rtems* in

 libgcc/config.host.

 

 In fact, there should be no i386/t-softfp for any x86 target.



You mean, we should apply a patch similar to this?



--- a/libgcc/config.host

+++ b/libgcc/config.host

@@ -568,7 +568,7 @@ i[34567]86-*-nto-qnx*)

extra_parts=crtbegin.o

;;

 i[34567]86-*-rtems*)

-   tmake_file=$tmake_file i386/t-softfp i386/t-crtstuff

+   tmake_file=$tmake_file i386/t-crtstuff

extra_parts=$extra_parts crti.o crtn.o

;;

 i[34567]86-*-solaris2* | x86_64-*-solaris2.1[0-9]*)

@@ -1165,6 +1165,7 @@ i[34567]86-*-darwin* | x86_64-*-darwin* | \

   i[34567]86-*-kfreebsd*-gnu | x86_64-*-kfreebsd*-gnu | \

   i[34567]86-*-linux* | x86_64-*-linux* | \

   i[34567]86-*-gnu* | \

+  i[34567]86-*-rtems* | \

   i[34567]86-*-solaris2* | x86_64-*-solaris2.1[0-9]* | \

   i[34567]86-*-cygwin* | i[34567]86-*-mingw* | x86_64-*-mingw* | \

   i[34567]86-*-freebsd* | x86_64-*-freebsd*)





The breakdown above is with this patch applied.


[Bug target/55175] i386/sfp-exceptions.c:52:7: error: impossible constraint in 'asm'

2012-11-05 Thread ubizjak at gmail dot com


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55175



--- Comment #13 from Uros Bizjak ubizjak at gmail dot com 2012-11-05 14:15:16 
UTC ---

(In reply to comment #12)



  You should use t-softfp instead of 386/t-softfp for i[34567]86-*-rtems* in

  libgcc/config.host.

  

  In fact, there should be no i386/t-softfp for any x86 target.

 

 You mean, we should apply a patch similar to this?



Yes.



 The breakdown above is with this patch applied.



Then the problem is either in newlib or generic libgcc configury.



Anyway, original problem with soft-fp was fixed.


[Bug target/55175] i386/sfp-exceptions.c:52:7: error: impossible constraint in 'asm'

2012-11-05 Thread ubizjak at gmail dot com


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55175



--- Comment #14 from Uros Bizjak ubizjak at gmail dot com 2012-11-05 14:24:43 
UTC ---

(In reply to comment #13)



 Then the problem is either in newlib or generic libgcc configury.



Please note that t-fdpbit is not enabled by default for x86 anymore. I don't

know if this was intentional omission during libgcc conversion, but nobody

missed it until today.



The second part of your patch enables TFmode soft-float, probably not needed

for RTEMS. I think that you need either t-fdpbit or t-softfp-sfdf added to

i[34567]86-*-rtems*)


[Bug target/55175] i386/sfp-exceptions.c:52:7: error: impossible constraint in 'asm'

2012-11-05 Thread corsepiu at gcc dot gnu.org


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55175



--- Comment #15 from Ralf Corsepius corsepiu at gcc dot gnu.org 2012-11-05 
14:38:44 UTC ---

(In reply to comment #14)

 (In reply to comment #13)

 

  Then the problem is either in newlib or generic libgcc configury.



I meanwhile came to the latter conclusion. 



The math calls are being pulled-in by gcc's code generation from inside of

newlib's libm, but soft-fp emulation is missing in libgcc. As we have both hard

and soft-float multilib variants, I think RTEMS needs a softfp wrapper.



 Please note that t-fdpbit is not enabled by default for x86 anymore. I don't

 know if this was intentional omission during libgcc conversion, but nobody

 missed it until today.



OK, will check.



 The second part of your patch enables TFmode soft-float, probably not needed

 for RTEMS. I think that you need either t-fdpbit or t-softfp-sfdf added to

 i[34567]86-*-rtems*)



Thanks for these hints - I am currently investigating, but ... things like

these take _a lot of time_.


[Bug target/55175] i386/sfp-exceptions.c:52:7: error: impossible constraint in 'asm'

2012-11-04 Thread uros at gcc dot gnu.org


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55175



--- Comment #7 from uros at gcc dot gnu.org 2012-11-04 18:58:32 UTC ---

Author: uros

Date: Sun Nov  4 18:58:29 2012

New Revision: 193140



URL: http://gcc.gnu.org/viewcvs?root=gccview=revrev=193140

Log:

PR target/55175

* config/i386/32/sfp-machine.h: Guard exception handling and

rounding handling code with _SOFT_FLOAT.

* config/i386/64/sfp-machine.h: Ditto.





Modified:

branches/gcc-4_7-branch/libgcc/ChangeLog

branches/gcc-4_7-branch/libgcc/config/i386/32/sfp-machine.h

branches/gcc-4_7-branch/libgcc/config/i386/64/sfp-machine.h


[Bug target/55175] i386/sfp-exceptions.c:52:7: error: impossible constraint in 'asm'

2012-11-04 Thread ubizjak at gmail dot com


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55175



--- Comment #8 from Uros Bizjak ubizjak at gmail dot com 2012-11-04 18:59:53 
UTC ---

(In reply to comment #6)

 I can confirm i386-rtems4.11-gcc now builds.

 

 @Uros: I am inclined to believe this patch probably should be backported to

 4.7.x.



H have backported similar change to 4.7 branch. Please reopen the PR if there

are still problems.


[Bug target/55175] i386/sfp-exceptions.c:52:7: error: impossible constraint in 'asm'

2012-11-04 Thread ubizjak at gmail dot com


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55175



Uros Bizjak ubizjak at gmail dot com changed:



   What|Removed |Added



   Target Milestone|4.8.0   |4.7.3


[Bug target/55175] i386/sfp-exceptions.c:52:7: error: impossible constraint in 'asm'

2012-11-03 Thread corsepiu at gcc dot gnu.org


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55175



--- Comment #6 from Ralf Corsepius corsepiu at gcc dot gnu.org 2012-11-03 
06:25:33 UTC ---

I can confirm i386-rtems4.11-gcc now builds.



@Uros: I am inclined to believe this patch probably should be backported to

4.7.x.



At least, RTEMS is facing bizarre compilation issues, which I would not want to

be related to similar issues as this.


[Bug target/55175] i386/sfp-exceptions.c:52:7: error: impossible constraint in 'asm'

2012-11-02 Thread ubizjak at gmail dot com


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55175



Uros Bizjak ubizjak at gmail dot com changed:



   What|Removed |Added



 Target||x86

 Status|UNCONFIRMED |RESOLVED

URL||http://gcc.gnu.org/ml/gcc-p

   ||atches/2012-11/msg00190.htm

   ||l

  Component|bootstrap   |target

 Resolution||FIXED

 AssignedTo|unassigned at gcc dot   |ubizjak at gmail dot com

   |gnu.org |

   Target Milestone|--- |4.8.0



--- Comment #5 from Uros Bizjak ubizjak at gmail dot com 2012-11-02 14:26:09 
UTC ---

Fixed.