Re: Use i386/crtfastmath.c on Solaris 2/x86

2011-06-03 Thread Rainer Orth
Richard Henderson writes: > On 06/01/2011 07:51 AM, Rainer Orth wrote: >> + /* Set PC to the instruction after the faulting one to skip over it, >> + otherwise we enter an infinite loop. 4 is the size of the stmxcsr >> + instruction. */ > ... >> + /* We need a single SSE instructi

Re: Use i386/crtfastmath.c on Solaris 2/x86

2011-06-01 Thread Richard Henderson
On 06/01/2011 10:29 AM, Rainer Orth wrote: > I still mean to fix > driver-i386.c to correcly handle -march=native on Solaris 8 and 9 which > cannot in general execute SSE insns. I wonder if there's a better place > to share this code? I can't think of a good place. :-( r~

Re: Use i386/crtfastmath.c on Solaris 2/x86

2011-06-01 Thread Rainer Orth
Richard Henderson writes: > On 06/01/2011 07:51 AM, Rainer Orth wrote: >> + /* Set PC to the instruction after the faulting one to skip over it, >> + otherwise we enter an infinite loop. 4 is the size of the stmxcsr >> + instruction. */ > ... >> + /* We need a single SSE instructi

Re: Use i386/crtfastmath.c on Solaris 2/x86

2011-06-01 Thread Richard Henderson
On 06/01/2011 07:51 AM, Rainer Orth wrote: > + /* Set PC to the instruction after the faulting one to skip over it, > + otherwise we enter an infinite loop. 4 is the size of the stmxcsr > + instruction. */ ... > + /* We need a single SSE instruction here so the handler can safely sk

Re: Use i386/crtfastmath.c on Solaris 2/x86

2011-06-01 Thread Rainer Orth
Uros Bizjak writes: > Please just put "if (edx & bit_SSE)" part inside existing check. You > will need to split assignment of mxcsr from the declaration, though. > > OK with this change. Here's the patch I've actually comitted after a quick bootstrap on i386-pc-solaris2.10. Thanks. Rain

Re: Use i386/crtfastmath.c on Solaris 2/x86

2011-05-31 Thread Uros Bizjak
On Tue, May 31, 2011 at 2:25 PM, Rainer Orth wrote: > The only complication is that I need to make sure that SSE insns are only > used if the host supports them. > > Bootstrapped without regressions on i386-pc-solaris2.8, > i386-pc-solaris2.9, i386-pc-solaris2.11, and sparc-sun-solaris2.11. > > T

Use i386/crtfastmath.c on Solaris 2/x86

2011-05-31 Thread Rainer Orth
I had long meant to support -fast-math on Solaris 2/x86. While working on the Solaris toplevel libgcc move, I've done it with the following patch. The only complication is that I need to make sure that SSE insns are only used if the host supports them. Bootstrapped without regressions on i386-pc