Commit e2fe6aba by Kaveh R. Ghazi Committed by Kaveh Ghazi

mips.c (abort_with_insn): Make function static...

        * mips.c (abort_with_insn): Make function static, add a prototype,
        constify 2nd parameter and mark with ATTRIBUTE_NORETURN.
        (current_function_file, mips_cpu_string, mips_isa_string,
        mips_abi_string, mips_no_mips16_string, mips_entry_string,
        mips_move_1word, mips_move_2words, output_block_move, load_store,
        override_options, make_temp_file, mips16_fp_args): Qualify a char*
        with the `const' keyword.
        * mips.h (current_function_file, mips_cpu_string, mips_isa_string,
        mips_abi_string, mips_entry_string, mips_no_mips16_string,
        mips_move_1word, mips_move_2words, output_block_move): Likewise.
        (abort_with_insn): Remove extern prototype.
        * mips.md: Qualify a char* with the `const' keyword.
        Remove many unused variables named `label'.

From-SVN: r25531
parent 9fc9b82a
Tue Mar 2 10:00:21 1999 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
* mips.c (abort_with_insn): Make function static, add a prototype,
constify 2nd parameter and mark with ATTRIBUTE_NORETURN.
(current_function_file, mips_cpu_string, mips_isa_string,
mips_abi_string, mips_no_mips16_string, mips_entry_string,
mips_move_1word, mips_move_2words, output_block_move, load_store,
override_options, make_temp_file, mips16_fp_args): Qualify a char*
with the `const' keyword.
* mips.h (current_function_file, mips_cpu_string, mips_isa_string,
mips_abi_string, mips_entry_string, mips_no_mips16_string,
mips_move_1word, mips_move_2words, output_block_move): Likewise.
(abort_with_insn): Remove extern prototype.
* mips.md: Qualify a char* with the `const' keyword.
Remove many unused variables named `label'.
Tue Mar 2 01:27:52 1999 H.J. Lu (hjl@gnu.org) Tue Mar 2 01:27:52 1999 H.J. Lu (hjl@gnu.org)
* Makefile.in (cpp_install_dir, INSTALL_CPP, UNINSTALL_CPP): New * Makefile.in (cpp_install_dir, INSTALL_CPP, UNINSTALL_CPP): New
......
...@@ -106,6 +106,8 @@ static rtx add_constant PROTO ((struct constant **, ...@@ -106,6 +106,8 @@ static rtx add_constant PROTO ((struct constant **,
static void dump_constants PROTO ((struct constant *, static void dump_constants PROTO ((struct constant *,
rtx)); rtx));
static rtx mips_find_symbol PROTO ((rtx)); static rtx mips_find_symbol PROTO ((rtx));
static void abort_with_insn PROTO ((rtx, const char *))
ATTRIBUTE_NORETURN;
/* Global variables for machine-dependent things. */ /* Global variables for machine-dependent things. */
...@@ -148,7 +150,7 @@ struct extern_list ...@@ -148,7 +150,7 @@ struct extern_list
} *extern_head = 0; } *extern_head = 0;
/* Name of the file containing the current function. */ /* Name of the file containing the current function. */
char *current_function_file = ""; const char *current_function_file = "";
/* Warning given that Mips ECOFF can't support changing files /* Warning given that Mips ECOFF can't support changing files
within a function. */ within a function. */
...@@ -206,9 +208,9 @@ int mips_abi; ...@@ -206,9 +208,9 @@ int mips_abi;
#endif #endif
/* Strings to hold which cpu and instruction set architecture to use. */ /* Strings to hold which cpu and instruction set architecture to use. */
char *mips_cpu_string; /* for -mcpu=<xxx> */ const char *mips_cpu_string; /* for -mcpu=<xxx> */
char *mips_isa_string; /* for -mips{1,2,3,4} */ const char *mips_isa_string; /* for -mips{1,2,3,4} */
char *mips_abi_string; /* for -mabi={32,n32,64,eabi} */ const char *mips_abi_string; /* for -mabi={32,n32,64,eabi} */
/* Whether we are generating mips16 code. This is a synonym for /* Whether we are generating mips16 code. This is a synonym for
TARGET_MIPS16, and exists for use as an attribute. */ TARGET_MIPS16, and exists for use as an attribute. */
...@@ -217,7 +219,7 @@ int mips16; ...@@ -217,7 +219,7 @@ int mips16;
/* This variable is set by -mno-mips16. We only care whether /* This variable is set by -mno-mips16. We only care whether
-mno-mips16 appears or not, and using a string in this fashion is -mno-mips16 appears or not, and using a string in this fashion is
just a way to avoid using up another bit in target_flags. */ just a way to avoid using up another bit in target_flags. */
char *mips_no_mips16_string; const char *mips_no_mips16_string;
/* Whether we are generating mips16 hard float code. In mips16 mode /* Whether we are generating mips16 hard float code. In mips16 mode
we always set TARGET_SOFT_FLOAT; this variable is nonzero if we always set TARGET_SOFT_FLOAT; this variable is nonzero if
...@@ -228,7 +230,7 @@ int mips16_hard_float; ...@@ -228,7 +230,7 @@ int mips16_hard_float;
/* This variable is set by -mentry. We only care whether -mentry /* This variable is set by -mentry. We only care whether -mentry
appears or not, and using a string in this fashion is just a way to appears or not, and using a string in this fashion is just a way to
avoid using up another bit in target_flags. */ avoid using up another bit in target_flags. */
char *mips_entry_string; const char *mips_entry_string;
/* Whether we should entry and exit pseudo-ops in mips16 mode. */ /* Whether we should entry and exit pseudo-ops in mips16 mode. */
int mips_entry; int mips_entry;
...@@ -1649,13 +1651,13 @@ embedded_pic_offset (x) ...@@ -1649,13 +1651,13 @@ embedded_pic_offset (x)
/* Return the appropriate instructions to move one operand to another. */ /* Return the appropriate instructions to move one operand to another. */
char * const char *
mips_move_1word (operands, insn, unsignedp) mips_move_1word (operands, insn, unsignedp)
rtx operands[]; rtx operands[];
rtx insn; rtx insn;
int unsignedp; int unsignedp;
{ {
char *ret = 0; const char *ret = 0;
rtx op0 = operands[0]; rtx op0 = operands[0];
rtx op1 = operands[1]; rtx op1 = operands[1];
enum rtx_code code0 = GET_CODE (op0); enum rtx_code code0 = GET_CODE (op0);
...@@ -2043,12 +2045,12 @@ mips_move_1word (operands, insn, unsignedp) ...@@ -2043,12 +2045,12 @@ mips_move_1word (operands, insn, unsignedp)
/* Return the appropriate instructions to move 2 words */ /* Return the appropriate instructions to move 2 words */
char * const char *
mips_move_2words (operands, insn) mips_move_2words (operands, insn)
rtx operands[]; rtx operands[];
rtx insn; rtx insn;
{ {
char *ret = 0; const char *ret = 0;
rtx op0 = operands[0]; rtx op0 = operands[0];
rtx op1 = operands[1]; rtx op1 = operands[1];
enum rtx_code code0 = GET_CODE (operands[0]); enum rtx_code code0 = GET_CODE (operands[0]);
...@@ -3224,7 +3226,7 @@ expand_block_move (operands) ...@@ -3224,7 +3226,7 @@ expand_block_move (operands)
BLOCK_MOVE_NOT_LAST Do all but the last store. BLOCK_MOVE_NOT_LAST Do all but the last store.
BLOCK_MOVE_LAST Do just the last store. */ BLOCK_MOVE_LAST Do just the last store. */
char * const char *
output_block_move (insn, operands, num_regs, move_type) output_block_move (insn, operands, num_regs, move_type)
rtx insn; rtx insn;
rtx operands[]; rtx operands[];
...@@ -3244,11 +3246,11 @@ output_block_move (insn, operands, num_regs, move_type) ...@@ -3244,11 +3246,11 @@ output_block_move (insn, operands, num_regs, move_type)
rtx xoperands[10]; rtx xoperands[10];
struct { struct {
char *load; /* load insn without nop */ const char *load; /* load insn without nop */
char *load_nop; /* load insn with trailing nop */ const char *load_nop; /* load insn with trailing nop */
char *store; /* store insn */ const char *store; /* store insn */
char *final; /* if last_store used: NULL or swr */ const char *final; /* if last_store used: NULL or swr */
char *last_store; /* last store instruction */ const char *last_store; /* last store instruction */
int offset; /* current offset */ int offset; /* current offset */
enum machine_mode mode; /* mode to use on (MEM) */ enum machine_mode mode; /* mode to use on (MEM) */
} load_store[4]; } load_store[4];
...@@ -3982,10 +3984,10 @@ function_arg_partial_nregs (cum, mode, type, named) ...@@ -3982,10 +3984,10 @@ function_arg_partial_nregs (cum, mode, type, named)
/* Abort after printing out a specific insn. */ /* Abort after printing out a specific insn. */
void static void
abort_with_insn (insn, reason) abort_with_insn (insn, reason)
rtx insn; rtx insn;
char *reason; const char *reason;
{ {
error (reason); error (reason);
debug_rtx (insn); debug_rtx (insn);
...@@ -4172,7 +4174,7 @@ override_options () ...@@ -4172,7 +4174,7 @@ override_options ()
else else
{ {
char *p = mips_cpu_string; const char *p = mips_cpu_string;
int seen_v = 0; int seen_v = 0;
/* We need to cope with the various "vr" prefixes for the NEC 4300 /* We need to cope with the various "vr" prefixes for the NEC 4300
...@@ -5076,7 +5078,7 @@ static FILE * ...@@ -5076,7 +5078,7 @@ static FILE *
make_temp_file () make_temp_file ()
{ {
FILE *stream; FILE *stream;
char *base = getenv ("TMPDIR"); const char *base = getenv ("TMPDIR");
int len; int len;
if (base == 0) if (base == 0)
...@@ -7469,7 +7471,7 @@ mips16_fp_args (file, fp_code, from_fp_p) ...@@ -7469,7 +7471,7 @@ mips16_fp_args (file, fp_code, from_fp_p)
int fp_code; int fp_code;
int from_fp_p; int from_fp_p;
{ {
char *s; const char *s;
int gparg, fparg; int gparg, fparg;
unsigned int f; unsigned int f;
......
...@@ -116,7 +116,7 @@ enum block_move_type { ...@@ -116,7 +116,7 @@ enum block_move_type {
extern char mips_reg_names[][8]; /* register names (a0 vs. $4). */ extern char mips_reg_names[][8]; /* register names (a0 vs. $4). */
extern char mips_print_operand_punct[]; /* print_operand punctuation chars */ extern char mips_print_operand_punct[]; /* print_operand punctuation chars */
extern char *current_function_file; /* filename current function is in */ extern const char *current_function_file; /* filename current function is in */
extern int num_source_filenames; /* current .file # */ extern int num_source_filenames; /* current .file # */
extern int inside_function; /* != 0 if inside of a function */ extern int inside_function; /* != 0 if inside of a function */
extern int ignore_line_number; /* != 0 if we are to ignore next .loc */ extern int ignore_line_number; /* != 0 if we are to ignore next .loc */
...@@ -141,11 +141,11 @@ extern int mips_isa; /* architectural level */ ...@@ -141,11 +141,11 @@ extern int mips_isa; /* architectural level */
extern int mips16; /* whether generating mips16 code */ extern int mips16; /* whether generating mips16 code */
extern int mips16_hard_float; /* mips16 without -msoft-float */ extern int mips16_hard_float; /* mips16 without -msoft-float */
extern int mips_entry; /* generate entry/exit for mips16 */ extern int mips_entry; /* generate entry/exit for mips16 */
extern char *mips_cpu_string; /* for -mcpu=<xxx> */ extern const char *mips_cpu_string; /* for -mcpu=<xxx> */
extern char *mips_isa_string; /* for -mips{1,2,3,4} */ extern const char *mips_isa_string; /* for -mips{1,2,3,4} */
extern char *mips_abi_string; /* for -mabi={32,n32,64} */ extern const char *mips_abi_string; /* for -mabi={32,n32,64} */
extern char *mips_entry_string; /* for -mentry */ extern const char *mips_entry_string; /* for -mentry */
extern char *mips_no_mips16_string; /* for -mno-mips16 */ extern const char *mips_no_mips16_string;/* for -mno-mips16 */
extern int mips_split_addresses; /* perform high/lo_sum support */ extern int mips_split_addresses; /* perform high/lo_sum support */
extern int dslots_load_total; /* total # load related delay slots */ extern int dslots_load_total; /* total # load related delay slots */
extern int dslots_load_filled; /* # filled load delay slots */ extern int dslots_load_filled; /* # filled load delay slots */
...@@ -178,7 +178,6 @@ extern struct rtx_def *mips16_gp_pseudo_rtx; /* psuedo reg holding $gp */ ...@@ -178,7 +178,6 @@ extern struct rtx_def *mips16_gp_pseudo_rtx; /* psuedo reg holding $gp */
#endif #endif
extern void abort_with_insn ();
extern int arith32_operand (); extern int arith32_operand ();
extern int arith_operand (); extern int arith_operand ();
extern int cmp_op (); extern int cmp_op ();
...@@ -212,14 +211,14 @@ extern void mips_expand_epilogue (); ...@@ -212,14 +211,14 @@ extern void mips_expand_epilogue ();
extern void mips_expand_prologue (); extern void mips_expand_prologue ();
extern int mips_check_split (); extern int mips_check_split ();
extern char *mips_fill_delay_slot (); extern char *mips_fill_delay_slot ();
extern char *mips_move_1word (); extern const char *mips_move_1word ();
extern char *mips_move_2words (); extern const char *mips_move_2words ();
extern void mips_output_double (); extern void mips_output_double ();
extern int mips_output_external (); extern int mips_output_external ();
extern void mips_output_float (); extern void mips_output_float ();
extern void mips_output_filename (); extern void mips_output_filename ();
extern void mips_output_lineno (); extern void mips_output_lineno ();
extern char *output_block_move (); extern const char *output_block_move ();
extern void override_options (); extern void override_options ();
extern int pc_or_label_operand (); extern int pc_or_label_operand ();
extern void print_operand_address (); extern void print_operand_address ();
......
...@@ -1735,7 +1735,7 @@ ...@@ -1735,7 +1735,7 @@
&& !TARGET_MIPS16" && !TARGET_MIPS16"
"* "*
{ {
static char *const madd[] = { \"madd\\t%1,%2\", \"madd\\t%0,%1,%2\" }; static const char *const madd[] = { \"madd\\t%1,%2\", \"madd\\t%0,%1,%2\" };
if (which_alternative == 2) if (which_alternative == 2)
return \"#\"; return \"#\";
return madd[which_alternative]; return madd[which_alternative];
...@@ -2241,8 +2241,6 @@ ...@@ -2241,8 +2241,6 @@
"optimize" "optimize"
" "
{ {
rtx label;
emit_insn (gen_divmodsi4_internal (operands[0], operands[1], operands[2], emit_insn (gen_divmodsi4_internal (operands[0], operands[1], operands[2],
operands[3])); operands[3]));
if (!TARGET_NO_CHECK_ZERO_DIV) if (!TARGET_NO_CHECK_ZERO_DIV)
...@@ -2291,8 +2289,6 @@ ...@@ -2291,8 +2289,6 @@
"TARGET_64BIT && optimize" "TARGET_64BIT && optimize"
" "
{ {
rtx label;
emit_insn (gen_divmoddi4_internal (operands[0], operands[1], operands[2], emit_insn (gen_divmoddi4_internal (operands[0], operands[1], operands[2],
operands[3])); operands[3]));
if (!TARGET_NO_CHECK_ZERO_DIV) if (!TARGET_NO_CHECK_ZERO_DIV)
...@@ -2341,8 +2337,6 @@ ...@@ -2341,8 +2337,6 @@
"optimize" "optimize"
" "
{ {
rtx label;
emit_insn (gen_udivmodsi4_internal (operands[0], operands[1], operands[2], emit_insn (gen_udivmodsi4_internal (operands[0], operands[1], operands[2],
operands[3])); operands[3]));
if (!TARGET_NO_CHECK_ZERO_DIV) if (!TARGET_NO_CHECK_ZERO_DIV)
...@@ -2382,8 +2376,6 @@ ...@@ -2382,8 +2376,6 @@
"TARGET_64BIT && optimize" "TARGET_64BIT && optimize"
" "
{ {
rtx label;
emit_insn (gen_udivmoddi4_internal (operands[0], operands[1], operands[2], emit_insn (gen_udivmoddi4_internal (operands[0], operands[1], operands[2],
operands[3])); operands[3]));
if (!TARGET_NO_CHECK_ZERO_DIV) if (!TARGET_NO_CHECK_ZERO_DIV)
...@@ -2512,8 +2504,6 @@ ...@@ -2512,8 +2504,6 @@
"!optimize" "!optimize"
" "
{ {
rtx label;
emit_insn (gen_divsi3_internal (operands[0], operands[1], operands[2])); emit_insn (gen_divsi3_internal (operands[0], operands[1], operands[2]));
if (!TARGET_NO_CHECK_ZERO_DIV) if (!TARGET_NO_CHECK_ZERO_DIV)
{ {
...@@ -2555,8 +2545,6 @@ ...@@ -2555,8 +2545,6 @@
"TARGET_64BIT && !optimize" "TARGET_64BIT && !optimize"
" "
{ {
rtx label;
emit_insn (gen_divdi3_internal (operands[0], operands[1], operands[2])); emit_insn (gen_divdi3_internal (operands[0], operands[1], operands[2]));
if (!TARGET_NO_CHECK_ZERO_DIV) if (!TARGET_NO_CHECK_ZERO_DIV)
{ {
...@@ -2598,8 +2586,6 @@ ...@@ -2598,8 +2586,6 @@
"!optimize" "!optimize"
" "
{ {
rtx label;
emit_insn (gen_modsi3_internal (operands[0], operands[1], operands[2])); emit_insn (gen_modsi3_internal (operands[0], operands[1], operands[2]));
if (!TARGET_NO_CHECK_ZERO_DIV) if (!TARGET_NO_CHECK_ZERO_DIV)
{ {
...@@ -2641,8 +2627,6 @@ ...@@ -2641,8 +2627,6 @@
"TARGET_64BIT && !optimize" "TARGET_64BIT && !optimize"
" "
{ {
rtx label;
emit_insn (gen_moddi3_internal (operands[0], operands[1], operands[2])); emit_insn (gen_moddi3_internal (operands[0], operands[1], operands[2]));
if (!TARGET_NO_CHECK_ZERO_DIV) if (!TARGET_NO_CHECK_ZERO_DIV)
{ {
...@@ -2684,8 +2668,6 @@ ...@@ -2684,8 +2668,6 @@
"!optimize" "!optimize"
" "
{ {
rtx label;
emit_insn (gen_udivsi3_internal (operands[0], operands[1], operands[2])); emit_insn (gen_udivsi3_internal (operands[0], operands[1], operands[2]));
if (!TARGET_NO_CHECK_ZERO_DIV) if (!TARGET_NO_CHECK_ZERO_DIV)
{ {
...@@ -2718,8 +2700,6 @@ ...@@ -2718,8 +2700,6 @@
"TARGET_64BIT && !optimize" "TARGET_64BIT && !optimize"
" "
{ {
rtx label;
emit_insn (gen_udivdi3_internal (operands[0], operands[1], operands[2])); emit_insn (gen_udivdi3_internal (operands[0], operands[1], operands[2]));
if (!TARGET_NO_CHECK_ZERO_DIV) if (!TARGET_NO_CHECK_ZERO_DIV)
{ {
...@@ -2752,8 +2732,6 @@ ...@@ -2752,8 +2732,6 @@
"!optimize" "!optimize"
" "
{ {
rtx label;
emit_insn (gen_umodsi3_internal (operands[0], operands[1], operands[2])); emit_insn (gen_umodsi3_internal (operands[0], operands[1], operands[2]));
if (!TARGET_NO_CHECK_ZERO_DIV) if (!TARGET_NO_CHECK_ZERO_DIV)
{ {
...@@ -2786,8 +2764,6 @@ ...@@ -2786,8 +2764,6 @@
"TARGET_64BIT && !optimize" "TARGET_64BIT && !optimize"
" "
{ {
rtx label;
emit_insn (gen_umoddi3_internal (operands[0], operands[1], operands[2])); emit_insn (gen_umoddi3_internal (operands[0], operands[1], operands[2]));
if (!TARGET_NO_CHECK_ZERO_DIV) if (!TARGET_NO_CHECK_ZERO_DIV)
{ {
...@@ -4664,7 +4640,7 @@ move\\t%0,%z4\\n\\ ...@@ -4664,7 +4640,7 @@ move\\t%0,%z4\\n\\
rtx offset = const0_rtx; rtx offset = const0_rtx;
rtx addr = XEXP (operands[1], 0); rtx addr = XEXP (operands[1], 0);
rtx mem_addr = eliminate_constant_term (addr, &offset); rtx mem_addr = eliminate_constant_term (addr, &offset);
char *ret; const char *ret;
if (TARGET_STATS) if (TARGET_STATS)
mips_count_memory_refs (operands[1], 2); mips_count_memory_refs (operands[1], 2);
...@@ -4723,7 +4699,7 @@ move\\t%0,%z4\\n\\ ...@@ -4723,7 +4699,7 @@ move\\t%0,%z4\\n\\
rtx offset = const0_rtx; rtx offset = const0_rtx;
rtx addr = XEXP (operands[1], 0); rtx addr = XEXP (operands[1], 0);
rtx mem_addr = eliminate_constant_term (addr, &offset); rtx mem_addr = eliminate_constant_term (addr, &offset);
char *ret; const char *ret;
if (TARGET_STATS) if (TARGET_STATS)
mips_count_memory_refs (operands[1], 2); mips_count_memory_refs (operands[1], 2);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment