rs6000.c (rs6000_override_options, [...]): Const-ify a char*.

* rs6000.c (rs6000_override_options, ptt, rs6000_file_start,
        rs6000_float_const, rs6000_replace_regno, debug_stack_info,
        rs6000_output_load_toc_table, output_prolog, output_epilog):
        Const-ify a char*.
        (output_mi_thunk): Likewise.  Mark parameter `thunk_fndecl' with
        ATTRIBUTE_UNUSED.  Hide unused variables `r0', `sp', `toc',
        `schain', `r12', `buf' and `labelno'.
        (output_ascii): Const-ify a char*.
        (rs6000_gen_section_name): Initialize variable `last_period'.
        (rs6000_adjust_priority): Mark parameter `insn' with
        ATTRIBUTE_UNUSED.
        (rs6000_trampoline_template, rs6000_dll_import_ref,
        rs6000_longcall_ref, rs6000_encode_section_info): Const-ify a char*.
        * rs6000.h (offsettable_mem_operand, optimization_options): Add
        prototypes.
        * rs6000.md (movdi, define_split): Cast a value to HOST_WIDE_INT
        when comparing against one.

From-SVN: r26308
This commit is contained in:
Kaveh R. Ghazi 1999-04-09 07:45:00 +00:00 committed by Kaveh Ghazi
parent efd07ca794
commit d330fd93a9
4 changed files with 61 additions and 35 deletions

View File

@ -1,3 +1,25 @@
Fri Apr 9 10:40:10 1999 Kaveh R. Ghazi <ghazi@snafu.rutgers.edu>
* rs6000.c (rs6000_override_options, ptt, rs6000_file_start,
rs6000_float_const, rs6000_replace_regno, debug_stack_info,
rs6000_output_load_toc_table, output_prolog, output_epilog):
Const-ify a char*.
(output_mi_thunk): Likewise. Mark parameter `thunk_fndecl' with
ATTRIBUTE_UNUSED. Hide unused variables `r0', `sp', `toc',
`schain', `r12', `buf' and `labelno'.
(output_ascii): Const-ify a char*.
(rs6000_gen_section_name): Initialize variable `last_period'.
(rs6000_adjust_priority): Mark parameter `insn' with
ATTRIBUTE_UNUSED.
(rs6000_trampoline_template, rs6000_dll_import_ref,
rs6000_longcall_ref, rs6000_encode_section_info): Const-ify a char*.
* rs6000.h (offsettable_mem_operand, optimization_options): Add
prototypes.
* rs6000.md (movdi, define_split): Cast a value to HOST_WIDE_INT
when comparing against one.
Thu Apr 8 19:20:18 1999 Jeffrey A Law (law@cygnus.com)
* expr.c (expand_expr, case ARRAY_REF, COMPONENT_REF, BIT_FIELD_REF):

View File

@ -155,7 +155,7 @@ static char alt_reg_names[][8] =
void
rs6000_override_options (default_cpu)
char *default_cpu;
const char *default_cpu;
{
size_t i, j;
struct rs6000_cpu_select *ptr;
@ -170,7 +170,7 @@ rs6000_override_options (default_cpu)
static struct ptt
{
char *name; /* Canonical processor name. */
const char *name; /* Canonical processor name. */
enum processor_type processor; /* Processor type enum value. */
int target_enable; /* Target flags to enable. */
int target_disable; /* Target flags to disable. */
@ -374,11 +374,11 @@ optimization_options (level, size)
void
rs6000_file_start (file, default_cpu)
FILE *file;
char *default_cpu;
const char *default_cpu;
{
size_t i;
char buffer[80];
char *start = buffer;
const char *start = buffer;
struct rs6000_cpu_select *ptr;
if (flag_verbose_asm)
@ -422,7 +422,7 @@ rs6000_file_start (file, default_cpu)
struct rtx_def *
rs6000_float_const (string, mode)
char *string;
const char *string;
enum machine_mode mode;
{
REAL_VALUE_TYPE value = REAL_VALUE_ATOF (string, mode);
@ -2361,7 +2361,7 @@ rs6000_replace_regno (x, from, reg)
rtx *reg;
{
register int i, j;
register char *fmt;
register const char *fmt;
/* Allow this function to make replacements in EXPR_LISTs. */
if (!x)
@ -3663,7 +3663,7 @@ void
debug_stack_info (info)
rs6000_stack_t *info;
{
char *abi_string;
const char *abi_string;
if (!info)
info = rs6000_stack_info ();
@ -3818,7 +3818,7 @@ rs6000_output_load_toc_table (file, reg)
address before loading. */
if (rs6000_pic_func_labelno != rs6000_pic_labelno)
{
char *init_ptr = TARGET_32BIT ? ".long" : ".quad";
const char *init_ptr = TARGET_32BIT ? ".long" : ".quad";
char *buf_ptr;
ASM_OUTPUT_INTERNAL_LABEL (file, "LCL", rs6000_pic_labelno);
@ -3932,8 +3932,8 @@ output_prolog (file, size)
{
rs6000_stack_t *info = rs6000_stack_info ();
int reg_size = info->reg_size;
char *store_reg;
char *load_reg;
const char *store_reg;
const char *load_reg;
int sp_reg = 1;
int sp_offset = 0;
@ -4112,7 +4112,7 @@ output_prolog (file, size)
before dealing with the TOC. */
if (info->main_p)
{
char *prefix = "";
const char *prefix = "";
switch (DEFAULT_ABI)
{
@ -4187,7 +4187,7 @@ output_epilog (file, size)
int size ATTRIBUTE_UNUSED;
{
rs6000_stack_t *info = rs6000_stack_info ();
char *load_reg = (TARGET_32BIT) ? "\t{l|lwz} %s,%d(%s)\n" : "\tld %s,%d(%s)\n";
const char *load_reg = (TARGET_32BIT) ? "\t{l|lwz} %s,%d(%s)\n" : "\tld %s,%d(%s)\n";
rtx insn = get_last_insn ();
int sp_reg = 1;
int sp_offset = 0;
@ -4527,20 +4527,22 @@ output_epilog (file, size)
void
output_mi_thunk (file, thunk_fndecl, delta, function)
FILE *file;
tree thunk_fndecl;
tree thunk_fndecl ATTRIBUTE_UNUSED;
int delta;
tree function;
{
char *this_reg = reg_names[ aggregate_value_p (TREE_TYPE (TREE_TYPE (function))) ? 4 : 3 ];
char *r0 = reg_names[0];
char *sp = reg_names[1];
char *toc = reg_names[2];
char *schain = reg_names[11];
char *r12 = reg_names[12];
char *prefix;
const char *this_reg = reg_names[ aggregate_value_p (TREE_TYPE (TREE_TYPE (function))) ? 4 : 3 ];
const char *prefix;
char *fname;
#if 0
const char *r0 = reg_names[0];
const char *sp = reg_names[1];
const char *toc = reg_names[2];
const char *schain = reg_names[11];
const char *r12 = reg_names[12];
char buf[512];
static int labelno = 0;
#endif
/* Small constants that can be done by one add instruction */
if (delta >= -32768 && delta <= 32767)
@ -4915,14 +4917,14 @@ output_toc (file, x, labelno)
void
output_ascii (file, p, n)
FILE *file;
char *p;
const char *p;
int n;
{
char c;
int i, count_string;
char *for_string = "\t.byte \"";
char *for_decimal = "\t.byte ";
char *to_close = NULL;
const char *for_string = "\t.byte \"";
const char *for_decimal = "\t.byte ";
const char *to_close = NULL;
count_string = 0;
for (i = 0; i < n; i++)
@ -4992,7 +4994,7 @@ rs6000_gen_section_name (buf, filename, section_desc)
char *filename;
char *section_desc;
{
char *q, *after_last_slash, *last_period;
char *q, *after_last_slash, *last_period = 0;
char *p;
int len;
@ -5198,7 +5200,7 @@ rs6000_adjust_cost (insn, link, dep_insn, cost)
int
rs6000_adjust_priority (insn, priority)
rtx insn;
rtx insn ATTRIBUTE_UNUSED;
int priority;
{
/* On machines (like the 750) which have asymetric integer units, where one
@ -5269,9 +5271,9 @@ void
rs6000_trampoline_template (file)
FILE *file;
{
char *sc = reg_names[STATIC_CHAIN_REGNUM];
char *r0 = reg_names[0];
char *r2 = reg_names[2];
const char *sc = reg_names[STATIC_CHAIN_REGNUM];
const char *r0 = reg_names[0];
const char *r2 = reg_names[2];
switch (DEFAULT_ABI)
{
@ -5535,7 +5537,7 @@ struct rtx_def *
rs6000_dll_import_ref (call_ref)
rtx call_ref;
{
char *call_name;
const char *call_name;
int len;
char *p;
rtx reg1, reg2;
@ -5564,7 +5566,7 @@ struct rtx_def *
rs6000_longcall_ref (call_ref)
rtx call_ref;
{
char *call_name;
const char *call_name;
tree node;
if (GET_CODE (call_ref) != SYMBOL_REF)
@ -5679,7 +5681,7 @@ rs6000_encode_section_info (decl)
if (DEFAULT_ABI == ABI_AIX || DEFAULT_ABI == ABI_NT)
{
char *prefix = (DEFAULT_ABI == ABI_AIX) ? "." : "..";
const char *prefix = (DEFAULT_ABI == ABI_AIX) ? "." : "..";
char *str = permalloc (strlen (prefix) + 1
+ strlen (XSTR (sym_ref, 0)));
strcpy (str, prefix);
@ -5693,7 +5695,7 @@ rs6000_encode_section_info (decl)
{
int size = int_size_in_bytes (TREE_TYPE (decl));
tree section_name = DECL_SECTION_NAME (decl);
char *name = (char *)0;
const char *name = (char *)0;
int len = 0;
if (section_name)

View File

@ -3218,6 +3218,8 @@ extern int flag_expensive_optimizations;
extern int frame_pointer_needed;
/* Declare functions in rs6000.c */
extern int offsettable_mem_operand ();
extern void optimization_options ();
extern void output_options ();
extern void rs6000_override_options ();
extern void rs6000_file_start ();

View File

@ -6461,7 +6461,7 @@
#if HOST_BITS_PER_WIDE_INT == 32
&& ((CONST_DOUBLE_HIGH (operands[1]) == 0
&& (CONST_DOUBLE_LOW (operands[1]) & 0x80000000) == 0)
|| (CONST_DOUBLE_HIGH (operands[1]) == 0xffffffff
|| (CONST_DOUBLE_HIGH (operands[1]) == (HOST_WIDE_INT) 0xffffffff
&& (CONST_DOUBLE_LOW (operands[1]) & 0x80000000) != 0))
#endif
)
@ -6657,7 +6657,7 @@
&& GET_CODE (operands[1]) == CONST_DOUBLE
&& ((CONST_DOUBLE_HIGH (operands[1]) == 0
&& (CONST_DOUBLE_LOW (operands[1]) & 0x80000000) == 0)
|| (CONST_DOUBLE_HIGH (operands[1]) == 0xffffffff
|| (CONST_DOUBLE_HIGH (operands[1]) == (HOST_WIDE_INT) 0xffffffff
&& (CONST_DOUBLE_LOW (operands[1]) & 0x80000000) != 0))"
[(set (match_dup 0)
(match_dup 2))