aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNick Clifton <nickc@cygnus.com>1999-11-08 15:42:45 +0000
committerNick Clifton <nickc@gcc.gnu.org>1999-11-08 15:42:45 +0000
commit82a9bba5f8a8594943474d8a2c66b65385fa2f0b (patch)
treeaac12f390581b1c5c53b2534189e03747acbb392
parent674fdc14b3a2a3a490a20ad6d2856c5fb0b3da1b (diff)
downloadgcc-82a9bba5f8a8594943474d8a2c66b65385fa2f0b.zip
gcc-82a9bba5f8a8594943474d8a2c66b65385fa2f0b.tar.gz
gcc-82a9bba5f8a8594943474d8a2c66b65385fa2f0b.tar.bz2
*** empty log message ***
From-SVN: r30451
-rw-r--r--gcc/ChangeLog6
-rw-r--r--gcc/config/fr30/fr30.c9
-rw-r--r--gcc/config/fr30/fr30.h107
-rw-r--r--gcc/config/fr30/fr30.md29
4 files changed, 37 insertions, 114 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 8dcaeff..20e83f6 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -6,6 +6,12 @@ Mon Nov 8 15:38:41 1999 Nick Clifton <nickc@cygnus.com>
* config/v850/v850.c: Move prototypes to v850-protos.h
* config/v850/v850.md: Fix compile time warnings.
+ * config/fr30/fr30-protos.h: New file: Prototypes for functions
+ defined in fr30.c
+ * config/fr30/fr30.h: Move prototypes to fr30-protos.h
+ * config/fr30/fr30.c: Fix compile time warnings.
+ * config/fr30/fr30.md: Fix compile time warnings.
+
Mon Nov 8 07:25:37 1999 Mark Mitchell <mark@codesourcery.com>
* tree.h (get_containing_scope): Declare it.
diff --git a/gcc/config/fr30/fr30.c b/gcc/config/fr30/fr30.c
index 445a5e1..e03ea5b 100644
--- a/gcc/config/fr30/fr30.c
+++ b/gcc/config/fr30/fr30.c
@@ -44,6 +44,7 @@ Boston, MA 02111-1307, USA. */
#include "obstack.h"
#include "except.h"
#include "function.h"
+#include "fr30-protos.h"
/*}}}*/
/*{{{ Function Prologues & Epilogues */
@@ -398,7 +399,7 @@ void
fr30_setup_incoming_varargs (arg_regs_used_so_far, int_mode, type, pretend_size)
CUMULATIVE_ARGS arg_regs_used_so_far;
int int_mode;
- tree type;
+ tree type ATTRIBUTE_UNUSED;
int * pretend_size;
{
enum machine_mode mode = (enum machine_mode)int_mode;
@@ -576,7 +577,7 @@ fr30_print_operand (file, x, code)
switch (GET_CODE (x0))
{
case REG:
- if (REGNO (x0) >= (sizeof (reg_names) / sizeof (reg_names[0])))
+ if ((unsigned) REGNO (x0) >= (sizeof (reg_names) / sizeof (reg_names[0])))
abort ();
fprintf (file, "@%s", reg_names [REGNO (x0)]);
break;
@@ -786,6 +787,10 @@ fr30_va_arg (valist, type)
/*}}}*/
/*{{{ Operand predicates */
+#ifndef Mmode
+#define Mmode enum machine_mode
+#endif
+
/* Returns true if OPERAND is an integer value suitable for use in
an ADDSP instruction. */
int
diff --git a/gcc/config/fr30/fr30.h b/gcc/config/fr30/fr30.h
index cab16ef..1bdd0d6 100644
--- a/gcc/config/fr30/fr30.h
+++ b/gcc/config/fr30/fr30.h
@@ -31,36 +31,6 @@ Boston, MA 02111-1307, USA. */
#include "gansidecl.h"
/*}}}*/
-/*{{{ Forward strcuture declarations for use in prototypes. */
-
-#ifdef BUFSIZ /* stdio.h has been included, ok to use FILE * */
-#define STDIO_PROTO(ARGS) PROTO(ARGS)
-#else
-#define STDIO_PROTO(ARGS) ()
-#endif
-
-#ifndef RTX_CODE
-struct rtx_def;
-#define Rtx struct rtx_def *
-#else
-#define Rtx rtx
-#endif
-
-#ifndef TREE_CODE
-union tree_node;
-#define Tree union tree_node *
-#else
-#define Tree tree
-#endif
-
-#ifndef HAVE_MACHINE_MODES
-#include "hwint.h"
-#include "machmode.h"
-#endif
-
-#define Mmode enum machine_mode
-
-/*}}}*/
/*{{{ Driver configuration */
/* A C expression which determines whether the option `-CHAR' takes arguments.
@@ -585,15 +555,15 @@ enum reg_class
containing several integers. Each sub-initializer must be suitable as an
initializer for the type `HARD_REG_SET' which is defined in
`hard-reg-set.h'. */
-#define REG_CLASS_CONTENTS \
-{ \
- 0, \
- 1 << MD_LOW_REGNUM, \
- (1 << MD_LOW_REGNUM) | (1 << MD_HIGH_REGNUM), \
- (1 << 8) - 1, \
- ((1 << 8) - 1) << 8, \
- (1 << CONDITION_CODE_REGNUM) - 1, \
- (1 << FIRST_PSEUDO_REGISTER) - 1 \
+#define REG_CLASS_CONTENTS \
+{ \
+ { 0 }, \
+ { 1 << MD_LOW_REGNUM }, \
+ { (1 << MD_LOW_REGNUM) | (1 << MD_HIGH_REGNUM) }, \
+ { (1 << 8) - 1 }, \
+ { ((1 << 8) - 1) << 8 }, \
+ { (1 << CONDITION_CODE_REGNUM) - 1 }, \
+ { (1 << FIRST_PSEUDO_REGISTER) - 1 } \
}
/* A C expression whose value is a register class containing hard register
@@ -1301,8 +1271,6 @@ typedef int CUMULATIVE_ARGS;
#define FUNCTION_ARG_PARTIAL_NREGS(CUM, MODE, TYPE, NAMED) \
fr30_function_arg_partial_nregs (CUM, MODE, TYPE, NAMED)
-extern int fr30_function_arg_partial_nregs PROTO ((CUMULATIVE_ARGS, int, Tree, int));
-
/* A C expression that indicates when an argument must be passed by reference.
If nonzero for an argument, a copy of that argument is made in memory and a
pointer to the argument is passed instead of the argument itself. The
@@ -1373,8 +1341,6 @@ extern int fr30_function_arg_partial_nregs PROTO ((CUMULATIVE_ARGS, int, Tree, i
#define FUNCTION_ARG_ADVANCE(CUM, MODE, TYPE, NAMED) \
(CUM) += (NAMED) * fr30_num_arg_regs (MODE, TYPE)
-extern int fr30_num_arg_regs PROTO ((int, Tree));
-
/* If defined, a C expression which determines whether, and in which direction,
to pad out an argument with extra space. The value should be of type `enum
direction': either `upward' to pad above the argument, `downward' to pad
@@ -1934,9 +1900,6 @@ extern int fr30_num_arg_regs PROTO ((int, Tree));
if (! SECOND_TIME) \
fr30_setup_incoming_varargs (ARGS_SO_FAR, MODE, TYPE, & PRETEND_ARGS_SIZE)
-extern void fr30_setup_incoming_varargs
- PROTO ((CUMULATIVE_ARGS, int, Tree, int *));
-
/* Define this macro if the location where a function argument is passed
depends on whether or not it is a named argument.
@@ -2457,39 +2420,6 @@ do \
This macro is not used on machines that do not use `cc0'. */
/* #define CC_STATUS_MDEP_INIT */
-/* A C compound statement to set the components of `cc_status' appropriately
- for an insn INSN whose body is EXP. It is this macro's responsibility to
- recognize insns that set the condition code as a byproduct of other activity
- as well as those that explicitly set `(cc0)'.
-
- This macro is not used on machines that do not use `cc0'.
-
- If there are insns that do not set the condition code but do alter other
- machine registers, this macro must check to see whether they invalidate the
- expressions that the condition code is recorded as reflecting. For example,
- on the 68000, insns that store in address registers do not set the condition
- code, which means that usually `NOTICE_UPDATE_CC' can leave `cc_status'
- unaltered for such insns. But suppose that the previous insn set the
- condition code based on location `a4@(102)' and the current insn stores a
- new value in `a4'. Although the condition code is not changed by this, it
- will no longer be true that it reflects the contents of `a4@(102)'.
- Therefore, `NOTICE_UPDATE_CC' must alter `cc_status' in this case to say
- that nothing is known about the condition code value.
-
- The definition of `NOTICE_UPDATE_CC' must be prepared to deal with the
- results of peephole optimization: insns whose patterns are `parallel' RTXs
- containing various `reg', `mem' or constants which are just the operands.
- The RTL structure of these insns is not sufficient to indicate what the
- insns actually do. What `NOTICE_UPDATE_CC' should do when it sees one is
- just to run `CC_STATUS_INIT'.
-
- A possible definition of `NOTICE_UPDATE_CC' is to call a function that looks
- at an attribute named, for example, `cc'. This
- avoids having detailed information about patterns in two places, the `md'
- file and in `NOTICE_UPDATE_CC'. */
-/* #define NOTICE_UPDATE_CC(EXP, INSN) fr30_notice_update_cc (INSN)
- extern int fr30_notice_update_cc PROTO ((Rtx)); */
-
/* A list of names to be used for additional modes for condition code values in
registers. These names are added to `enum
machine_mode' and all have class `MODE_CC'. By convention, they should
@@ -3655,8 +3585,6 @@ do { \
the punctuation character for CODE. */
#define PRINT_OPERAND(STREAM, X, CODE) fr30_print_operand (STREAM, X, CODE)
-extern void fr30_print_operand STDIO_PROTO((FILE *, Rtx, int));
-
/* A C expression which evaluates to true if CODE is a valid punctuation
character for use in the `PRINT_OPERAND' macro. If
`PRINT_OPERAND_PUNCT_VALID_P' is not defined, it means that no punctuation
@@ -3672,7 +3600,6 @@ extern void fr30_print_operand STDIO_PROTO((FILE *, Rtx, int));
`ENCODE_SECTION_INFO' to store the information into the `symbol_ref', and
then check for it here. *Note Assembler Format::. */
#define PRINT_OPERAND_ADDRESS(STREAM, X) fr30_print_operand_address (STREAM, X)
-extern void fr30_print_operand_address STDIO_PROTO((FILE *, Rtx));
/* A C statement, to be executed after all slot-filler instructions have been
output. If necessary, call `dbr_sequence_length' to determine the number of
@@ -4473,22 +4400,6 @@ extern struct rtx_def * fr30_compare_op1;
{ "add_immediate_operand", { REG, CONST_INT }},
/*}}}*/
-/*{{{ Functions defined in fr30.c */
-
-extern void fr30_expand_prologue PROTO ((void));
-extern void fr30_expand_epilogue PROTO ((void));
-extern unsigned int fr30_compute_frame_size PROTO ((int, int));
-extern int fr30_check_multiple_regs PROTO ((Rtx *, int, int));
-extern Rtx fr30_va_arg PROTO ((Tree, Tree));
-#ifndef NO_MD_PROTOTYPES
-extern int stack_add_operand PROTO ((Rtx, Mmode));
-extern int add_immediate_operand PROTO ((Rtx, Mmode));
-extern int high_register_operand PROTO ((Rtx, Mmode));
-extern int low_register_operand PROTO ((Rtx, Mmode));
-extern int call_operand PROTO ((Rtx, Mmode));
-#endif
-
-/*}}}*/
/* Local Variables: */
/* folded-file: t */
diff --git a/gcc/config/fr30/fr30.md b/gcc/config/fr30/fr30.md
index 6618fe3..8dcd782 100644
--- a/gcc/config/fr30/fr30.md
+++ b/gcc/config/fr30/fr30.md
@@ -304,7 +304,7 @@
(define_split
[(set (match_operand:SI 0 "register_operand" "")
(match_operand:SI 1 "immediate_operand" ""))]
- "(INTVAL (operands[1]) < 0) && (INTVAL (operands[1]) & 0x00ffffff == 0)"
+ "(INTVAL (operands[1]) < 0) && ((INTVAL (operands[1]) & 0x00ffffff) == 0)"
[(set:SI (match_dup 0) (match_dup 2))
(parallel [(set:SI (match_dup 0) (ashift:SI (match_dup 0) (const_int 24)))
(clobber (reg:CC 16))])]
@@ -533,8 +533,8 @@
""
"*
{
- char * ldi_instr;
- char * tmp_reg;
+ char * ldi_instr;
+ const char * tmp_reg;
static char buffer[100];
REAL_VALUE_TYPE d;
@@ -1145,9 +1145,9 @@
return \"b%b0%#\\t%l1\";
else
{
- static char buffer [100];
- char * tmp_reg;
- char * ldi_insn;
+ static char buffer [100];
+ const char * tmp_reg;
+ char * ldi_insn;
tmp_reg = reg_names [COMPILER_SCRATCH_REGISTER];
@@ -1199,9 +1199,9 @@
return \"b%B0%#\\t%l1 \";
else
{
- static char buffer [100];
- char * tmp_reg;
- char * ldi_insn;
+ static char buffer [100];
+ const char * tmp_reg;
+ char * ldi_insn;
tmp_reg = reg_names [COMPILER_SCRATCH_REGISTER];
@@ -1262,7 +1262,8 @@
;; For a description of the computation of the length
;; attribute see the branch patterns above.
(define_insn "jump"
- [(set (pc) (label_ref (match_operand 0 "" "")))]
+ [(set (pc) (label_ref (match_operand 0 "" "")))
+ (clobber (reg:SI 0))]
""
"*
{
@@ -1270,9 +1271,9 @@
return \"bra%#\\t%0\";
else
{
- static char buffer [100];
- char * tmp_reg;
- char * ldi_insn;
+ static char buffer [100];
+ const char * tmp_reg;
+ char * ldi_insn;
tmp_reg = reg_names [COMPILER_SCRATCH_REGISTER];
@@ -1320,7 +1321,7 @@
;; some cases, it might be necessary to emit a barrier instruction as the last
;; insn to prevent such scheduling.
(define_expand "prologue"
- [(const_int 0)]
+ [(clobber (const_int 0))]
""
"{
fr30_expand_prologue ();