This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: PATCH: Compile x86 rtld with -mno-sse -mno-mmx
On Fri, Nov 2, 2012 at 4:12 PM, Roland McGrath <roland@hack.frob.com> wrote:
>> > Is that just caution or is there a real usage of atof?
>>
>> Since it is an inline fuction, GCC issues an error when -mno-sse is
>> used.
>
> Can you elaborate? The inline just calls strtod. What does it have to do
> with SSE? Are you saying that defining (but not calling) an inline
> function that returns double automatically gets you an error on x86-64
> under -mno-sse just because if it were defined as a normal function and not
> inlined the ABI would use SSE registers for its return value? That makes
> very little sense to me.
[hjl@gnu-tools-1 tmp]$ cat x.i
extern double strtod (const char *__restrict __nptr,
char **__restrict __endptr)
__attribute__ ((__nothrow__ )) ;
extern double atof (const char *__nptr)
__attribute__ ((__nothrow__ )) __attribute__ ((__pure__)) ;
extern __inline double
__attribute__ ((__nothrow__ )) atof (const char *__nptr)
{
return strtod (__nptr, (char **) ((void *)0));
}
[hjl@gnu-tools-1 tmp]$ gcc -S -O3 x.i -mno-sse -Wall -fPIC
x.i: In function ‘atof’:
x.i:10:1: error: SSE register return with SSE disabled
[hjl@gnu-tools-1 tmp]$
--
H.J.