Commit 4075fc70 by Mateusz B Committed by Martin Liska

re PR target/88521 (GCC from r266355 miscompiles x265 for mingw-w64 target)

PR target/88521
	* config/i386/i386.c (function_value_ms_64): Return small sturct in
	AX_REG and float/double in FIRST_SSE_REG for 4 or 8 byte modes.

From-SVN: r267622
parent 0aa6ee36
2018-12-26 Mateusz B <mateuszb@poczta.onet.pl>
PR target/88521
* config/i386/i386.c (function_value_ms_64): Return small sturct in
AX_REG and float/double in FIRST_SSE_REG for 4 or 8 byte modes.
2019-01-05 Jan Hubicka <hubicka@ucw.cz> 2019-01-05 Jan Hubicka <hubicka@ucw.cz>
PR tree-opt/86020 PR tree-opt/86020
......
...@@ -9063,6 +9063,13 @@ function_value_ms_64 (machine_mode orig_mode, machine_mode mode, ...@@ -9063,6 +9063,13 @@ function_value_ms_64 (machine_mode orig_mode, machine_mode mode,
&& !COMPLEX_MODE_P (mode)) && !COMPLEX_MODE_P (mode))
regno = FIRST_SSE_REG; regno = FIRST_SSE_REG;
break; 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: default:
break; break;
} }
2018-12-26 Mateusz B <mateuszb@poczta.onet.pl>
PR target/88521
* gcc.target/i386/pr88521.c: New testcase.
2019-01-06 Thomas Koenig <tkoenig@gcc.gnu.org> 2019-01-06 Thomas Koenig <tkoenig@gcc.gnu.org>
PR fortran/88658 PR fortran/88658
......
/* { dg-do compile { target lp64 } } */
/* { dg-options "-O2" } */
/* { dg-final { scan-assembler-times "movl\[^\n\r]*, %eax|mov\[ \t]*eax," 1 } } */
/* { dg-final { scan-assembler-times "movss\[^\n\r]*, %xmm" 1 } } */
/* { dg-final { scan-assembler-times "movsd\[^\n\r]*, %xmm" 1 } } */
typedef struct
{
float x;
} Float;
Float __attribute__((ms_abi)) fn1()
{
Float v;
v.x = 3.145F;
return v;
}
float __attribute__((ms_abi)) fn2 ()
{
float v;
v = 3.145F;
return v;
}
double __attribute__((ms_abi)) fn3 ()
{
double v;
v = 3.145;
return v;
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment