This is the mail archive of the
mailing list for the GCC project.
Re: Bug 85667 - (x86_64) ms_abi rules aren't followed when returning short structs with float values
- From: lokesh janghel <lokeshjanghel91 at gmail dot com>
- To: gcc at gcc dot gnu dot org
- Date: Wed, 19 Sep 2018 14:22:17 +0530
- Subject: Re: Bug 85667 - (x86_64) ms_abi rules aren't followed when returning short structs with float values
I am starting to looking into this issue.
I am able to reproduce the issue with GCC-8.1.0 and CLANG-8.0.0 version too
*$ ./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*
*$ clang -S test.c -O2*
*movl $1078544302, %eax *
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