Re: _Fract types and conversion routines

2015-10-30 Thread Richard Henderson
On 10/30/2015 02:05 AM, Richard Biener wrote: > On Thu, Oct 29, 2015 at 6:49 PM, Steve Ellcey wrote: >> So should __satfractqiuhq be dealing with the fact that the argument 'a' >> may not have been sign extend in the correct way? > > No. GCC should ensure libcalls (yes, they are speical for some

Re: _Fract types and conversion routines

2015-10-30 Thread Richard Biener
On Thu, Oct 29, 2015 at 6:49 PM, Steve Ellcey wrote: > > OK, I think I understand what is happening with the MIPS failure when > converting 'signed char' to '_Sat unsigned _Fract' after I removed > the TARGET_PROMOTE_PROTOTYPES macro. > > This bug is a combination of two factors, one is that calls

Re: _Fract types and conversion routines

2015-10-29 Thread Steve Ellcey
OK, I think I understand what is happening with the MIPS failure when converting 'signed char' to '_Sat unsigned _Fract' after I removed the TARGET_PROMOTE_PROTOTYPES macro. This bug is a combination of two factors, one is that calls to library functions (like __satfractqiuhq) don't necessarily g

Re: _Fract types and conversion routines

2015-10-28 Thread Steve Ellcey
You can ignore that last email. I think I finally found where the problem is. In the main program: extern void abort (void); int main () { signed char a = -1; _Sat unsigned _Fract b = a; if (b != 0.0ur) abort(); return 0; } If I compile with -O0, I see: li $2,-1

Re: _Fract types and conversion routines

2015-10-28 Thread Steve Ellcey
On Wed, 2015-10-28 at 13:42 +0100, Richard Biener wrote: > On Wed, Oct 28, 2015 at 12:23 AM, Steve Ellcey wrote: > > > > I have a question about the _Fract types and their conversion routines. > > If I compile this program: > > > > extern void abort (void); > > int main () > > { > > signed char

Re: _Fract types and conversion routines

2015-10-28 Thread Richard Biener
On Wed, Oct 28, 2015 at 12:23 AM, Steve Ellcey wrote: > > I have a question about the _Fract types and their conversion routines. > If I compile this program: > > extern void abort (void); > int main () > { > signed char a = -1; > _Sat unsigned _Fract b = a; > if (b != 0.0ur) > abort();

_Fract types and conversion routines

2015-10-27 Thread Steve Ellcey
I have a question about the _Fract types and their conversion routines. If I compile this program: extern void abort (void); int main () { signed char a = -1; _Sat unsigned _Fract b = a; if (b != 0.0ur) abort(); return 0; } with -O0 and on a MIPS32 system where char is 1 byte and uns