diff --git a/gcc/ChangeLog b/gcc/ChangeLog index d1a86ab5a97..29f0ccfa82b 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,15 @@ +2000-01-14 Kaveh R. Ghazi + + * dsp16xx-protos.h: New file. + + * dsp16xx.c: Include tm_p.h. Add static prototypes. Fix compile + time warnings. + + * dsp16xx.h: Move prototypes to dsp16xx-protos.h. Fix compile time + warnings. + + * dsp16xx.md: Likewise. + 2000-01-14 Kaveh R. Ghazi * convex-protos.h: New file. diff --git a/gcc/config/dsp16xx/dsp16xx-protos.h b/gcc/config/dsp16xx/dsp16xx-protos.h new file mode 100644 index 00000000000..dc9295467c3 --- /dev/null +++ b/gcc/config/dsp16xx/dsp16xx-protos.h @@ -0,0 +1,85 @@ +/* Definitions of target machine for GNU compiler. AT&T DSP1600. + Copyright (C) 2000 Free Software Foundation, Inc. + Contributed by Michael Collison (collison@world.std.com). + +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 1, 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 struct rtx_def *gen_compare_reg PARAMS ((enum rtx_code, rtx, rtx)); +extern int call_address_operand PARAMS ((rtx, enum machine_mode)); +extern int arith_reg_operand PARAMS ((rtx, enum machine_mode)); +extern int symbolic_address_operand PARAMS ((rtx, enum machine_mode)); +extern int Y_address_operand PARAMS ((rtx, enum machine_mode)); +extern int sp_operand PARAMS ((rtx, enum machine_mode)); +extern int sp_operand2 PARAMS ((rtx, enum machine_mode)); +extern int nonmemory_arith_operand PARAMS ((rtx, enum machine_mode)); +extern int dsp16xx_comparison_operator PARAMS ((rtx, enum machine_mode)); + +extern void notice_update_cc PARAMS ((rtx)); +extern void double_reg_from_memory PARAMS ((rtx[])); +extern void double_reg_to_memory PARAMS ((rtx[])); +extern enum rtx_code next_cc_user_code PARAMS ((rtx)); +extern int next_cc_user_unsigned PARAMS ((rtx)); +extern struct rtx_def *gen_tst_reg PARAMS ((rtx)); +extern const char *output_block_move PARAMS ((rtx[])); +extern enum reg_class preferred_reload_class PARAMS ((rtx, enum reg_class)); +extern enum reg_class secondary_reload_class PARAMS ((enum reg_class, + enum machine_mode, rtx)); +extern int emit_move_sequence PARAMS ((rtx *, enum machine_mode)); +extern void print_operand PARAMS ((FILE *, rtx, int)); +extern void print_operand_address PARAMS ((FILE *, rtx)); +extern void output_dsp16xx_float_const PARAMS ((rtx *)); +extern void emit_1600_core_shift PARAMS ((enum rtx_code, rtx *, int)); +extern int dsp16xx_address_cost PARAMS ((rtx)); +extern int symbolic_address_p PARAMS ((rtx)); +#endif /* RTX_CODE */ + + +#ifdef TREE_CODE +extern struct rtx_def *dsp16xx_function_arg PARAMS ((CUMULATIVE_ARGS, + enum machine_mode, + tree, int)); +extern void dsp16xx_function_arg_advance PARAMS ((CUMULATIVE_ARGS *, + enum machine_mode, + tree, int)); +#endif /* TREE_CODE */ + +extern void dsp16xx_invalid_register_for_compare PARAMS ((void)); +extern int class_max_nregs PARAMS ((enum reg_class, enum machine_mode)); +extern enum reg_class limit_reload_class PARAMS ((enum reg_class, enum machine_mode)); +extern int dsp16xx_register_move_cost PARAMS ((enum reg_class, enum reg_class)); +extern int dsp16xx_makes_calls PARAMS ((void)); +extern long compute_frame_size PARAMS ((int)); +extern int dsp16xx_call_saved_register PARAMS ((int)); +extern int dsp16xx_call_saved_register PARAMS ((int)); +extern void init_emulation_routines PARAMS ((void)); +extern int ybase_regs_ever_used PARAMS ((void)); +extern void override_options PARAMS ((void)); +extern int dsp16xx_starting_frame_offset PARAMS ((void)); +extern int initial_frame_pointer_offset PARAMS ((void)); +extern void asm_output_common PARAMS ((FILE *, const char *, int, int)); +extern void asm_output_local PARAMS ((FILE *, const char *, int, int)); +extern void asm_output_float PARAMS ((FILE *, double)); +extern void asm_output_long PARAMS ((FILE *, long)); +extern void dsp16xx_file_start PARAMS ((void)); +extern struct rtx_def *(*dsp16xx_compare_gen) PARAMS (()); +extern int hard_regno_mode_ok PARAMS ((int, enum machine_mode)); +extern enum reg_class dsp16xx_reg_class_from_letter PARAMS ((int)); +extern int regno_reg_class PARAMS ((int)); +extern void function_prologue PARAMS ((FILE *, int)); +extern void function_epilogue PARAMS ((FILE *, int)); diff --git a/gcc/config/dsp16xx/dsp16xx.c b/gcc/config/dsp16xx/dsp16xx.c index a0ca8c9c936..0c81dd13402 100644 --- a/gcc/config/dsp16xx/dsp16xx.c +++ b/gcc/config/dsp16xx/dsp16xx.c @@ -36,18 +36,21 @@ Boston, MA 02111-1307, USA. */ #include "function.h" #include "flags.h" #include "ggc.h" +#include "toplev.h" +#include "recog.h" +#include "tm_p.h" -char *text_seg_name; -char *rsect_text; -char *data_seg_name; -char *rsect_data; -char *bss_seg_name; -char *rsect_bss; -char *const_seg_name; -char *rsect_const; +const char *text_seg_name; +const char *rsect_text; +const char *data_seg_name; +const char *rsect_data; +const char *bss_seg_name; +const char *rsect_bss; +const char *const_seg_name; +const char *rsect_const; -char *chip_name; -char *save_chip_name; +const char *chip_name; +const char *save_chip_name; /* Save the operands of a compare. The 16xx has not lt or gt, so in these cases we swap the operands and reverse the condition */ @@ -56,10 +59,10 @@ rtx dsp16xx_compare_op0; rtx dsp16xx_compare_op1; struct rtx_def *(*dsp16xx_compare_gen)(); -static char *fp; -static char *sp; -static char *rr; -static char *a1h; +static const char *fp; +static const char *sp; +static const char *rr; +static const char *a1h; struct dsp16xx_frame_info current_frame_info; struct dsp16xx_frame_info zero_frame_info; @@ -87,14 +90,14 @@ rtx dsp16xx_ashlhi3_libcall = (rtx) 0; rtx dsp16xx_ucmphi2_libcall = (rtx) 0; rtx dsp16xx_lshrhi3_libcall = (rtx) 0; -char *himode_reg_name[] = HIMODE_REGISTER_NAMES; +static const char *const himode_reg_name[] = HIMODE_REGISTER_NAMES; #define SHIFT_INDEX_1 0 #define SHIFT_INDEX_4 1 #define SHIFT_INDEX_8 2 #define SHIFT_INDEX_16 3 -static char *ashift_right_asm[] = +static const char *const ashift_right_asm[] = { "%0=%0>>1", "%0=%0>>4", @@ -102,7 +105,7 @@ static char *ashift_right_asm[] = "%0=%0>>16" }; -static char *ashift_right_asm_first[] = +static const char *const ashift_right_asm_first[] = { "%0=%1>>1", "%0=%1>>4", @@ -110,7 +113,7 @@ static char *ashift_right_asm_first[] = "%0=%1>>16" }; -static char *ashift_left_asm[] = +static const char *const ashift_left_asm[] = { "%0=%0<<1", "%0=%0<<4", @@ -118,7 +121,7 @@ static char *ashift_left_asm[] = "%0=%0<<16" }; -static char *ashift_left_asm_first[] = +static const char *const ashift_left_asm_first[] = { "%0=%1<<1", "%0=%1<<4", @@ -126,7 +129,7 @@ static char *ashift_left_asm_first[] = "%0=%1<<16" }; -static char *lshift_right_asm[] = +static const char *const lshift_right_asm[] = { "%0=%0>>1\n\t%0=%b0&0x7fff", "%0=%0>>4\n\t%0=%b0&0x0fff", @@ -134,7 +137,7 @@ static char *lshift_right_asm[] = "%0=%0>>16\n\t%0=%b0&0x0000" }; -static char *lshift_right_asm_first[] = +static const char *const lshift_right_asm_first[] = { "%0=%1>>1\n\t%0=%b0&0x7fff", "%0=%1>>4\n\t%0=%b0&0x0fff", @@ -142,10 +145,12 @@ static char *lshift_right_asm_first[] = "%0=%1>>16\n\t%0=%b0&0x0000" }; +static int reg_save_size PARAMS ((void)); + int hard_regno_mode_ok (regno, mode) -int regno; -enum machine_mode mode; + int regno; + enum machine_mode mode; { switch ((int) mode) { @@ -186,7 +191,7 @@ enum machine_mode mode; enum reg_class dsp16xx_reg_class_from_letter (c) -int c; + int c; { switch (c) { @@ -272,7 +277,7 @@ int c; int regno_reg_class(regno) -int regno; + int regno; { switch (regno) { @@ -345,16 +350,16 @@ int regno; int class_max_nregs(class, mode) -enum reg_class class; -enum machine_mode mode; + enum reg_class class ATTRIBUTE_UNUSED; + enum machine_mode mode; { return (GET_MODE_SIZE(mode)); } enum reg_class limit_reload_class (mode, class) -enum machine_mode mode; -enum reg_class class; + enum machine_mode mode; + enum reg_class class; { switch ((int) class) { @@ -551,7 +556,7 @@ enum reg_class class; int dsp16xx_register_move_cost (from, to) -enum reg_class from, to; + enum reg_class from, to; { #if 0 if (from == NO_REGS || to == NO_REGS || (from == to)) @@ -870,15 +875,15 @@ secondary_reload_class (class, mode, in) int symbolic_address_operand (op, mode) -rtx op; -enum machine_mode mode; + rtx op; + enum machine_mode mode ATTRIBUTE_UNUSED; { - return (symbolic_address_p (op)); - + return (symbolic_address_p (op)); } -int symbolic_address_p (op) -rtx op; +int +symbolic_address_p (op) + rtx op; { switch (GET_CODE (op)) { @@ -904,16 +909,16 @@ rtx op; int Y_address_operand (op, mode) -rtx op; -enum machine_mode mode; + rtx op; + enum machine_mode mode; { - return (memory_address_p (mode, op) && !symbolic_address_p (op)); + return (memory_address_p (mode, op) && !symbolic_address_p (op)); } int sp_operand (op, mode) -rtx op; -enum machine_mode mode; + rtx op; + enum machine_mode mode ATTRIBUTE_UNUSED; { return (GET_CODE (op) == PLUS && (XEXP (op, 0) == stack_pointer_rtx @@ -923,8 +928,8 @@ enum machine_mode mode; int sp_operand2 (op, mode) -rtx op; -enum machine_mode mode; + rtx op; + enum machine_mode mode ATTRIBUTE_UNUSED; { if ((GET_CODE (op) == PLUS && (XEXP (op, 0) == stack_pointer_rtx @@ -944,16 +949,16 @@ enum machine_mode mode; int nonmemory_arith_operand (op, mode) -rtx op; -enum machine_mode mode; + rtx op; + enum machine_mode mode; { return (immediate_operand (op, mode) || arith_reg_operand (op, mode)); } int arith_reg_operand (op, mode) -rtx op; -enum machine_mode mode; + rtx op; + enum machine_mode mode; { return (register_operand (op, mode) && (GET_CODE (op) != REG @@ -964,8 +969,8 @@ enum machine_mode mode; int call_address_operand (op, mode) -rtx op; -enum machine_mode mode; + rtx op; + enum machine_mode mode ATTRIBUTE_UNUSED; { if (symbolic_address_p (op) || REG_P(op)) { @@ -988,7 +993,7 @@ dsp16xx_comparison_operator (op, mode) void notice_update_cc(exp) -rtx exp; + rtx exp; { if (GET_CODE (exp) == SET) { @@ -1104,8 +1109,9 @@ dsp16xx_makes_calls () return 0; } -long compute_frame_size (size) -int size; +long +compute_frame_size (size) + int size; { long total_size; long var_size; @@ -1144,7 +1150,7 @@ int size; int dsp16xx_call_saved_register (regno) -int regno; + int regno; { return (regs_ever_live[regno] && !call_used_regs[regno] && !IS_YBASE_REGISTER_WINDOW(regno)); @@ -1169,8 +1175,8 @@ ybase_regs_ever_used () void function_prologue (file, size) -FILE *file; -int size; + FILE *file; + int size; { int regno; long total_size; @@ -1182,14 +1188,14 @@ int size; total_size = compute_frame_size (size); fprintf( file, "\t/* FUNCTION PROLOGUE: */\n" ); - fprintf (file, "\t/* total=%d, vars= %d, regs= %d, args=%d, extra= %d */\n", + fprintf (file, "\t/* total=%ld, vars= %ld, regs= %d, args=%d, extra= %ld */\n", current_frame_info.total_size, current_frame_info.var_size, current_frame_info.reg_size, current_function_outgoing_args_size, current_frame_info.extra_size); - fprintf (file, "\t/* fp save offset= %d, sp save_offset= %d */\n\n", + fprintf (file, "\t/* fp save offset= %ld, sp save_offset= %ld */\n\n", current_frame_info.fp_save_offset, current_frame_info.sp_save_offset); /* Set up the 'ybase' register window. */ @@ -1217,7 +1223,7 @@ int size; else { if(SMALL_INTVAL(current_frame_info.var_size) && ((current_frame_info.var_size & 0x8000) == 0)) - fprintf (file, "\t%s=%d\n\t*%s++%s\n", reg_names[REG_J], current_frame_info.var_size, sp, reg_names[REG_J]); + fprintf (file, "\t%s=%ld\n\t*%s++%s\n", reg_names[REG_J], current_frame_info.var_size, sp, reg_names[REG_J]); else fatal ("Stack size > 32k"); } @@ -1244,7 +1250,7 @@ int size; else { if(SMALL_INTVAL(current_frame_info.args_size) && ((current_frame_info.args_size & 0x8000) == 0)) - fprintf (file, "\t%s=%d\n\t*%s++%s\n", reg_names[REG_J], current_frame_info.args_size, sp, reg_names[REG_J]); + fprintf (file, "\t%s=%ld\n\t*%s++%s\n", reg_names[REG_J], current_frame_info.args_size, sp, reg_names[REG_J]); else fatal ("Stack size > 32k"); } @@ -1254,7 +1260,7 @@ int size; { fprintf( file, "\t%s=%s\n", a1h, sp ); fprintf( file, "\t%s=%s\n", fp, a1h ); /* Establish new base frame */ - fprintf( file, "\t%s=%d\n", reg_names[REG_J], -total_size); + fprintf( file, "\t%s=%ld\n", reg_names[REG_J], -total_size); fprintf( file, "\t*%s++%s\n", fp, reg_names[REG_J]); } @@ -1290,11 +1296,13 @@ init_emulation_routines () } void function_epilogue (file, size) -FILE *file; -int size; + FILE *file; + int size ATTRIBUTE_UNUSED; { int regno; +#if OLD_REGISTER_SAVE int initial_stack_dec = 0; +#endif fp = reg_names[FRAME_POINTER_REGNUM]; sp = reg_names[STACK_POINTER_REGNUM]; @@ -1309,7 +1317,7 @@ int size; fprintf (file, "\t*%s--\n", sp); else { - fprintf (file, "\t%s=%d\n\t*%s++%s\n", + fprintf (file, "\t%s=%ld\n\t*%s++%s\n", reg_names[REG_J], -current_frame_info.args_size, sp, reg_names[REG_J]); } } @@ -1356,7 +1364,7 @@ int size; fprintf (file, "\t*%s--\n", sp); else { - fprintf (file, "\t%s=%d\n\t*%s++%s\n", + fprintf (file, "\t%s=%ld\n\t*%s++%s\n", reg_names[REG_J], -current_frame_info.var_size, sp, reg_names[REG_J]); } } @@ -1391,7 +1399,7 @@ emit_move_sequence (operands, mode) void double_reg_from_memory (operands) -rtx operands[]; + rtx operands[]; { rtx xoperands[4]; @@ -1412,7 +1420,6 @@ rtx operands[]; else if (GET_CODE(XEXP(operands[1],0)) == PLUS) { rtx addr; - rtx base; int offset; output_asm_insn ("%u0=%1", operands); @@ -1440,7 +1447,7 @@ rtx operands[]; void double_reg_to_memory (operands) -rtx operands[]; + rtx operands[]; { rtx xoperands[4]; @@ -1491,6 +1498,8 @@ rtx operands[]; void override_options () { + char *tmp; + if (chip_name == (char *) 0) chip_name = DEFAULT_CHIP_NAME; @@ -1508,19 +1517,21 @@ override_options () save_chip_name = xstrdup (chip_name); - rsect_text = (char *) xmalloc (strlen(".rsect ") + - strlen(text_seg_name) + 3); - rsect_data = (char *) xmalloc (strlen(".rsect ") + - strlen(data_seg_name) + 3); - rsect_bss = (char *) xmalloc (strlen(".rsect ") + - strlen(bss_seg_name) + 3); - rsect_const = (char *) xmalloc (strlen(".rsect ") + - strlen(const_seg_name) + 3); - - sprintf (rsect_text, ".rsect \"%s\"", text_seg_name); - sprintf (rsect_data, ".rsect \"%s\"", data_seg_name); - sprintf (rsect_bss, ".rsect \"%s\"", bss_seg_name); - sprintf (rsect_const, ".rsect \"%s\"", const_seg_name); + rsect_text = tmp = (char *) xmalloc (strlen(".rsect ") + + strlen(text_seg_name) + 3); + sprintf (tmp, ".rsect \"%s\"", text_seg_name); + + rsect_data = tmp = (char *) xmalloc (strlen(".rsect ") + + strlen(data_seg_name) + 3); + sprintf (tmp, ".rsect \"%s\"", data_seg_name); + + rsect_bss = tmp = (char *) xmalloc (strlen(".rsect ") + + strlen(bss_seg_name) + 3); + sprintf (tmp, ".rsect \"%s\"", bss_seg_name); + + rsect_const = tmp = (char *) xmalloc (strlen(".rsect ") + + strlen(const_seg_name) + 3); + sprintf (tmp, ".rsect \"%s\"", const_seg_name); if (optimize) { @@ -1558,7 +1569,7 @@ override_options () enum rtx_code next_cc_user_code (insn) -rtx insn; + rtx insn; { if ( !(insn = next_cc0_user (insn))) abort (); @@ -1592,9 +1603,9 @@ next_cc_user_unsigned (insn) void print_operand(file, op, letter) -FILE *file; -rtx op; -int letter; + FILE *file; + rtx op; + int letter; { enum rtx_code code; @@ -1688,8 +1699,8 @@ int letter; void print_operand_address(file, addr) -FILE *file; -rtx addr; + FILE *file; + rtx addr; { rtx base; int offset; @@ -1733,9 +1744,8 @@ rtx addr; void output_dsp16xx_float_const(operands) -rtx *operands; + rtx *operands; { - rtx dst = operands[0]; rtx src = operands[1]; #if HOST_FLOAT_FORMAT == TARGET_FLOAT_FORMAT @@ -1752,7 +1762,7 @@ rtx *operands; #endif } -int +static int reg_save_size () { int reg_save_size = 0; @@ -1785,8 +1795,6 @@ dsp16xx_starting_frame_offset() int initial_frame_pointer_offset() { - int frame_size; - int regno; int offset = 0; offset = compute_frame_size (get_frame_size()); @@ -1804,10 +1812,10 @@ initial_frame_pointer_offset() #if 0 void emit_1600_core_shift (shift_op, operands, shift_amount, mode) -enum rtx_code shift_op; -rtx *operands; -int shift_amount; -enum machine_mode mode; + enum rtx_code shift_op; + rtx *operands; + int shift_amount; + enum machine_mode mode; { int quotient; int i; @@ -1868,15 +1876,15 @@ enum machine_mode mode; #else void emit_1600_core_shift (shift_op, operands, shift_amount) -enum rtx_code shift_op; -rtx *operands; -int shift_amount; + enum rtx_code shift_op; + rtx *operands; + int shift_amount; { int quotient; int i; int first_shift_emitted = 0; - char **shift_asm_ptr; - char **shift_asm_ptr_first; + const char * const *shift_asm_ptr; + const char * const *shift_asm_ptr_first; if (shift_op == ASHIFT) { @@ -1938,11 +1946,11 @@ int shift_amount; } #endif void - asm_output_common(file, name, size, rounded) -FILE *file; -char *name; -int size; -int rounded; +asm_output_common(file, name, size, rounded) + FILE *file; + const char *name; + int size ATTRIBUTE_UNUSED; + int rounded; { bss_section (); ASM_GLOBALIZE_LABEL (file, name); @@ -1956,10 +1964,10 @@ int rounded; void asm_output_local(file, name, size, rounded) -FILE *file; -char *name; -int size; -int rounded; + FILE *file; + const char *name; + int size ATTRIBUTE_UNUSED; + int rounded; { bss_section (); assemble_name (file, name); @@ -1972,8 +1980,8 @@ int rounded; void asm_output_float (file, fp_const) -FILE *file; -double fp_const; + FILE *file; + double fp_const; { #if HOST_FLOAT_FORMAT == TARGET_FLOAT_FORMAT REAL_VALUE_TYPE d = fp_const; @@ -1982,9 +1990,9 @@ double fp_const; REAL_VALUE_TO_TARGET_SINGLE (d, value); fputs ("\tint ", file); #ifdef WORDS_BIG_ENDIAN - fprintf (file, "0x%-4.4x, 0x%-4.4x", (value >> 16) & 0xffff, (value & 0xffff)); + fprintf (file, "0x%-4.4lx, 0x%-4.4lx", (value >> 16) & 0xffff, (value & 0xffff)); #else - fprintf (file, "0x%-4.4x, 0x%-4.4x", (value & 0xffff), (value >> 16) & 0xffff); + fprintf (file, "0x%-4.4lx, 0x%-4.4lx", (value & 0xffff), (value >> 16) & 0xffff); #endif fputs ("\n", file); #else @@ -1994,21 +2002,21 @@ double fp_const; void asm_output_long (file, value) -FILE *file; -long value; + FILE *file; + long value; { fputs ("\tint ", file); #ifdef WORDS_BIG_ENDIAN - fprintf (file, "0x%-4.4x, 0x%-4.4x", (value >> 16) & 0xffff, (value & 0xffff)); + fprintf (file, "0x%-4.4lx, 0x%-4.4lx", (value >> 16) & 0xffff, (value & 0xffff)); #else - fprintf (file, "0x%-4.4x, 0x%-4.4x", (value & 0xffff), (value >> 16) & 0xffff); + fprintf (file, "0x%-4.4lx, 0x%-4.4lx", (value & 0xffff), (value >> 16) & 0xffff); #endif fputs ("\n", file); } int dsp16xx_address_cost (addr) -rtx addr; + rtx addr; { switch (GET_CODE (addr)) { @@ -2129,7 +2137,7 @@ dsp16xx_function_arg_advance (cum, mode, type, named) CUMULATIVE_ARGS *cum; /* current arg information */ enum machine_mode mode; /* current arg mode */ tree type; /* type of the argument or 0 if lib support */ - int named; /* whether or not the argument was named */ + int named ATTRIBUTE_UNUSED;/* whether or not the argument was named */ { if (TARGET_REGPARM) { @@ -2259,7 +2267,7 @@ gen_compare_reg (code, x, y) return cc0_rtx; } -char * +const char * output_block_move (operands) rtx operands[]; { diff --git a/gcc/config/dsp16xx/dsp16xx.h b/gcc/config/dsp16xx/dsp16xx.h index 625deaffc4d..26a69318c7e 100644 --- a/gcc/config/dsp16xx/dsp16xx.h +++ b/gcc/config/dsp16xx/dsp16xx.h @@ -19,20 +19,18 @@ 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 char *low_reg_names[]; -extern char *text_seg_name; -extern char *rsect_text; -extern char *data_seg_name; -extern char *rsect_data; -extern char *bss_seg_name; -extern char *rsect_bss; -extern char *const_seg_name; -extern char *rsect_const; -extern char *chip_name; -extern char *save_chip_name; +extern const char *low_reg_names[]; +extern const char *text_seg_name; +extern const char *rsect_text; +extern const char *data_seg_name; +extern const char *rsect_data; +extern const char *bss_seg_name; +extern const char *rsect_bss; +extern const char *const_seg_name; +extern const char *rsect_const; +extern const char *chip_name; +extern const char *save_chip_name; extern struct rtx_def *dsp16xx_compare_op0, *dsp16xx_compare_op1; -extern struct rtx_def *(*dsp16xx_compare_gen)(); -extern struct rtx_def *gen_compare_reg(); extern struct rtx_def *dsp16xx_addhf3_libcall; extern struct rtx_def *dsp16xx_subhf3_libcall; extern struct rtx_def *dsp16xx_mulhf3_libcall; @@ -56,29 +54,6 @@ extern struct rtx_def *dsp16xx_ashrhi3_libcall; extern struct rtx_def *dsp16xx_ashlhi3_libcall; extern struct rtx_def *dsp16xx_lshrhi3_libcall; - -extern int hard_regno_mode_ok (); -extern enum reg_class dsp16xx_reg_class_from_letter (); -extern enum reg_class dsp16xx_limit_reload_class (); -extern int hard_regno_nregs (); -extern int regno_reg_class (); -extern int move_operand (); -extern int symbolic_address_p (); -extern int Y_address (); -extern int call_address_operand (); -extern void notice_update_cc(); -extern void function_prologue (); -extern void function_epilogue (); -extern int dsp1600_comparison_reverse (); -extern void double_reg_from_memory (); -extern void double_reg_to_memory (); -extern struct rtx_def *dsp16xx_function_arg (); -extern void dsp16xx_function_arg_advance (); -extern enum rtx_code next_cc_user_code (); -extern int next_cc_user_unsigned (); -extern struct rtx_def *gen_tst_reg (); -extern char *output_block_move(); - /* RUN-TIME TARGET SPECIFICATION */ #define DSP16XX 1 @@ -1671,11 +1646,11 @@ const_section () \ #define ASM_OUTPUT_ASCII(MYFILE, MYSTRING, MYLENGTH) \ do { \ FILE *_hide_asm_out_file = (MYFILE); \ - unsigned char *_hide_p = (unsigned char *) (MYSTRING); \ + const unsigned char *_hide_p = (const unsigned char *) (MYSTRING); \ int _hide_thissize = (MYLENGTH); \ { \ FILE *asm_out_file = _hide_asm_out_file; \ - unsigned char *p = _hide_p; \ + const unsigned char *p = _hide_p; \ int thissize = _hide_thissize; \ int i; \ \ @@ -1970,4 +1945,3 @@ const_section () \ are not currently supporting c++. */ #define INIT_SECTION_ASM_OP 1 -void dsp16xx_invalid_register_for_compare (); diff --git a/gcc/config/dsp16xx/dsp16xx.md b/gcc/config/dsp16xx/dsp16xx.md index 5ded3bb956a..8f9646737ba 100644 --- a/gcc/config/dsp16xx/dsp16xx.md +++ b/gcc/config/dsp16xx/dsp16xx.md @@ -117,6 +117,8 @@ case 2: return \"%0&%H1\"; + default: + abort(); } }" [(set_attr "type" "f3_alu,malu,f3_alu_i")]) @@ -405,6 +407,8 @@ case 7: return \"%3=%2\;*%0++%3\"; + default: + abort(); } }") @@ -485,6 +489,8 @@ case 3: case 4: return \"%m0=%m1-%m2\"; + default: + abort(); } }") @@ -921,6 +927,8 @@ case 8: case 9: return \"\"; + default: + abort(); } }" [(set_attr "type" "move,move,load_i,load_i,load,store,load,store,move,move")]) @@ -986,6 +994,8 @@ case 9: case 10: return \"%0=%1\"; + default: + abort(); } }") @@ -1032,6 +1042,8 @@ case 9: case 10: return \"%0=%1\"; + default: + abort(); } }") @@ -1187,6 +1199,8 @@ case 5: case 6: return \"%u0=%u1\;%w0=%w1\"; + default: + abort(); } }" [(set_attr "type" "move,move,load_i,load,store,load,store")])