summaryrefslogtreecommitdiff
path: root/gcc/config/romp
diff options
context:
space:
mode:
authorghazi <ghazi@138bc75d-0d04-0410-961f-82ee72b054a4>2000-01-18 22:59:40 +0000
committerghazi <ghazi@138bc75d-0d04-0410-961f-82ee72b054a4>2000-01-18 22:59:40 +0000
commit51b2cbe1e73339770482a98b1dc85f9f38b87f5a (patch)
treee171bfb6a8be99b68313034a45f9f7175e4813ab /gcc/config/romp
parent6c7e0e00d5078b32ab3ef92cdc4129c68e74cd44 (diff)
downloadgcc-51b2cbe1e73339770482a98b1dc85f9f38b87f5a.tar.gz
* romp-protos.h: New file.
* romp.c: Fix compile time warnings. * romp.h: Move prototypes to romp-protos.h. Fix compile time warnings. * romp.md: Likewise. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@31492 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/config/romp')
-rw-r--r--gcc/config/romp/romp-protos.h63
-rw-r--r--gcc/config/romp/romp.c38
-rw-r--r--gcc/config/romp/romp.h24
-rw-r--r--gcc/config/romp/romp.md6
4 files changed, 98 insertions, 33 deletions
diff --git a/gcc/config/romp/romp-protos.h b/gcc/config/romp/romp-protos.h
new file mode 100644
index 00000000000..b9f1069720d
--- /dev/null
+++ b/gcc/config/romp/romp-protos.h
@@ -0,0 +1,63 @@
+/* Definitions of target machine for GNU compiler, for ROMP chip.
+ Copyright (C) 2000 Free Software Foundation, Inc.
+ Contributed by Richard Kenner (kenner@nyu.edu)
+
+This file is part of GNU CC.
+
+GNU CC is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU CC is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU CC; see the file COPYING. If not, write to
+the Free Software Foundation, 59 Temple Place - Suite 330,
+Boston, MA 02111-1307, USA. */
+
+#ifdef RTX_CODE
+extern int next_insn_tests_no_unsigned PARAMS ((rtx));
+extern void update_cc PARAMS ((rtx, rtx));
+extern int restore_compare_p PARAMS ((rtx));
+extern void print_operand PARAMS ((FILE *, rtx, int));
+extern rtx get_symref PARAMS ((const char *));
+extern int check_precision PARAMS ((enum machine_mode, rtx, rtx));
+extern const char *output_fpop PARAMS ((enum rtx_code, rtx, rtx, rtx, rtx));
+extern int constant_pool_address_operand PARAMS ((rtx, enum machine_mode));
+extern int romp_symbolic_operand PARAMS ((rtx, enum machine_mode));
+extern int zero_memory_operand PARAMS ((rtx, enum machine_mode));
+extern int short_memory_operand PARAMS ((rtx, enum machine_mode));
+extern int symbolic_memory_operand PARAMS ((rtx, enum machine_mode));
+extern int current_function_operand PARAMS ((rtx, enum machine_mode));
+extern int constant_operand PARAMS ((rtx, enum machine_mode));
+extern int reg_or_cint_operand PARAMS ((rtx, enum machine_mode));
+extern int reg_or_any_cint_operand PARAMS ((rtx, enum machine_mode));
+extern int reg_or_D_operand PARAMS ((rtx, enum machine_mode));
+extern int reg_or_add_operand PARAMS ((rtx, enum machine_mode));
+extern int reg_or_and_operand PARAMS ((rtx, enum machine_mode));
+extern int reg_or_mem_operand PARAMS ((rtx, enum machine_mode));
+extern int reg_or_nonsymb_mem_operand PARAMS ((rtx, enum machine_mode));
+extern int romp_operand PARAMS ((rtx, enum machine_mode));
+extern int reg_0_operand PARAMS ((rtx, enum machine_mode));
+extern int reg_15_operand PARAMS ((rtx, enum machine_mode));
+extern int float_binary PARAMS ((rtx, enum machine_mode));
+extern int float_unary PARAMS ((rtx, enum machine_mode));
+extern int float_conversion PARAMS ((rtx, enum machine_mode));
+#endif /* RTX_CODE */
+
+extern int first_reg_to_save PARAMS ((void));
+extern int romp_pushes_stack PARAMS ((void));
+extern int romp_using_r14 PARAMS ((void));
+extern int null_epilogue PARAMS ((void));
+extern int romp_sa_size PARAMS ((void));
+extern int romp_makes_calls PARAMS ((void));
+extern void output_prolog PARAMS ((FILE *, int));
+extern void output_encoded_offset PARAMS ((FILE *, unsigned));
+extern void output_epilog PARAMS ((FILE *, int));
+extern int romp_debugger_auto_correction PARAMS ((int));
+extern int romp_debugger_arg_correction PARAMS ((int));
+extern const char *output_in_line_mul PARAMS ((void));
diff --git a/gcc/config/romp/romp.c b/gcc/config/romp/romp.c
index 51bd7499d07..79d9177b93d 100644
--- a/gcc/config/romp/romp.c
+++ b/gcc/config/romp/romp.c
@@ -1,5 +1,5 @@
/* Subroutines used for code generation on ROMP.
- Copyright (C) 1990, 91, 92, 93, 97, 98, 1999 Free Software Foundation, Inc.
+ Copyright (C) 1990, 91, 92, 93, 97-99, 2000 Free Software Foundation, Inc.
Contributed by Richard Kenner (kenner@nyu.edu)
This file is part of GNU CC.
@@ -37,14 +37,17 @@ Boston, MA 02111-1307, USA. */
#include "obstack.h"
#include "tree.h"
#include "function.h"
+#include "tm_p.h"
#define min(A,B) ((A) < (B) ? (A) : (B))
#define max(A,B) ((A) > (B) ? (A) : (B))
-static int unsigned_comparisons_p ();
-static void output_loadsave_fpregs ();
-static void output_fpops ();
-static void init_fpops ();
+static int unsigned_comparisons_p PARAMS ((rtx));
+static void output_loadsave_fpregs PARAMS ((FILE *, enum rtx_code, rtx));
+static void output_fpops PARAMS ((FILE *));
+static void init_fpops PARAMS ((void));
+static int memory_offset_in_range_p PARAMS ((rtx, enum machine_mode, int, int));
+static unsigned int hash_rtx PARAMS ((rtx));
/* Return 1 if the insn using CC0 set by INSN does not contain
any unsigned tests applied to the condition codes.
@@ -96,6 +99,8 @@ unsigned_comparisons_p (x)
case LEU:
case GEU:
return (XEXP (x, 0) == cc0_rtx || XEXP (x, 1) == cc0_rtx);
+ default:
+ break;
}
len = GET_RTX_LENGTH (code);
@@ -126,8 +131,9 @@ unsigned_comparisons_p (x)
cc_state.value[12] refer to two possible values that might correspond
to the CC. We only store register values. */
+void
update_cc (body, insn)
- rtx body;
+ rtx body ATTRIBUTE_UNUSED;
rtx insn;
{
switch (get_attr_cc (insn))
@@ -231,7 +237,7 @@ restore_compare_p (op)
/* Generate the (long) string corresponding to an inline multiply insn.
Note that `r10' does not refer to the register r10, but rather to the
SCR used as the MQ. */
-char *
+const char *
output_in_line_mul ()
{
static char insns[200];
@@ -356,7 +362,7 @@ symbolic_memory_operand (op, mode)
int
current_function_operand (op, mode)
rtx op;
- enum machine_mode mode;
+ enum machine_mode mode ATTRIBUTE_UNUSED;
{
if (GET_CODE (op) != MEM || GET_CODE (XEXP (op, 0)) != SYMBOL_REF
|| ! CONSTANT_POOL_ADDRESS_P (XEXP (op, 0)))
@@ -382,7 +388,7 @@ null_epilogue ()
int
constant_pool_address_operand (op, mode)
rtx op;
- enum machine_mode mode;
+ enum machine_mode mode ATTRIBUTE_UNUSED;
{
return ((GET_CODE (op) == SYMBOL_REF && CONSTANT_POOL_ADDRESS_P (op))
|| (GET_CODE (op) == CONST && GET_CODE (XEXP (op, 0)) == PLUS
@@ -397,7 +403,7 @@ constant_pool_address_operand (op, mode)
int
romp_symbolic_operand (op, mode)
register rtx op;
- enum machine_mode mode;
+ enum machine_mode mode ATTRIBUTE_UNUSED;
{
switch (GET_CODE (op))
{
@@ -656,7 +662,7 @@ void
print_operand (file, x, code)
FILE *file;
rtx x;
- char code;
+ int code;
{
int i;
@@ -1322,10 +1328,10 @@ static struct symref_hashent *symref_hash_table[SYMHASHSIZE];
the name string is allocated from the permanent obstack. */
rtx
get_symref (name)
- register char *name;
+ register const char *name;
{
extern struct obstack permanent_obstack;
- register char *sp = name;
+ register const char *sp = name;
unsigned int hash = 0;
struct symref_hashent *p, **last_p;
@@ -1459,11 +1465,11 @@ hash_rtx (x)
A new floating-point operation block is created if this operation has not
been seen before. */
-char *
+const char *
output_fpop (code, op0, op1, op2, insn)
enum rtx_code code;
rtx op0, op1, op2;
- rtx insn;
+ rtx insn ATTRIBUTE_UNUSED;
{
static char outbuf[40];
unsigned int hash, hash0, hash1, hash2;
@@ -1832,7 +1838,7 @@ output_fpops (file)
{
register int type;
register int opbyte;
- register char *desc0;
+ register const char *desc0;
char desc1[50];
immed[i] = 0;
diff --git a/gcc/config/romp/romp.h b/gcc/config/romp/romp.h
index 521a78c2b13..25a6474730e 100644
--- a/gcc/config/romp/romp.h
+++ b/gcc/config/romp/romp.h
@@ -1,5 +1,5 @@
/* Definitions of target machine for GNU compiler, for ROMP chip.
- Copyright (C) 1989, 91, 93, 95, 96, 98, 1999 Free Software Foundation, Inc.
+ Copyright (C) 1989, 91, 93, 95, 96, 98, 99, 2000 Free Software Foundation, Inc.
Contributed by Richard Kenner (kenner@nyu.edu)
This file is part of GNU CC.
@@ -325,8 +325,8 @@ enum reg_class { NO_REGS, R0_REGS, R15_REGS, BASE_REGS, GENERAL_REGS,
This is an initializer for a vector of HARD_REG_SET
of length N_REG_CLASSES. */
-#define REG_CLASS_CONTENTS {0, 0x00001, 0x08000, 0x1fffe, 0x1ffff, \
- 0x1fe0000, 0x1ffffff }
+#define REG_CLASS_CONTENTS {{0}, {0x00001}, {0x08000}, {0x1fffe}, {0x1ffff}, \
+ {0x1fe0000}, {0x1ffffff} }
/* The same information, inverted:
Return the class number of the smallest class containing
@@ -520,7 +520,7 @@ enum reg_class { NO_REGS, R0_REGS, R15_REGS, BASE_REGS, GENERAL_REGS,
#define FUNCTION_VALUE(VALTYPE, FUNC) \
gen_rtx_REG (TYPE_MODE (VALTYPE), \
- (TARGET_FP_REG \
+ (TARGET_FP_REGS \
&& GET_MODE_CLASS (TYPE_MODE (VALTYPE)) == MODE_FLOAT) \
? 18 : 2)
@@ -627,7 +627,7 @@ struct rt_cargs {int gregs, fregs; };
#define FUNCTION_ARG(CUM, MODE, TYPE, NAMED) \
(! (NAMED) ? 0 \
: ((TYPE) != 0 && TREE_CODE (TYPE_SIZE (TYPE)) != INTEGER_CST) ? 0 \
- : USE_FP_REG(MODE,CUM) ? gen_rtx_REG ((MODE), (CUM.fregs) + 17) \
+ : USE_FP_REG(MODE,CUM) ? gen_rtx_REG ((MODE), (CUM).fregs + 17) \
: (CUM).gregs < 4 ? gen_rtx_REG ((MODE), 2 + (CUM).gregs) : 0)
/* For an arg passed partly in registers and partly in memory,
@@ -1075,7 +1075,7 @@ struct rt_cargs {int gregs, fregs; };
high_int += 1, low_int |= 0xffff0000; \
(X) = gen_rtx_PLUS (SImode, \
force_operand (plus_constant (XEXP (X, 0), \
- high_int << 16)), \
+ high_int << 16), 0), \
GEN_INT (low_int)); \
} \
}
@@ -1200,7 +1200,6 @@ struct rt_cargs {int gregs, fregs; };
/* A C expression for the integer offset value of an automatic variable
(N_LSYM) having address X (an RTX). This gets used in .stabs entries
for the local variables. Compare with the default definition. */
-extern int romp_debugger_auto_correction();
#define DEBUGGER_AUTO_OFFSET(X) \
(GET_CODE (X) == PLUS \
? romp_debugger_auto_correction (INTVAL (XEXP (X, 1)) ) \
@@ -1208,7 +1207,6 @@ extern int romp_debugger_auto_correction();
/* A C expression for the integer offset value of an argument (N_PSYM)
having address X (an RTX). The nominal offset is OFFSET. */
-extern int romp_debugger_arg_correction();
#define DEBUGGER_ARG_OFFSET(OFFSET, X) \
romp_debugger_arg_correction (OFFSET);
@@ -1261,8 +1259,8 @@ extern int romp_debugger_arg_correction();
#define CONST_COSTS(RTX,CODE,OUTER_CODE) \
case CONST_INT: \
- if ((OUTER_CODE) == IOR && exact_log2 (INTVAL (RTX)) >= 0 \
- || (OUTER_CODE) == AND && exact_log2 (~INTVAL (RTX)) >= 0 \
+ if (((OUTER_CODE) == IOR && exact_log2 (INTVAL (RTX)) >= 0) \
+ || ((OUTER_CODE) == AND && exact_log2 (~INTVAL (RTX)) >= 0) \
|| (((OUTER_CODE) == PLUS || (OUTER_CODE) == MINUS) \
&& (unsigned int) (INTVAL (RTX) + 15) < 31) \
|| ((OUTER_CODE) == SET && (unsigned int) INTVAL (RTX) < 16))\
@@ -1363,7 +1361,7 @@ extern int romp_debugger_arg_correction();
#define ASM_FILE_START(FILE) \
{ extern char *version_string; \
- char *p; \
+ const char *p; \
\
fprintf (FILE, "\t.globl .oVncs\n\t.set .oVncs,0\n") ; \
fprintf (FILE, "\t.globl .oVgcc"); \
@@ -1628,7 +1626,3 @@ extern int romp_debugger_arg_correction();
{"float_unary", {NEG, ABS}}, \
{"float_conversion", {FLOAT_TRUNCATE, FLOAT_EXTEND, FLOAT, FIX}},
-/* Define functions defined in aux-output.c and used in templates. */
-
-extern char *output_in_line_mul ();
-extern char *output_fpop ();
diff --git a/gcc/config/romp/romp.md b/gcc/config/romp/romp.md
index 82290c49780..dc4892e5787 100644
--- a/gcc/config/romp/romp.md
+++ b/gcc/config/romp/romp.md
@@ -1,5 +1,5 @@
;;- Machine description for ROMP chip for GNU C compiler
-;; Copyright (C) 1988, 91, 93, 94, 95, 98, 1999 Free Software Foundation, Inc.
+;; Copyright (C) 1988, 91, 93-95, 98, 99, 2000 Free Software Foundation, Inc.
;; Contributed by Richard Kenner (kenner@vlsi1.ultra.nyu.edu)
;; This file is part of GNU CC.
@@ -438,6 +438,8 @@
return \"get %O0,$%1\;ls %0,0(%O0)\;ls %O0,4(%O0)\";
case 3:
return \"st%M0 %1,%0\;st%M0 %O1,%O0\";
+ default:
+ abort();
}
}"
[(set_attr "type" "multi")
@@ -1541,7 +1543,7 @@
if (top != 0 && bottom != 0)
{
emit_insn (gen_iorsi3 (operands[0], operands[1],
- GEN_INT (top << 16))));
+ GEN_INT (top << 16)));
operands[1] = operands[0];
operands[2] = GEN_INT (bottom);
}