From: Jakub Jelinek <jakub@redhat.com>
To: Uros Bizjak <ubizjak@gmail.com>,
Lokesh Janghel <lokeshjanghel91@gmail.com>
Cc: mateuszb@poczta.onet.pl, gcc-patches@gcc.gnu.org
Subject: Re: [Patch] Bug 88521 - gcc 9.0 from r266355 miscompile x265 for mingw-w64 target
Date: Thu, 20 Dec 2018 12:16:00 -0000 [thread overview]
Message-ID: <20181220120944.GO23305@tucnak> (raw)
In-Reply-To: <CACcU4_o8SaP=NyDG4oVcS+-MJPx_MPmJfypNNdqJpdo_2+gTGg@mail.gmail.com>
On Thu, Dec 20, 2018 at 01:42:15PM +0530, Lokesh Janghel wrote:
> Hi Mateuszb,
>
> I tested with your proposition patch and it is working right.
> I also added the patch with test case.
> Please let me know your thoughts/suggestions.
ChangeLog entry is missing, please write it (and mention there
Mateusz's name/mail as he wrote the i386.c part).
diff --git a/gcc/config/i386/i386.c b/gcc/config/i386/i386.c
index b3c8676..e54c489 100644
--- a/gcc/config/i386/i386.c
+++ b/gcc/config/i386/i386.c
@@ -9063,6 +9063,13 @@ function_value_ms_64 (machine_mode orig_mode, machine_mode mode,
&& !COMPLEX_MODE_P (mode))
regno = FIRST_SSE_REG;
break;
+ case 8:
+ case 4:
+ if (valtype != NULL_TREE && AGGREGATE_TYPE_P (valtype))
+ break;
+ if (mode == SFmode || mode == DFmode)
+ regno = FIRST_SSE_REG;
+ break;
default:
break;
}
diff --git a/gcc/testsuite/gcc.target/i386/pr88521.c b/gcc/testsuite/gcc.target/i386/pr88521.c
new file mode 100644
index 0000000..f42703a
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/pr88521.c
@@ -0,0 +1,30 @@
+/* { dg-do compile { target lp64 } } */
+/* { dg-options "-O2" } */
+/* { dg-final { scan-assembler-times "movl\[^\n\r]*, %eax|mov\[ \t]*eax," 1 } } */
You try here to handle both -masm=att and -masm=intel
+/* { dg-final { scan-assembler-times "movss\[^\n\r]*, %xmm" 1 } } */
+/* { dg-final { scan-assembler-times "movsd\[^\n\r]*, %xmm" 1 } } */
but not here. For that it would need to be "movss\[^\n\r]*(?:, %xmm|xmm, )"
and similarly for movsd (please verify with
make check-gcc RUNTESTFLAGS='--target_board=unix\{-m32/-masm=att,-m32/-masm=intel,-m64/-masm=att,-m64/-masm=intel\} i386.exp=pr88521.c'
I'll defer the final review to Uros.
Jakub
next prev parent reply other threads:[~2018-12-20 12:09 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-12-20 8:12 Lokesh Janghel
2018-12-20 8:31 ` Mateusz
2018-12-20 12:16 ` Jakub Jelinek [this message]
2018-12-21 9:14 ` Uros Bizjak
2018-12-21 9:15 ` Jakub Jelinek
2018-12-21 10:05 ` JonY
2018-12-26 16:19 ` Lokesh Janghel
2018-12-29 2:34 ` JonY
2019-01-07 7:31 ` Martin Liška
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=20181220120944.GO23305@tucnak \
--to=jakub@redhat.com \
--cc=gcc-patches@gcc.gnu.org \
--cc=lokeshjanghel91@gmail.com \
--cc=mateuszb@poczta.onet.pl \
--cc=ubizjak@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).