+2018-11-21 Lokesh Janghel <lokeshjanghel91@gmail.com>
+
+ PR target/85667
+ * config/i386/i386.c (function_value_ms_64): Return AX_REG instead
+ of FIRST_SSE_REG for 4 or 8 byte modes.
+
2018-11-21 Jan Hubicka <jh@suse.cz>
PR lto/87957
&& !COMPLEX_MODE_P (mode))
regno = FIRST_SSE_REG;
break;
- case 8:
- case 4:
- if (mode == SFmode || mode == DFmode)
- regno = FIRST_SSE_REG;
- break;
default:
break;
}
+018-11-21 Lokesh Janghel <lokeshjanghel91@gmail.com>
+
+ PR target/85667
+ * gcc.target/pr85667-1.c: New testcase.
+ * gcc.target/pr85667-2.c: New testcase.
+ * gcc.target/pr85667-3.c: New testcase.
+ * gcc.target/pr85667-4.c: New testcase.
+
2018-11-21 Jan Hubicka <hubicka@ucw.cz>
PR lto/87957
--- /dev/null
+/* { dg-do run { target lp64 } } */
+/* { dg-options "-O2" } */
+
+void abort (void);
+
+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;
+}
+
+int main ()
+{
+ Float a, b;
+ a = fn1 ();
+ b = fn2 ();
+ if (a.x == 3.145f && b.x == 3.145f)
+ return 0;
+ abort ();
+}
--- /dev/null
+/* { dg-do compile { target lp64 } } */
+/* { dg-options "-O2" } */
+/* { dg-final { scan-assembler-times "movl\[^\n\r]*, %eax|mov\[ \t]*eax," 1 } } */
+
+typedef struct
+{
+ float x;
+} Float;
+
+Float __attribute__((ms_abi)) fn1 ()
+{
+ Float v;
+ v.x = 3.145;
+ return v;
+}
--- /dev/null
+/* { dg-do run { target lp64 } } */
+/* { dg-options "-O2" } */
+
+void abort (void);
+
+typedef struct
+{
+ double x;
+} Double;
+
+Double __attribute__((ms_abi)) fn1 ()
+{
+ Double v;
+ v.x = 3.145;
+ return v;
+}
+
+Double fn2 ()
+{
+ Double v;
+ v.x = 3.145;
+ return v;
+}
+
+int main ()
+{
+ Double a, b;
+ a = fn1 ();
+ b = fn2 ();
+ if (a.x == 3.145 && b.x == 3.145)
+ return 0;
+ abort ();
+}
--- /dev/null
+/* { dg-do compile { target lp64 } } */
+/* { dg-options "-O2" } */
+/* { dg-final { scan-assembler-times "movq\[^\n\r]*, %rax|mov\[ \t]*rax," 1 } } */
+
+typedef struct
+{
+ double x;
+} Double;
+
+Double __attribute__((ms_abi)) fn1 ()
+{
+ Double v;
+ v.x = 3.145;
+ return v;
+}