+2015-11-09 Eric Botcazou <ebotcazou@adacore.com>
+
+ PR target/57845
+ * config/sparc/sparc.c (sparc_function_value_1): In 32-bit mode, do
+ not promote the mode for aggregate types.
+
2015-11-09 Nathan Sidwell <nathan@codesourcery.com>
* omp-low.h (replace_oacc_fn_attrib, build_oacc_routine_dims): Declare.
* omp-low.c (build_oacc_routine_dims): New.
-2015-11-08 Michael Meissner <meissner@linux.vnet.ibm.com>
+2015-11-09 Michael Meissner <meissner@linux.vnet.ibm.com>
* config/rs6000/constraints.md (wF constraint): New constraints
for power9/toc fusion.
mode = word_mode;
}
- /* We should only have pointer and integer types at this point. This must
- match sparc_promote_function_mode. */
+ /* We should only have pointer and integer types at this point, except with
+ -freg-struct-return. This must match sparc_promote_function_mode. */
else if (TARGET_ARCH32
+ && !(type && AGGREGATE_TYPE_P (type))
&& mclass == MODE_INT
&& GET_MODE_SIZE (mode) < UNITS_PER_WORD)
mode = word_mode;
-2015-11-08 Michael Meissner <meissner@linux.vnet.ibm.com>
+2015-11-09 Eric Botcazou <ebotcazou@adacore.com>
+
+ * gcc.target/sparc/sparc-ret.c: Rename to...
+ * gcc.target/sparc/sparc-ret-1.c: ...this.
+ * gcc.target/sparc/sparc-ret-2.c: New test.
+
+2015-11-09 Michael Meissner <meissner@linux.vnet.ibm.com>
* lib/target-supports.exp (check_p8vector_hw_available): Split
long line.
--- /dev/null
+/* { dg-do compile } */
+/* { dg-skip-if "no register windows" { *-*-* } { "-mflat" } { "" } } */
+/* { dg-require-effective-target ilp32 } */
+/* { dg-options "-mcpu=ultrasparc -O" } */
+
+/* Make sure that Ultrasparc return insn do not read below the stack. */
+
+void toto (int *);
+
+int bar (int a, int b, int c, int d, int e, int f, int g, int h)
+{
+ int res;
+
+ toto (&res);
+ return h;
+}
+/* { dg-final { scan-assembler "return\[ \t\]*%i7\\+8\n\[^\n\]*ld\[ \t\]*\\\[%sp\\+96\\\]" } } */
+
+int bar2 ()
+{
+ int res;
+
+ toto (&res);
+ return res;
+}
+/* { dg-final { scan-assembler "return\[ \t\]*%i7\\+8\n\[^\n\]*nop" } } */
--- /dev/null
+/* PR target/57845 */
+
+/* { dg-do compile } */
+/* { dg-options "-freg-struct-return" } */
+
+struct S { short int i; };
+
+struct S foo (short int i)
+{
+ struct S s;
+ s.i = i;
+ return s;
+}
+++ /dev/null
-/* { dg-do compile } */
-/* { dg-skip-if "no register windows" { *-*-* } { "-mflat" } { "" } } */
-/* { dg-require-effective-target ilp32 } */
-/* { dg-options "-mcpu=ultrasparc -O" } */
-
-/* Make sure that Ultrasparc return insn do not read below the stack. */
-
-void toto (int *);
-
-int bar (int a, int b, int c, int d, int e, int f, int g, int h)
-{
- int res;
-
- toto (&res);
- return h;
-}
-/* { dg-final { scan-assembler "return\[ \t\]*%i7\\+8\n\[^\n\]*ld\[ \t\]*\\\[%sp\\+96\\\]" } } */
-
-int bar2 ()
-{
- int res;
-
- toto (&res);
- return res;
-}
-/* { dg-final { scan-assembler "return\[ \t\]*%i7\\+8\n\[^\n\]*nop" } } */