a29k-protos.h: New file.
* 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
This commit is contained in:
parent
bcc6049ca6
commit
ff82ca233e
@ -1,3 +1,13 @@
|
||||
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.
|
||||
|
65
gcc/config/a29k/a29k-protos.h
Normal file
65
gcc/config/a29k/a29k-protos.h
Normal file
@ -0,0 +1,65 @@
|
||||
/* 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 */
|
@ -1,5 +1,5 @@
|
||||
/* 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)
|
||||
|
||||
@ -38,6 +38,12 @@ Boston, MA 02111-1307, USA. */
|
||||
#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))
|
||||
|
||||
@ -70,7 +76,7 @@ static int a29k_first_epilogue_insn_used;
|
||||
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
|
||||
@ -89,7 +95,7 @@ int a29k_compare_fp_p;
|
||||
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;
|
||||
}
|
||||
@ -99,7 +105,7 @@ cint_8_operand (op, mode)
|
||||
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;
|
||||
}
|
||||
@ -109,7 +115,7 @@ cint_16_operand (op, mode)
|
||||
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;
|
||||
@ -131,7 +137,7 @@ long_const_operand (op, mode)
|
||||
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)
|
||||
@ -234,7 +240,7 @@ spec_reg_operand (op, mode)
|
||||
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));
|
||||
@ -347,7 +353,7 @@ add_operand (op, mode)
|
||||
int
|
||||
call_operand (op, mode)
|
||||
rtx op;
|
||||
enum machine_mode mode;
|
||||
enum machine_mode mode ATTRIBUTE_UNUSED;
|
||||
{
|
||||
switch (GET_CODE (op))
|
||||
{
|
||||
@ -372,8 +378,6 @@ in_operand (op, mode)
|
||||
rtx op;
|
||||
enum machine_mode mode;
|
||||
{
|
||||
rtx orig_op = op;
|
||||
|
||||
if (! general_operand (op, mode))
|
||||
return 0;
|
||||
|
||||
@ -444,7 +448,7 @@ out_operand (op, mode)
|
||||
int
|
||||
reload_memory_operand (op, mode)
|
||||
rtx op;
|
||||
enum machine_mode mode;
|
||||
enum machine_mode mode ATTRIBUTE_UNUSED;
|
||||
{
|
||||
int regno = true_regnum (op);
|
||||
|
||||
@ -490,19 +494,20 @@ a29k_set_memflags_1 (x, in_struct_p, scalar_p, volatile_p, unchanging_p)
|
||||
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:
|
||||
@ -511,6 +516,9 @@ a29k_set_memflags_1 (x, in_struct_p, scalar_p, volatile_p, unchanging_p)
|
||||
MEM_VOLATILE_P (x) = volatile_p;
|
||||
RTX_UNCHANGING_P (x) = unchanging_p;
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
@ -568,7 +576,7 @@ branch_operator (op, mode)
|
||||
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;
|
||||
@ -610,7 +618,7 @@ load_multiple_operation (op, mode)
|
||||
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;
|
||||
@ -722,7 +730,7 @@ masks_bits_for_special (reg, mask)
|
||||
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;
|
||||
}
|
||||
@ -909,6 +917,9 @@ uses_local_reg_p (x)
|
||||
case LABEL_REF:
|
||||
case SYMBOL_REF:
|
||||
return 0;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
fmt = GET_RTX_FORMAT (GET_CODE (x));
|
||||
|
@ -653,10 +653,6 @@ enum reg_class { NO_REGS, LR0_REGS, GENERAL_REGS, BP_REGS, FC_REGS, CR_REGS,
|
||||
#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.
|
||||
|
||||
@ -932,7 +928,7 @@ extern int a29k_compare_fp_p;
|
||||
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; \
|
||||
|
Loading…
Reference in New Issue
Block a user