@@ -7552,7 +7552,7 @@ function_arg_advance_32 (CUMULATIVE_ARGS *cum, machine_mode mode,
{
/* Intel MCU psABI passes scalars and aggregates no larger than 8
bytes in registers. */
- if (bytes <= 8)
+ if (!VECTOR_MODE_P (mode) && bytes <= 8)
goto pass_in_reg;
return res;
}
@@ -7809,7 +7809,7 @@ function_arg_32 (CUMULATIVE_ARGS *cum, machine_mode mode,
{
/* Intel MCU psABI passes scalars and aggregates no larger than 8
bytes in registers. */
- if (bytes <= 8)
+ if (!VECTOR_MODE_P (mode) && bytes <= 8)
goto pass_in_reg;
return NULL_RTX;
}
@@ -8679,7 +8679,7 @@ ix86_return_in_memory (const_tree type, const_tree fntype ATTRIBUTE_UNUSED)
/* Intel MCU psABI returns scalars and aggregates no larger than 8
bytes in registers. */
if (TARGET_IAMCU)
- return size > 8;
+ return VECTOR_MODE_P (mode) || size > 8;
if (mode == BLKmode)
return true;
new file mode 100644
@@ -0,0 +1,23 @@
+/* { dg-do compile { target ia32 } } */
+/* { dg-options "-miamcu -mno-sse -mno-mmx -miamcu -Wno-psabi" } */
+
+typedef unsigned int V2SImode __attribute__((vector_size(8)));
+extern V2SImode data_V2SImode;
+
+V2SImode
+r_V2SImode (V2SImode x)
+{
+ return x;
+}
+
+void
+p_V2SImode (V2SImode x)
+{
+ data_V2SImode = x;
+}
+
+void
+s_V2SImode (void)
+{
+ p_V2SImode (data_V2SImode);
+}