This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: RFA: xscale-elf -mstrict-prototypes
- From: James Lemke <jim at wasabisystems dot com>
- To: Richard Earnshaw <rearnsha at arm dot com>
- Cc: Mark Mitchell <mark at codesourcery dot com>, gcc-patches at gcc dot gnu dot org
- Date: Wed, 10 Mar 2004 14:05:33 -0500
- Subject: Re: RFA: xscale-elf -mstrict-prototypes
- References: <200403031455.i23EteE20235@pc960.cambridge.arm.com>
> Provided this doesn't also inhibit the caller-side promotion, yes.
No it does not inhibit call-site promotion.
Updated patch is attached. No regressions.
OK to commit to mainline?
Jim.
--
James Lemke jim@wasabisystems.com Orillia, Ontario
http://www.wasabisystems.com
Index: ChangeLog
===================================================================
RCS file: /cvs/gcc/gcc/gcc/ChangeLog,v
retrieving revision 2.3096
diff -u -p -r2.3096 ChangeLog
--- ChangeLog 8 Mar 2004 15:41:25 -0000 2.3096
+++ ChangeLog 10 Mar 2004 18:47:16 -0000
@@ -1,3 +1,7 @@
+2004-03-09 James Lemke <jim@wasabisystems.com>
+
+ * config/arm/arm.c (TARGET_PROMOTE_PROTOTYPES): Set to false.
+
2004-03-08 Kazu Hirata <kazu@cs.umass.edu>
* config/pdp11/pdp11.c (comparison_operator_index): Remove.
Index: config/arm/arm.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/arm/arm.c,v
retrieving revision 1.336
diff -u -p -r1.336 arm.c
--- config/arm/arm.c 3 Mar 2004 08:34:43 -0000 1.336
+++ config/arm/arm.c 10 Mar 2004 18:47:40 -0000
@@ -242,7 +242,7 @@ static void arm_setup_incoming_varargs (
#undef TARGET_PROMOTE_FUNCTION_ARGS
#define TARGET_PROMOTE_FUNCTION_ARGS hook_bool_tree_true
#undef TARGET_PROMOTE_PROTOTYPES
-#define TARGET_PROMOTE_PROTOTYPES hook_bool_tree_true
+#define TARGET_PROMOTE_PROTOTYPES hook_bool_tree_false
#undef TARGET_STRUCT_VALUE_RTX
#define TARGET_STRUCT_VALUE_RTX arm_struct_value_rtx
Index: testsuite/ChangeLog
===================================================================
RCS file: /cvs/gcc/gcc/gcc/testsuite/ChangeLog,v
retrieving revision 1.3581
diff -u -p -r1.3581 ChangeLog
--- testsuite/ChangeLog 8 Mar 2004 06:48:50 -0000 1.3581
+++ testsuite/ChangeLog 10 Mar 2004 18:48:09 -0000
@@ -1,3 +1,7 @@
+2004-03-09 James Lemke <jim@wasabisystems.com>
+
+ * gcc.dg/arm-g4-[12].c: New tests.
+
2004-03-08 Eric Botcazou <ebotcazou@act-europe.fr>
* gcc.c-torture/execute/20040308-1.c: New test.
Index: testsuite/gcc.dg/arm-g4-1.c
===================================================================
RCS file: testsuite/gcc.dg/arm-g4-1.c
diff -N testsuite/gcc.dg/arm-g4-1.c
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ testsuite/gcc.dg/arm-g4-1.c 10 Mar 2004 18:48:35 -0000
@@ -0,0 +1,12 @@
+/* Verify that input arguments are not extended before use on XScale. */
+/* { dg-do compile { target xscale*-*-* } } */
+/* { dg-options "-mcpu=xscale -O2" } */
+
+short int addhi3 (short int a, short int b) __attribute__ ((naked));
+short int addhi3 (short int a, short int b)
+{
+ return a + b + (short int)32;
+}
+
+/* We want to suppress running for -mthumb but not for -mthumb-interwork. */
+/* { dg-final { global compiler_flags; if ![string match "*-mthumb *" $compiler_flags] { scan-assembler-not "add\[ \t]r., *r\[01], *r\[01], *asr \#16" } } } */
Index: testsuite/gcc.dg/arm-g4-2.c
===================================================================
RCS file: testsuite/gcc.dg/arm-g4-2.c
diff -N testsuite/gcc.dg/arm-g4-2.c
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ testsuite/gcc.dg/arm-g4-2.c 10 Mar 2004 18:48:35 -0000
@@ -0,0 +1,12 @@
+/* Verify that input arguments are not extended before use on XScale. */
+/* { dg-do compile { target xscale*-*-* } } */
+/* { dg-options "-mcpu=xscale -O2" } */
+
+char addqi3 (char a, char b) __attribute__ ((naked));
+char addqi3 (char a, char b)
+{
+ return a + b + (char)32;
+}
+
+/* We want to suppress running for -mthumb but not for -mthumb-interwork. */
+/* { dg-final { global compiler_flags; if ![string match "*-mthumb *" $compiler_flags] { scan-assembler-not "and\[ \t]r1, *r1, *\#255" } } } */