Commit 99f44eba by Kaveh R. Ghazi Committed by Kaveh Ghazi

hard-reg-set.h (reg_names): Constify a char*.

	* hard-reg-set.h (reg_names): Constify a char*.

	* regclass.c  (reg_names): Likewise.

	* regs.h (reg_names): Likewise

	* a29k/a29k.c (reg_names): Delete declaration.

	* a29k/a29k.h (CONDITIONAL_REGISTER_USAGE): Constify a char*.

	* arc/arc.c (arc_save_restore, arc_output_function_prologue,
	arc_output_function_epilogue): Likewise.

	* elxsi/elxsi.c (reg_names): Likewise.

	* gmicro/gmicro.h (FUNCTION_PROLOGUE, FUNCTION_EPILOGUE): Likewise.

	* m32r/m32r.c (m32r_output_function_epilogue, emit_cond_move):
	Likewise.

	* m88k/m88k.c (output_function_profiler): Likewise.

	* sparc/sparc.c (sparc_flat_output_function_prologue,
	sparc_flat_output_function_epilogue): Likewise.

From-SVN: r30303
parent f7faca78
Sun Oct 31 20:42:17 1999 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
* hard-reg-set.h (reg_names): Constify a char*.
* regclass.c (reg_names): Likewise.
* regs.h (reg_names): Likewise
* a29k/a29k.c (reg_names): Delete declaration.
* a29k/a29k.h (CONDITIONAL_REGISTER_USAGE): Constify a char*.
* arc/arc.c (arc_save_restore, arc_output_function_prologue,
arc_output_function_epilogue): Likewise.
* elxsi/elxsi.c (reg_names): Likewise.
* gmicro/gmicro.h (FUNCTION_PROLOGUE, FUNCTION_EPILOGUE): Likewise.
* m32r/m32r.c (m32r_output_function_epilogue, emit_cond_move):
Likewise.
* m88k/m88k.c (output_function_profiler): Likewise.
* sparc/sparc.c (sparc_flat_output_function_prologue,
sparc_flat_output_function_epilogue): Likewise.
Sun Oct 31 13:32:15 CET 1999 Marc Lehmann <pcg@goof.com>
* toplev.c (rest_of_compilation): Seperate the setjmp/vfork clobber
......
......@@ -83,9 +83,6 @@ int a29k_debug_reg_map[FIRST_PSEUDO_REGISTER];
rtx a29k_compare_op0, a29k_compare_op1;
int a29k_compare_fp_p;
/* Gives names for registers. */
extern char *reg_names[];
/* Returns 1 if OP is a 8-bit constant. */
......
......@@ -591,7 +591,7 @@ enum reg_class { NO_REGS, LR0_REGS, GENERAL_REGS, BP_REGS, FC_REGS, CR_REGS,
#define CONDITIONAL_REGISTER_USAGE \
{ \
char *p; \
const char *p; \
int i; \
\
if (TARGET_KERNEL_REGISTERS) \
......
......@@ -1061,10 +1061,10 @@ arc_compute_frame_size (size)
void
arc_save_restore (file, base_reg, offset, gmask, op)
FILE *file;
char *base_reg;
const char *base_reg;
unsigned int offset;
unsigned int gmask;
char *op;
const char *op;
{
int regno;
......@@ -1089,8 +1089,8 @@ arc_output_function_prologue (file, size)
FILE *file;
int size;
{
char *sp_str = reg_names[STACK_POINTER_REGNUM];
char *fp_str = reg_names[FRAME_POINTER_REGNUM];
const char *sp_str = reg_names[STACK_POINTER_REGNUM];
const char *fp_str = reg_names[FRAME_POINTER_REGNUM];
unsigned int gmask = current_frame_info.gmask;
enum arc_function_type fn_type = arc_compute_function_type (current_function_decl);
......@@ -1197,8 +1197,8 @@ arc_output_function_epilogue (file, size)
unsigned int frame_size = size - pretend_size;
int restored, fp_restored_p;
int can_trust_sp_p = !current_function_calls_alloca;
char *sp_str = reg_names[STACK_POINTER_REGNUM];
char *fp_str = reg_names[FRAME_POINTER_REGNUM];
const char *sp_str = reg_names[STACK_POINTER_REGNUM];
const char *fp_str = reg_names[FRAME_POINTER_REGNUM];
/* ??? There are lots of optimizations that can be done here.
EG: Use fp to restore regs if it's closer.
......
......@@ -26,7 +26,7 @@ Boston, MA 02111-1307, USA. */
#include "rtl.h"
#include "function.h"
extern char *reg_names[];
extern const char *reg_names[];
rtx cmp_op0=0, cmp_op1=0;
/* table of relations for compares and branches */
......
......@@ -635,7 +635,7 @@ extern enum reg_class regno_reg_class[];
{ register int regno; \
register int mask = 0; \
register int nregs = 0; \
static char *reg_names[] = REGISTER_NAMES; \
static const char * const reg_names[] = REGISTER_NAMES; \
extern char call_used_regs[]; \
int fsize = ((SIZE) + 3) & -4; \
for (regno = 0; regno < 16; regno++) \
......@@ -737,7 +737,7 @@ extern enum reg_class regno_reg_class[];
register int nregs, nfregs; \
int offset, foffset; \
extern char call_used_regs[]; \
static char *reg_names[] = REGISTER_NAMES; \
static const char * const reg_names[] = REGISTER_NAMES; \
int fsize = ((SIZE) + 3) & -4; \
FUNCTION_EXTRA_EPILOGUE (FILE, SIZE); \
nfregs = 0; fmask = 0; \
......
......@@ -1774,8 +1774,8 @@ m32r_output_function_epilogue (file, size)
unsigned int args_size = current_frame_info.args_size;
unsigned int gmask = current_frame_info.gmask;
int can_trust_sp_p = !current_function_calls_alloca;
char * sp_str = reg_names[STACK_POINTER_REGNUM];
char * fp_str = reg_names[FRAME_POINTER_REGNUM];
const char * sp_str = reg_names[STACK_POINTER_REGNUM];
const char * fp_str = reg_names[FRAME_POINTER_REGNUM];
/* The first thing to do is point the sp at the bottom of the register
save area. */
......@@ -2311,7 +2311,7 @@ emit_cond_move (operands, insn)
rtx insn ATTRIBUTE_UNUSED;
{
static char buffer [100];
char * dest = reg_names [REGNO (operands [0])];
const char * dest = reg_names [REGNO (operands [0])];
buffer [0] = 0;
......
......@@ -2373,7 +2373,7 @@ output_function_profiler (file, labelno, name, savep)
{
char label[256];
char dbi[256];
char *temp = (savep ? reg_names[2] : reg_names[10]);
const char *temp = (savep ? reg_names[2] : reg_names[10]);
/* Remember to update FUNCTION_PROFILER_LENGTH. */
......
......@@ -5938,7 +5938,7 @@ sparc_flat_output_function_prologue (file, size)
FILE *file;
int size;
{
char *sp_str = reg_names[STACK_POINTER_REGNUM];
const char *sp_str = reg_names[STACK_POINTER_REGNUM];
unsigned long gmask = current_frame_info.gmask;
sparc_output_scratch_registers (file);
......@@ -5977,7 +5977,7 @@ sparc_flat_output_function_prologue (file, size)
if (size > 0)
{
unsigned int reg_offset = current_frame_info.reg_offset;
char *fp_str = reg_names[FRAME_POINTER_REGNUM];
const char *fp_str = reg_names[FRAME_POINTER_REGNUM];
const char *t1_str = "%g1";
/* Things get a little tricky if local variables take up more than ~4096
......@@ -6155,8 +6155,8 @@ sparc_flat_output_function_epilogue (file, size)
{
unsigned int reg_offset = current_frame_info.reg_offset;
unsigned int size1;
char *sp_str = reg_names[STACK_POINTER_REGNUM];
char *fp_str = reg_names[FRAME_POINTER_REGNUM];
const char *sp_str = reg_names[STACK_POINTER_REGNUM];
const char *fp_str = reg_names[FRAME_POINTER_REGNUM];
const char *t1_str = "%g1";
/* In the reload sequence, we don't need to fill the load delay
......
......@@ -467,4 +467,4 @@ extern int n_non_fixed_regs;
/* Vector indexed by hardware reg giving its name. */
extern char *reg_names[FIRST_PSEUDO_REGISTER];
extern const char *reg_names[FIRST_PSEUDO_REGISTER];
......@@ -158,7 +158,7 @@ enum reg_class reg_class_superunion[N_REG_CLASSES][N_REG_CLASSES];
/* Array containing all of the register names */
char *reg_names[] = REGISTER_NAMES;
const char *reg_names[] = REGISTER_NAMES;
/* For each hard register, the widest mode object that it can contain.
This will be a MODE_INT mode if the register can hold integers. Otherwise
......
......@@ -138,7 +138,7 @@ extern char regs_ever_live[FIRST_PSEUDO_REGISTER];
/* Vector indexed by hardware reg giving its name. */
extern char *reg_names[FIRST_PSEUDO_REGISTER];
extern const char *reg_names[FIRST_PSEUDO_REGISTER];
/* For each hard register, the widest mode object that it can contain.
This will be a MODE_INT mode if the register can hold integers. Otherwise
......
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