+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)
* Makefile.in (cpp_install_dir, INSTALL_CPP, UNINSTALL_CPP): New
static void dump_constants PROTO ((struct constant *,
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. */
} *extern_head = 0;
/* 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
within a function. */
#endif
/* Strings to hold which cpu and instruction set architecture to use. */
-char *mips_cpu_string; /* for -mcpu=<xxx> */
-char *mips_isa_string; /* for -mips{1,2,3,4} */
-char *mips_abi_string; /* for -mabi={32,n32,64,eabi} */
+const char *mips_cpu_string; /* for -mcpu=<xxx> */
+const char *mips_isa_string; /* for -mips{1,2,3,4} */
+const char *mips_abi_string; /* for -mabi={32,n32,64,eabi} */
/* Whether we are generating mips16 code. This is a synonym for
TARGET_MIPS16, and exists for use as an attribute. */
/* This variable is set by -mno-mips16. We only care whether
-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. */
-char *mips_no_mips16_string;
+const char *mips_no_mips16_string;
/* Whether we are generating mips16 hard float code. In mips16 mode
we always set TARGET_SOFT_FLOAT; this variable is nonzero if
/* 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
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. */
int mips_entry;
/* Return the appropriate instructions to move one operand to another. */
-char *
+const char *
mips_move_1word (operands, insn, unsignedp)
rtx operands[];
rtx insn;
int unsignedp;
{
- char *ret = 0;
+ const char *ret = 0;
rtx op0 = operands[0];
rtx op1 = operands[1];
enum rtx_code code0 = GET_CODE (op0);
\f
/* Return the appropriate instructions to move 2 words */
-char *
+const char *
mips_move_2words (operands, insn)
rtx operands[];
rtx insn;
{
- char *ret = 0;
+ const char *ret = 0;
rtx op0 = operands[0];
rtx op1 = operands[1];
enum rtx_code code0 = GET_CODE (operands[0]);
BLOCK_MOVE_NOT_LAST Do all but the last store.
BLOCK_MOVE_LAST Do just the last store. */
-char *
+const char *
output_block_move (insn, operands, num_regs, move_type)
rtx insn;
rtx operands[];
rtx xoperands[10];
struct {
- char *load; /* load insn without nop */
- char *load_nop; /* load insn with trailing nop */
- char *store; /* store insn */
- char *final; /* if last_store used: NULL or swr */
- char *last_store; /* last store instruction */
+ const char *load; /* load insn without nop */
+ const char *load_nop; /* load insn with trailing nop */
+ const char *store; /* store insn */
+ const char *final; /* if last_store used: NULL or swr */
+ const char *last_store; /* last store instruction */
int offset; /* current offset */
enum machine_mode mode; /* mode to use on (MEM) */
} load_store[4];
\f
/* Abort after printing out a specific insn. */
-void
+static void
abort_with_insn (insn, reason)
rtx insn;
- char *reason;
+ const char *reason;
{
error (reason);
debug_rtx (insn);
else
{
- char *p = mips_cpu_string;
+ const char *p = mips_cpu_string;
int seen_v = 0;
/* We need to cope with the various "vr" prefixes for the NEC 4300
make_temp_file ()
{
FILE *stream;
- char *base = getenv ("TMPDIR");
+ const char *base = getenv ("TMPDIR");
int len;
if (base == 0)
int fp_code;
int from_fp_p;
{
- char *s;
+ const char *s;
int gparg, fparg;
unsigned int f;
extern char mips_reg_names[][8]; /* register names (a0 vs. $4). */
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 inside_function; /* != 0 if inside of a function */
extern int ignore_line_number; /* != 0 if we are to ignore next .loc */
extern int mips16; /* whether generating mips16 code */
extern int mips16_hard_float; /* mips16 without -msoft-float */
extern int mips_entry; /* generate entry/exit for mips16 */
-extern char *mips_cpu_string; /* for -mcpu=<xxx> */
-extern char *mips_isa_string; /* for -mips{1,2,3,4} */
-extern char *mips_abi_string; /* for -mabi={32,n32,64} */
-extern char *mips_entry_string; /* for -mentry */
-extern char *mips_no_mips16_string; /* for -mno-mips16 */
+extern const char *mips_cpu_string; /* for -mcpu=<xxx> */
+extern const char *mips_isa_string; /* for -mips{1,2,3,4} */
+extern const char *mips_abi_string; /* for -mabi={32,n32,64} */
+extern const char *mips_entry_string; /* for -mentry */
+extern const char *mips_no_mips16_string;/* for -mno-mips16 */
extern int mips_split_addresses; /* perform high/lo_sum support */
extern int dslots_load_total; /* total # load related delay slots */
extern int dslots_load_filled; /* # filled load delay slots */
#endif
-extern void abort_with_insn ();
extern int arith32_operand ();
extern int arith_operand ();
extern int cmp_op ();
extern void mips_expand_prologue ();
extern int mips_check_split ();
extern char *mips_fill_delay_slot ();
-extern char *mips_move_1word ();
-extern char *mips_move_2words ();
+extern const char *mips_move_1word ();
+extern const char *mips_move_2words ();
extern void mips_output_double ();
extern int mips_output_external ();
extern void mips_output_float ();
extern void mips_output_filename ();
extern void mips_output_lineno ();
-extern char *output_block_move ();
+extern const char *output_block_move ();
extern void override_options ();
extern int pc_or_label_operand ();
extern void print_operand_address ();
&& !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)
return \"#\";
return madd[which_alternative];
"optimize"
"
{
- rtx label;
-
emit_insn (gen_divmodsi4_internal (operands[0], operands[1], operands[2],
operands[3]));
if (!TARGET_NO_CHECK_ZERO_DIV)
"TARGET_64BIT && optimize"
"
{
- rtx label;
-
emit_insn (gen_divmoddi4_internal (operands[0], operands[1], operands[2],
operands[3]));
if (!TARGET_NO_CHECK_ZERO_DIV)
"optimize"
"
{
- rtx label;
-
emit_insn (gen_udivmodsi4_internal (operands[0], operands[1], operands[2],
operands[3]));
if (!TARGET_NO_CHECK_ZERO_DIV)
"TARGET_64BIT && optimize"
"
{
- rtx label;
-
emit_insn (gen_udivmoddi4_internal (operands[0], operands[1], operands[2],
operands[3]));
if (!TARGET_NO_CHECK_ZERO_DIV)
"!optimize"
"
{
- rtx label;
-
emit_insn (gen_divsi3_internal (operands[0], operands[1], operands[2]));
if (!TARGET_NO_CHECK_ZERO_DIV)
{
"TARGET_64BIT && !optimize"
"
{
- rtx label;
-
emit_insn (gen_divdi3_internal (operands[0], operands[1], operands[2]));
if (!TARGET_NO_CHECK_ZERO_DIV)
{
"!optimize"
"
{
- rtx label;
-
emit_insn (gen_modsi3_internal (operands[0], operands[1], operands[2]));
if (!TARGET_NO_CHECK_ZERO_DIV)
{
"TARGET_64BIT && !optimize"
"
{
- rtx label;
-
emit_insn (gen_moddi3_internal (operands[0], operands[1], operands[2]));
if (!TARGET_NO_CHECK_ZERO_DIV)
{
"!optimize"
"
{
- rtx label;
-
emit_insn (gen_udivsi3_internal (operands[0], operands[1], operands[2]));
if (!TARGET_NO_CHECK_ZERO_DIV)
{
"TARGET_64BIT && !optimize"
"
{
- rtx label;
-
emit_insn (gen_udivdi3_internal (operands[0], operands[1], operands[2]));
if (!TARGET_NO_CHECK_ZERO_DIV)
{
"!optimize"
"
{
- rtx label;
-
emit_insn (gen_umodsi3_internal (operands[0], operands[1], operands[2]));
if (!TARGET_NO_CHECK_ZERO_DIV)
{
"TARGET_64BIT && !optimize"
"
{
- rtx label;
-
emit_insn (gen_umoddi3_internal (operands[0], operands[1], operands[2]));
if (!TARGET_NO_CHECK_ZERO_DIV)
{
rtx offset = const0_rtx;
rtx addr = XEXP (operands[1], 0);
rtx mem_addr = eliminate_constant_term (addr, &offset);
- char *ret;
+ const char *ret;
if (TARGET_STATS)
mips_count_memory_refs (operands[1], 2);
rtx offset = const0_rtx;
rtx addr = XEXP (operands[1], 0);
rtx mem_addr = eliminate_constant_term (addr, &offset);
- char *ret;
+ const char *ret;
if (TARGET_STATS)
mips_count_memory_refs (operands[1], 2);