* a29k-protos.h: New file.
* a29k.c: Include tm_p.h. Add static prototypes. Fix compile
time warnings.
* a29k.h: Move prototypes to a29k-protos.h. Fix compile time
warnings.
From-SVN: r31393
+2000-01-13 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
+
+ * a29k-protos.h: New file.
+
+ * a29k.c: Include tm_p.h. Add static prototypes. Fix compile
+ time warnings.
+
+ * a29k.h: Move prototypes to a29k-protos.h. Fix compile time
+ warnings.
+
2000-01-13 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
* clipper-protos.h: New file.
--- /dev/null
+/* Definitions of target machine for GNU compiler, for AMD Am29000 CPU.
+ 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
+/* This function is used to get the address of an object. */
+extern struct rtx_def *a29k_get_reloaded_address PARAMS ((rtx));
+extern int gpc_reg_operand PARAMS ((rtx, enum machine_mode));
+extern int long_const_operand PARAMS ((rtx, enum machine_mode));
+extern int cint_8_operand PARAMS ((rtx, enum machine_mode));
+extern int cint_16_operand PARAMS ((rtx, enum machine_mode));
+extern int const_0_operand PARAMS ((rtx, enum machine_mode));
+extern int const_8_operand PARAMS ((rtx, enum machine_mode));
+extern int const_16_operand PARAMS ((rtx, enum machine_mode));
+extern int const_24_operand PARAMS ((rtx, enum machine_mode));
+extern int float_const_operand PARAMS ((rtx, enum machine_mode));
+extern int gpc_reg_or_float_constant_operand PARAMS ((rtx, enum machine_mode));
+extern int gpc_reg_or_integer_constant_operand PARAMS ((rtx, enum machine_mode));
+extern int spec_reg_operand PARAMS ((rtx, enum machine_mode));
+extern int accum_reg_operand PARAMS ((rtx, enum machine_mode));
+extern int srcb_operand PARAMS ((rtx, enum machine_mode));
+extern int cmplsrcb_operand PARAMS ((rtx, enum machine_mode));
+extern int gpc_reg_or_immediate_operand PARAMS ((rtx, enum machine_mode));
+extern int and_operand PARAMS ((rtx, enum machine_mode));
+extern int add_operand PARAMS ((rtx, enum machine_mode));
+extern int call_operand PARAMS ((rtx, enum machine_mode));
+extern int in_operand PARAMS ((rtx, enum machine_mode));
+extern int out_operand PARAMS ((rtx, enum machine_mode));
+extern int reload_memory_operand PARAMS ((rtx, enum machine_mode));
+extern void a29k_set_memflags PARAMS ((rtx, rtx));
+extern int fp_comparison_operator PARAMS ((rtx, enum machine_mode));
+extern int branch_operator PARAMS ((rtx, enum machine_mode));
+extern int load_multiple_operation PARAMS ((rtx, enum machine_mode));
+extern int store_multiple_operation PARAMS ((rtx, enum machine_mode));
+extern int masks_bits_for_special PARAMS ((rtx, rtx));
+extern int epilogue_operand PARAMS ((rtx, enum machine_mode));
+extern enum reg_class secondary_reload_class PARAMS ((enum reg_class,
+ enum machine_mode, rtx));
+extern int incoming_reg PARAMS ((int, int));
+extern void a29k_clobbers_to PARAMS ((rtx, rtx));
+extern int needs_regstack_p PARAMS ((void));
+extern int uses_local_reg_p PARAMS ((rtx));
+extern int null_epilogue PARAMS ((void));
+extern void print_operand PARAMS ((FILE *, rtx, int));
+extern void a29k_compute_reg_names PARAMS ((void));
+extern void output_prolog PARAMS ((FILE *, int));
+extern void output_epilog PARAMS ((FILE *, int));
+#endif /* RTX_CODE */
/* Subroutines used for code generation on AMD Am29000.
- Copyright (C) 1987, 88, 90-95, 1997, 1998, 1999 Free Software
+ Copyright (C) 1987, 88, 90-95, 97-99, 2000 Free Software
Foundation, Inc.
Contributed by Richard Kenner (kenner@nyu.edu)
#include "obstack.h"
#include "tree.h"
#include "reload.h"
+#include "tm_p.h"
+
+static int shift_constant_operand PARAMS ((rtx, enum machine_mode, int));
+static void a29k_set_memflags_1 PARAMS ((rtx, int, int, int, int));
+static void compute_regstack_size PARAMS ((void));
+static void check_epilogue_internal_label PARAMS ((FILE *));
#define min(A,B) ((A) < (B) ? (A) : (B))
contain the tag words prior to the declaration. So the name must be stored
away. */
-char *a29k_function_name;
+const char *a29k_function_name;
/* Mapping of registers to debug register numbers. The only change is
for the frame pointer and the register numbers used for the incoming
int
cint_8_operand (op, mode)
register rtx op;
- enum machine_mode mode;
+ enum machine_mode mode ATTRIBUTE_UNUSED;
{
return GET_CODE (op) == CONST_INT && (INTVAL (op) & 0xffffff00) == 0;
}
int
cint_16_operand (op, mode)
rtx op;
- enum machine_mode mode;
+ enum machine_mode mode ATTRIBUTE_UNUSED;
{
return GET_CODE (op) == CONST_INT && (INTVAL (op) & 0xffff0000) == 0;
}
int
long_const_operand (op, mode)
register rtx op;
- enum machine_mode mode;
+ enum machine_mode mode ATTRIBUTE_UNUSED;
{
if (! CONSTANT_P (op))
return 0;
static int
shift_constant_operand (op, mode, val)
rtx op;
- enum machine_mode mode;
+ enum machine_mode mode ATTRIBUTE_UNUSED;
int val;
{
return ((GET_CODE (op) == CONST_INT && INTVAL (op) == val)
int
accum_reg_operand (op, mode)
rtx op;
- enum machine_mode mode;
+ enum machine_mode mode ATTRIBUTE_UNUSED;
{
return (GET_CODE (op) == REG
&& REGNO (op) >= R_ACU (0) && REGNO (op) <= R_ACU (3));
int
call_operand (op, mode)
rtx op;
- enum machine_mode mode;
+ enum machine_mode mode ATTRIBUTE_UNUSED;
{
switch (GET_CODE (op))
{
rtx op;
enum machine_mode mode;
{
- rtx orig_op = op;
-
if (! general_operand (op, mode))
return 0;
int
reload_memory_operand (op, mode)
rtx op;
- enum machine_mode mode;
+ enum machine_mode mode ATTRIBUTE_UNUSED;
{
int regno = true_regnum (op);
case SEQUENCE:
case PARALLEL:
for (i = XVECLEN (x, 0) - 1; i >= 0; i--)
- a29k_set_memflags_1 (XVECEXP (x, 0, i), in_struct_p, volatile_p,
- unchanging_p);
+ a29k_set_memflags_1 (XVECEXP (x, 0, i), in_struct_p, scalar_p,
+ volatile_p, unchanging_p);
break;
case INSN:
- a29k_set_memflags_1 (PATTERN (x), in_struct_p, volatile_p,
+ a29k_set_memflags_1 (PATTERN (x), in_struct_p, scalar_p, volatile_p,
unchanging_p);
break;
case SET:
- a29k_set_memflags_1 (SET_DEST (x), in_struct_p, volatile_p,
+ a29k_set_memflags_1 (SET_DEST (x), in_struct_p, scalar_p, volatile_p,
+ unchanging_p);
+ a29k_set_memflags_1 (SET_SRC (x), in_struct_p, scalar_p, volatile_p,
unchanging_p);
- a29k_set_memflags_1 (SET_SRC (x), in_struct_p, volatile_p, unchanging_p);
break;
case MEM:
MEM_VOLATILE_P (x) = volatile_p;
RTX_UNCHANGING_P (x) = unchanging_p;
break;
+
+ default:
+ break;
}
}
int
load_multiple_operation (op, mode)
rtx op;
- enum machine_mode mode;
+ enum machine_mode mode ATTRIBUTE_UNUSED;
{
int count = XVECLEN (op, 0) - 2;
int dest_regno;
int
store_multiple_operation (op, mode)
rtx op;
- enum machine_mode mode;
+ enum machine_mode mode ATTRIBUTE_UNUSED;
{
int num_special = TARGET_NO_STOREM_BUG ? 2 : 1;
int count = XVECLEN (op, 0) - num_special;
int
epilogue_operand (op, mode)
rtx op;
- enum machine_mode mode;
+ enum machine_mode mode ATTRIBUTE_UNUSED;
{
return next_active_insn (op) == 0 && a29k_first_epilogue_insn != 0;
}
case LABEL_REF:
case SYMBOL_REF:
return 0;
+
+ default:
+ break;
}
fmt = GET_RTX_FORMAT (GET_CODE (x));
#define SECONDARY_RELOAD_CLASS(CLASS,MODE,IN) \
secondary_reload_class (CLASS, MODE, IN)
-/* This function is used to get the address of an object. */
-
-extern struct rtx_def *a29k_get_reloaded_address ();
-
/* Return the maximum number of consecutive registers
needed to represent mode MODE in a register of class CLASS.
which can't be done until after register allocation, but must be done
before final_start_function is called. */
-extern char *a29k_function_name;
+extern const char *a29k_function_name;
#define ASM_DECLARE_FUNCTION_NAME(FILE,NAME,DECL) \
a29k_function_name = NAME; \