From: Umesh Kalappa <umesh.kalappa0@gmail.com>
To: gcc-patches@gcc.gnu.org
Cc: lokeshjanghel91@gmail.com
Subject: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87626
Date: Thu, 15 Nov 2018 09:02:00 -0000 [thread overview]
Message-ID: <CAGfacvS9mWgk+M-2TbHxJvNpQMgNzxudTw2eqO-Od7FMKNbctA@mail.gmail.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 173 bytes --]
Hi All,
The attached patch (pr85667.patch) fixes the subjected issue .
we tested on x86_64(linux and windows both) and no regress found .
ok to commit ?
Thank you
~Umesh
[-- Attachment #2: pr85667.patch --]
[-- Type: application/octet-stream, Size: 1725 bytes --]
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 1a70b8f..f385e24 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,10 @@
+2018-11-15 Lokesh Janghel <lokeshjanghel91@gmail.com>
+
+ PR target/85667
+ * i386.c (function_value_ms_64): ms_abi insist don't use the sse
+ (xmm0) register when returning structs whose size is less than
+ or equal to the 8 byte.
+
2018-11-14 Richard Biener <rguenther@suse.de>
PR middle-end/87985
diff --git a/gcc/config/i386/i386.c b/gcc/config/i386/i386.c
index 76a92b1..70dfc98 100644
--- a/gcc/config/i386/i386.c
+++ b/gcc/config/i386/i386.c
@@ -9008,7 +9008,7 @@ function_value_ms_64 (machine_mode orig_mode, machine_mode mode,
case 8:
case 4:
if (mode == SFmode || mode == DFmode)
- regno = FIRST_SSE_REG;
+ regno = AX_REG;
break;
default:
break;
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog
index 50e53f0..5b76261 100644
--- a/gcc/testsuite/ChangeLog
+++ b/gcc/testsuite/ChangeLog
@@ -1,3 +1,8 @@
+2018-11-15 Lokesh Janghel <lokeshjanghel91@gmail.com>
+
+ PR target/85667
+ * gcc.target/pr85667.c: New testcase.
+
2018-11-14 Richard Biener <rguenther@suse.de>
PR middle-end/87985
diff --git a/gcc/testsuite/gcc.target/i386/pr85667.c b/gcc/testsuite/gcc.target/i386/pr85667.c
new file mode 100644
index 0000000..657a0f0
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/pr85667.c
@@ -0,0 +1,20 @@
+/* { dg-options "-O2 " } */
+/* { dg-final { scan-assembler-times "movl\[\t \]\.\[a-zA-Z\]\[a-zA-Z\]\[0-9\]\\(%rip\\), %eax" 1} } */
+typedef struct
+{
+ float x;
+} Float;
+
+Float __attribute__((ms_abi)) fn1()
+{
+ Float v;
+ v.x = 3.145;
+ return v;
+}
+
+Float fn2 ()
+{
+ Float v;
+ v.x = 3.145;
+ return v;
+}
next reply other threads:[~2018-11-15 9:02 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-11-15 9:02 Umesh Kalappa [this message]
2018-11-15 10:24 ` https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85667 Umesh Kalappa
2018-11-15 10:32 ` https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87626 Richard Biener
2018-11-16 8:07 ` https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87626 Umesh Kalappa
2018-11-16 9:08 ` https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87626 Richard Biener
2018-11-16 10:51 ` https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87626 Umesh Kalappa
2018-11-16 11:27 ` https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87626 Jakub Jelinek
[not found] ` <CACcU4_r4GESOudiV+4FYq9Drg3kJuCdyVVpvnTTqV=Y-=xoDjQ@mail.gmail.com>
2018-11-19 10:38 ` https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87626 Lokesh Janghel
2018-11-20 9:33 ` https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87626 Jakub Jelinek
2018-11-21 12:36 ` https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87626 Umesh Kalappa
2018-11-21 13:07 ` https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87626 Jakub Jelinek
2018-11-21 13:25 ` https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87626 Umesh Kalappa
2018-11-26 21:46 ` https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87626 Jeff Law
2019-01-06 17:25 ` https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87626 Martin Liška
2019-01-06 17:29 ` https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87626 Jakub Jelinek
2018-11-20 6:59 ` https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87626 Umesh Kalappa
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=CAGfacvS9mWgk+M-2TbHxJvNpQMgNzxudTw2eqO-Od7FMKNbctA@mail.gmail.com \
--to=umesh.kalappa0@gmail.com \
--cc=gcc-patches@gcc.gnu.org \
--cc=lokeshjanghel91@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).