+2009-12-30 Uros Bizjak <ubizjak@gmail.com>
+
+ PR target/42549
+ * config/i386/mmx.md (*mmx_subv2sf3): Fix insn operand number for
+ alternative 1.
+
2009-12-07 Uros Bizjak <ubizjak@gmail.com>
* config/i386/i386.md (*iorqi_ext_2): Fix insn mnemonic typo.
"TARGET_3DNOW && !(MEM_P (operands[0]) && MEM_P (operands[1]))"
"@
pfsub\\t{%2, %0|%0, %2}
- pfsubr\\t{%2, %0|%0, %2}"
+ pfsubr\\t{%1, %0|%0, %1}"
[(set_attr "type" "mmxadd")
(set_attr "mode" "V2SF")])
+2009-12-30 Uros Bizjak <ubizjak@gmail.com>
+
+ PR target/42549
+ * gcc.target/i386/mmx-3dnow-check.h: New file.
+ * gcc.target/i386/pr42549.c: New test.
+
2009-12-23 Thomas Koenig <tkoenig@gcc.gnu.org>
PR libfortran/PR42422
--- /dev/null
+#include <stdio.h>
+#include <stdlib.h>
+
+#include "cpuid.h"
+
+static void mmx_3dnow_test (void);
+
+int
+main ()
+{
+ unsigned int eax, ebx, ecx, edx;
+
+ if (!__get_cpuid (0x80000001, &eax, &ebx, &ecx, &edx))
+ return 0;
+
+ /* Run 3DNow! test only if host has 3DNow! support. */
+ if (edx & bit_3DNOW)
+ mmx_3dnow_test ();
+
+ return 0;
+}
--- /dev/null
+/* { dg-do run } */
+/* { dg-options "-O2 -m3dnow" } */
+
+#include "mmx-3dnow-check.h"
+
+#include <mm3dnow.h>
+
+typedef union {
+ float f[2];
+ __m64 v;
+} vec_t;
+
+void __attribute__ ((noinline))
+Butterfly_3 (__m64 * D, __m64 SC)
+{
+ __m64 T, T1;
+
+ T = _m_pfmul (D[1], SC);
+ T1 = D[0];
+ D[0] = _m_pfadd (T1, T);
+ D[1] = _m_pfsub (T1, T);
+}
+
+void
+mmx_3dnow_test (void)
+{
+ vec_t D[2] = { { .f = { 2.0f, 3.0f } },
+ { .f = { 4.0f, 5.0f } } };
+
+ const vec_t SC = { .f = { 1.0f, 1.0f } };
+
+ Butterfly_3 (&D[0].v, SC.v);
+ _m_femms ();
+
+ if (D[1].f[0] != -2.0f || D[1].f[1] != -2.0f)
+ abort ();
+}