public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Uros Bizjak <ubizjak@gmail.com>
To: Jakub Jelinek <jakub@redhat.com>
Cc: "gcc-patches@gcc.gnu.org" <gcc-patches@gcc.gnu.org>
Subject: Re: [PATCH] Don't error about x86 return value in SSE reg (or x86 reg) or argument in SSE reg too early (PR target/80298)
Date: Thu, 06 Apr 2017 18:37:00 -0000	[thread overview]
Message-ID: <CAFULd4bKou247c4Tg20cttYjeLP+om5-5TZ=p_Qd0xUqBOAAGg@mail.gmail.com> (raw)
In-Reply-To: <CAFULd4ayz36aRg1kxgiLhXTYj95+COJS_xXNqHyByhaYs6_sbg@mail.gmail.com>

On Wed, Apr 5, 2017 at 5:37 PM, Uros Bizjak <ubizjak@gmail.com> wrote:

> 2017-04-05  Uros Bizjak  <ubizjak@gmail.com>
>
>     PR target/80298
>     * config/i386/mmintrin.h: Add -msse target option when __SSE__ is
>     not defined for x86_64 target.  Add -mmmx target option when __SSE2__
>     is not defined.
>     * config/i386/mm3dnow.h: Add -msse target when __SSE__ is not defined
>     for x86_64 target.  Handle -m3dnowa option.
>
> I choose not to include testcases, since mm_malloc includes stdlib.h,
> which uses SSE register return with -O2, resulting in:

Including only <mm3dnow.h> and its dependant mmintrin.h tests the
issue as well while avoiding external include files.

2017-04-06  Uros Bizjak  <ubizjak@gmail.com>

    PR target/80298
    * gcc.target/i386/pr80298-1.c: New test.
    * gcc.target/i386/pr80298-2.c: Ditto.

Tested on x86_64-linux-gnu {,-m32} and committed to mainline SVN.

Uros.

Index: gcc.target/i386/pr80298-1.c
===================================================================
--- gcc.target/i386/pr80298-1.c (nonexistent)
+++ gcc.target/i386/pr80298-1.c (working copy)
@@ -0,0 +1,7 @@
+/* PR target/80298 */
+/* { dg-do compile } */
+/* { dg-options "-mno-sse -mmmx" } */
+
+#include <mm3dnow.h>
+
+int i;
Index: gcc.target/i386/pr80298-2.c
===================================================================
--- gcc.target/i386/pr80298-2.c (nonexistent)
+++ gcc.target/i386/pr80298-2.c (working copy)
@@ -0,0 +1,7 @@
+/* PR target/80298 */
+/* { dg-do compile } */
+/* { dg-options "-O2 -mno-sse -mmmx" } */
+
+#include <mm3dnow.h>
+
+int i;

      reply	other threads:[~2017-04-06 18:37 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-04-04 19:24 Jakub Jelinek
2017-04-05  7:42 ` Uros Bizjak
2017-04-05  8:00   ` Jakub Jelinek
2017-04-05  8:12     ` Uros Bizjak
2017-04-05  8:20       ` Jakub Jelinek
2017-04-05  8:26         ` Uros Bizjak
2017-04-05  8:29           ` Jakub Jelinek
2017-04-05 15:37             ` Uros Bizjak
2017-04-06 18:37               ` Uros Bizjak [this message]

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='CAFULd4bKou247c4Tg20cttYjeLP+om5-5TZ=p_Qd0xUqBOAAGg@mail.gmail.com' \
    --to=ubizjak@gmail.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=jakub@redhat.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).