diff options
author | ghazi <ghazi@138bc75d-0d04-0410-961f-82ee72b054a4> | 2000-01-13 17:48:08 +0000 |
---|---|---|
committer | ghazi <ghazi@138bc75d-0d04-0410-961f-82ee72b054a4> | 2000-01-13 17:48:08 +0000 |
commit | 06c65079b6a583888cd2cfea0ac2a160f46dff31 (patch) | |
tree | 61b6ff6f4515b0c3a28e2a8f4fdba9580f52a494 /gcc/config/clipper | |
parent | 0f81690f2f1d5ae57a56fce88495863b2c36f2a3 (diff) | |
download | gcc-06c65079b6a583888cd2cfea0ac2a160f46dff31.tar.gz |
* clipper-protos.h: New file.
* clipper.c: Include tm_p.h. Add static prototypes. Fix compile
time warnings.
* clipper.h: Move prototypes to clipper-protos.h. Fix compile time
warnings.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@31392 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/config/clipper')
-rw-r--r-- | gcc/config/clipper/clipper-protos.h | 40 | ||||
-rw-r--r-- | gcc/config/clipper/clipper.c | 19 | ||||
-rw-r--r-- | gcc/config/clipper/clipper.h | 16 |
3 files changed, 56 insertions, 19 deletions
diff --git a/gcc/config/clipper/clipper-protos.h b/gcc/config/clipper/clipper-protos.h new file mode 100644 index 00000000000..d702165d6b5 --- /dev/null +++ b/gcc/config/clipper/clipper-protos.h @@ -0,0 +1,40 @@ +/* Definitions of target machine for GNU compiler. Clipper version. + Copyright (C) 2000 Free Software Foundation, Inc. + Contributed by Holger Teutsch (holger@hotbso.rhein-main.de) + +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 +#ifdef TREE_CODE +extern void clipper_va_start PARAMS ((int, tree, rtx)); +extern rtx clipper_va_arg PARAMS ((tree, tree)); +#endif /* TREE_CODE */ +extern void clipper_movstr PARAMS ((rtx *)); +extern void print_operand_address PARAMS ((FILE *, rtx)); +extern const char *rev_cond_name PARAMS ((rtx)); +extern int int_reg_operand PARAMS ((rtx, enum machine_mode)); +extern int fp_reg_operand PARAMS ((rtx, enum machine_mode)); +#endif /* RTX_CODE */ + +extern struct rtx_def *clipper_builtin_saveregs PARAMS ((void)); +extern int clipper_frame_size PARAMS ((int)); +extern void output_function_prologue PARAMS ((FILE *, int)); +extern void output_function_epilogue PARAMS ((FILE *, int)); +#ifdef TREE_CODE +extern tree clipper_build_va_list PARAMS ((void)); +#endif /* TREE_CODE */ diff --git a/gcc/config/clipper/clipper.c b/gcc/config/clipper/clipper.c index c76570e2e13..bf4c9891ed1 100644 --- a/gcc/config/clipper/clipper.c +++ b/gcc/config/clipper/clipper.c @@ -1,5 +1,5 @@ /* Subroutines for insn-output.c for Clipper - Copyright (C) 1987, 88, 91, 97, 98, 1999 Free Software Foundation, Inc. + Copyright (C) 1987, 88, 91, 97-99, 2000 Free Software Foundation, Inc. Contributed by Holger Teutsch (holger@hotbso.rhein-main.de) This file is part of GNU CC. @@ -35,7 +35,8 @@ Boston, MA 02111-1307, USA. */ #include "function.h" #include "expr.h" #include "flags.h" -#include "machmode.h" +#include "recog.h" +#include "tm_p.h" extern char regs_ever_live[]; @@ -134,7 +135,7 @@ output_function_prologue (file, lsize) void output_function_epilogue (file, size) FILE *file; - int size; /* ignored */ + int size ATTRIBUTE_UNUSED; { int i, offset; @@ -282,13 +283,13 @@ clipper_movstr (operands) } +void print_operand_address (file, addr) FILE *file; register rtx addr; { rtx op0,op1; - retry: switch (GET_CODE (addr)) { case REG: @@ -329,7 +330,7 @@ print_operand_address (file, addr) } -char * +const char * rev_cond_name (op) rtx op; { @@ -507,7 +508,7 @@ clipper_va_start (stdarg_p, valist, nextarg) /* Set the four entries of __va_reg. */ t = build1 (NOP_EXPR, ptr_type_node, save_area); - u = build (ARRAY_REF, ptr_type_node, reg_field, build_int (0, 0)); + u = build (ARRAY_REF, ptr_type_node, reg_field, build_int_2 (0, 0)); t = build (MODIFY_EXPR, ptr_type_node, u, t); TREE_SIDE_EFFECTS (t) = 1; expand_expr (t, const0_rtx, VOIDmode, EXPAND_NORMAL); @@ -515,7 +516,7 @@ clipper_va_start (stdarg_p, valist, nextarg) t = fold (build (PLUS_EXPR, integer_type_node, save_area, build_int_2 (8, 0))); t = build1 (NOP_EXPR, ptr_type_node, save_area); - u = build (ARRAY_REF, ptr_type_node, reg_field, build_int (1, 0)); + u = build (ARRAY_REF, ptr_type_node, reg_field, build_int_2 (1, 0)); t = build (MODIFY_EXPR, ptr_type_node, u, t); TREE_SIDE_EFFECTS (t) = 1; expand_expr (t, const0_rtx, VOIDmode, EXPAND_NORMAL); @@ -523,7 +524,7 @@ clipper_va_start (stdarg_p, valist, nextarg) t = fold (build (PLUS_EXPR, integer_type_node, save_area, build_int_2 (4, 0))); t = build1 (NOP_EXPR, ptr_type_node, save_area); - u = build (ARRAY_REF, ptr_type_node, reg_field, build_int (2, 0)); + u = build (ARRAY_REF, ptr_type_node, reg_field, build_int_2 (2, 0)); t = build (MODIFY_EXPR, ptr_type_node, u, t); TREE_SIDE_EFFECTS (t) = 1; expand_expr (t, const0_rtx, VOIDmode, EXPAND_NORMAL); @@ -531,7 +532,7 @@ clipper_va_start (stdarg_p, valist, nextarg) t = fold (build (PLUS_EXPR, integer_type_node, save_area, build_int_2 (16, 0))); t = build1 (NOP_EXPR, ptr_type_node, save_area); - u = build (ARRAY_REF, ptr_type_node, reg_field, build_int (3, 0)); + u = build (ARRAY_REF, ptr_type_node, reg_field, build_int_2 (3, 0)); t = build (MODIFY_EXPR, ptr_type_node, u, t); TREE_SIDE_EFFECTS (t) = 1; expand_expr (t, const0_rtx, VOIDmode, EXPAND_NORMAL); diff --git a/gcc/config/clipper/clipper.h b/gcc/config/clipper/clipper.h index e73ebfcc586..32b2155a30c 100644 --- a/gcc/config/clipper/clipper.h +++ b/gcc/config/clipper/clipper.h @@ -1,5 +1,5 @@ /* Definitions of target machine for GNU compiler. Clipper version. - Copyright (C) 1987, 88, 91, 93-96, 1998, 1999 Free Software Foundation, Inc. + Copyright (C) 1987, 88, 91, 93-96, 98, 99, 2000 Free Software Foundation, Inc. Contributed by Holger Teutsch (holger@hotbso.rhein-main.de) This file is part of GNU CC. @@ -19,9 +19,6 @@ 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. */ -extern struct rtx_def *clipper_builtin_saveregs (); -extern int clipper_frame_size (); - /* Print subsidiary information on the compiler version in use. */ #define TARGET_VERSION fprintf (stderr, " (clipper)"); @@ -209,7 +206,7 @@ extern int target_flags; #define HARD_REGNO_MODE_OK(REGNO, MODE) \ ((REGNO) < 16 \ - ? ((MODE) != DImode && (MODE) != DFmode || ((REGNO) & 1) == 0) \ + ? (((MODE) != DImode && (MODE) != DFmode) || ((REGNO) & 1) == 0) \ : ((MODE) == SFmode || (MODE) == DFmode)) /* Value is 1 if it is a good idea to tie two pseudo registers @@ -282,7 +279,7 @@ enum reg_class { NO_REGS, GENERAL_REGS, FLOAT_REGS, ALL_REGS, LIM_REG_CLASSES}; This is an initializer for a vector of HARD_REG_SET of length N_REG_CLASSES. */ -#define REG_CLASS_CONTENTS {0, 0x0000ffff, 0xffff0000, 0xffffffff} +#define REG_CLASS_CONTENTS { {0}, {0x0000ffff}, {0xffff0000}, {0xffffffff} } /* The same information, inverted: Return the class number of the smallest class containing @@ -921,8 +918,8 @@ do \ { \ case CC_CHANGE0: \ if (GET_CODE (EXP) == PARALLEL) abort(); \ - if (cc_status.value1 && rtx_equal_p (dest, cc_status.value1) || \ - cc_status.value2 && rtx_equal_p (dest, cc_status.value2)) \ + if ((cc_status.value1 && rtx_equal_p (dest, cc_status.value1)) || \ + (cc_status.value2 && rtx_equal_p (dest, cc_status.value2))) \ CC_STATUS_INIT; \ break; \ \ @@ -1104,8 +1101,7 @@ Clipper operand formatting codes: ((CODE) == 'C') #define PRINT_OPERAND(FILE, X, CODE) \ -{ extern char *rev_cond_name (); \ - if (CODE == 'C') \ +{ if (CODE == 'C') \ fputs (rev_cond_name (X), FILE); \ else if (GET_CODE (X) == REG) \ fprintf (FILE, "%s", reg_names[REGNO (X)]); \ |