This is the mail archive of the
mailing list for the GCC project.
_Fract types and conversion routines
- From: "Steve Ellcey " <sellcey at imgtec dot com>
- To: <gcc at gcc dot gnu dot org>
- Date: Tue, 27 Oct 2015 16:23:50 -0700
- Subject: _Fract types and conversion routines
- Authentication-results: sourceware.org; auth=none
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)
with -O0 and on a MIPS32 system where char is 1 byte and unsigned (int)
is 4 bytes I see a call to '__satfractqiuhq' for the conversion.
Now I think the 'qi' part of the name is for the 'from type' of the
conversion, a 1 byte signed type (signed char), and the 'uhq' part is
for the 'to' part of the conversion. But 'uhq' would be a 2 byte
unsigned fract, and the unsigned fract type on MIPS should be 4 bytes
(unsigned int is 4 bytes). So shouldn't GCC have generated a call to
__satfractqiusq instead? Or am I confused?