summaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorghazi <ghazi@138bc75d-0d04-0410-961f-82ee72b054a4>1998-03-12 12:32:24 +0000
committerghazi <ghazi@138bc75d-0d04-0410-961f-82ee72b054a4>1998-03-12 12:32:24 +0000
commitf729da53c1c65293fd51e89ecb5188128478164a (patch)
tree438650a4cc809d9297f14c90877716871289189e /gcc
parent75946e170c2718643b84595358b7912849532aeb (diff)
downloadgcc-f729da53c1c65293fd51e89ecb5188128478164a.tar.gz
Warning fixes, resulting in the addition of a new target macro:
* tm.texi (DEFAULT_RTX_COSTS): Document new macro. * arm.h (DEFAULT_RTX_COSTS): Define instead of RTX_COSTS. * cse.c (rtx_cost): Provide a default case in an enumeration switch, and call DEFAULT_RTX_COSTS if it's defined. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@18513 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog11
-rw-r--r--gcc/config/arm/arm.h5
-rw-r--r--gcc/cse.c6
-rw-r--r--gcc/tm.texi15
4 files changed, 34 insertions, 3 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 853a15c66a7..9b08cfcc626 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,14 @@
+Thu Mar 12 15:13:16 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
+ Richard Earnshaw <rearnsha@arm.com>
+ Nick Clifton <nickc@cygnus.com>
+
+ * tm.texi (DEFAULT_RTX_COSTS): Document new macro.
+
+ * arm.h (DEFAULT_RTX_COSTS): Define instead of RTX_COSTS.
+
+ * cse.c (rtx_cost): Provide a default case in an enumeration
+ switch, and call DEFAULT_RTX_COSTS if it's defined.
+
Thu Mar 12 10:02:38 1998 Manfred Hollstein <manfred@s-direktnet.de>
* basic-block.h (compute_preds_succs): Change return type in
diff --git a/gcc/config/arm/arm.h b/gcc/config/arm/arm.h
index 59d3ac3c75d..7c28c646ce1 100644
--- a/gcc/config/arm/arm.h
+++ b/gcc/config/arm/arm.h
@@ -1,5 +1,5 @@
/* Definitions of target machine for GNU compiler, for Acorn RISC Machine.
- Copyright (C) 1991, 93, 94, 95, 96, 1997 Free Software Foundation, Inc.
+ Copyright (C) 1991, 93, 94, 95, 96, 97, 1998 Free Software Foundation, Inc.
Contributed by Pieter `Tiggr' Schoenmakers (rcpieter@win.tue.nl)
and Martin Simmons (@harleqn.co.uk).
More major hacks by Richard Earnshaw (rwe11@cl.cam.ac.uk)
@@ -1620,8 +1620,7 @@ extern struct rtx_def *legitimize_pic_address ();
((X) == frame_pointer_rtx || (X) == stack_pointer_rtx \
|| (X) == arg_pointer_rtx)
-#define RTX_COSTS(X,CODE,OUTER_CODE) \
- default: \
+#define DEFAULT_RTX_COSTS(X,CODE,OUTER_CODE) \
return arm_rtx_costs (X, CODE, OUTER_CODE);
/* Moves to and from memory are quite expensive */
diff --git a/gcc/cse.c b/gcc/cse.c
index cf532404a70..b525dccdfec 100644
--- a/gcc/cse.c
+++ b/gcc/cse.c
@@ -751,6 +751,12 @@ rtx_cost (x, outer_code)
RTX_COSTS (x, code, outer_code);
#endif
CONST_COSTS (x, code, outer_code);
+
+ default:
+#ifdef DEFAULT_RTX_COSTS
+ DEFAULT_RTX_COSTS(x, code, outer_code);
+#endif
+ break;
}
/* Sum the costs of the sub-rtx's, plus cost of this operation,
diff --git a/gcc/tm.texi b/gcc/tm.texi
index e0e31fda772..00311bf792b 100644
--- a/gcc/tm.texi
+++ b/gcc/tm.texi
@@ -4436,6 +4436,21 @@ instructions. @var{outer_code} is the code of the expression in which
This macro is optional; do not define it if the default cost assumptions
are adequate for the target machine.
+@findex DEFAULT_RTX_COSTS
+@item DEFAULT_RTX_COSTS (@var{x}, @var{code}, @var{outer_code})
+This macro, if defined, is called for any case not handled by the
+@code{RTX_COSTS} or @code{CONST_COSTS} macros. This eliminates the need
+to put case labels into the macro, but the code, or any functions it
+calls, must assume that the RTL in @var{x} could be of any type that has
+not already been handled. The arguments are the same as for
+@code{RTX_COSTS}, and the macro should execute a return statement giving
+the cost of any RTL expressions that it can handle. The default cost
+calculation is used for any RTL for which this macro does not return a
+value.
+
+This macro is optional; do not define it if the default cost assumptions
+are adequate for the target machine.
+
@findex ADDRESS_COST
@item ADDRESS_COST (@var{address})
An expression giving the cost of an addressing mode that contains