This is the mail archive of the
gcc@gcc.gnu.org
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
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