This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
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)
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;