This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Bug 85667 - (x86_64) ms_abi rules aren't followed when returning short structs with float values


Hi,

I am starting to looking into this issue.
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85667#c0

I am able to reproduce the issue with GCC-8.1.0 and CLANG-8.0.0 version too
like
GCC :
*$ ./cc1.exe test/test.c -O2*
*Float  __attribute__((ms_abi)) fn1()*
*{*
*  Float v;*
*  v.x = 3.145;*
*  return v;*
*}*
and generates the code
*movss .LC0(%rip), %xmm0*
*ret*

and Clang
*$ clang -S test.c -O2*

*movl $1078544302, %eax *
*retq*

We did some analysis about that issue and found that the problem occurs may
be in the code generation phase in GCC.
ABI says that struct type uses the integer register  (like clang )or memory
to return not the  SSE registers.

Before we go ahead and fix this issue and we would like to know the
community views/comments on the same.
-- 
Thanks & Regards
Lokesh Janghel


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]