Commit c4d38ccb by Michael Meissner Committed by Michael Meissner

Fix warnings from Kaveh R. Ghazi

From-SVN: r18826
parent c440840d
Wed Mar 25 16:09:01 1998 Michael Meissner <meissner@cygnus.com>
* rs6000.h (FUNCTION_ARG_PADDING): Cast result to be enum
direction.
(function_arg_padding): Declare.
* rs6000.c: Include system.h.
(function_arg_padding): Change return type to int, cast enum's to
int.
(From Kaveh R. Ghazi <ghazi@caip.rutgers.edu>)
* collect2.c (scan_prog_file): Add explicit braces to avoid
ambiguous `else'.
* dbxout.c (dbxout_type_fields): Add braces around empty body in
an if-statement.
(dbxout_type): Likewise.
* rs6000.c (rs6000_override_options): Change type of `i', `j' and
`ptt_size' from int to size_t.
(rs6000_file_start): Likewise for `i'.
(rs6000_replace_regno): Add default case in enumeration switch.
(output_epilog): Remove unused variable `i'.
(rs6000_longcall_ref): Remove unused variables `len', `p', `reg1'
and `reg2'.
* rs6000.h (ADDITIONAL_REGISTER_NAMES): Add missing braces around
initializer.
(get_issue_rate, non_logical_cint_operand): Add prototype.
(rs6000_output_load_toc_table): Ditto.
* rs6000.md (udivmodsi4): Add explicit braces to avoid ambiguous
`else'.
Wed Mar 25 10:05:19 1998 Nick Clifton <nickc@cygnus.com>
* config/arm/thumb.c: New File. Support for ARM's Thumb
......
......@@ -2914,12 +2914,14 @@ scan_prog_file (prog_name, which_pass)
to explicitly export all global symbols or add
them to import list. */
if (shared_obj)
{
if (which_pass == PASS_OBJ && (! export_flag))
add_to_list (&exports, name);
else if (! is_shared && which_pass == PASS_FIRST
&& import_flag
&& is_in_list(name, undefined.first))
add_to_list (&imports, name);
}
#endif
continue;
}
......
......@@ -22,6 +22,7 @@ Boston, MA 02111-1307, USA. */
#include <stdio.h>
#include <ctype.h>
#include "config.h"
#include "system.h"
#include "rtl.h"
#include "regs.h"
#include "hard-reg-set.h"
......@@ -157,7 +158,7 @@ void
rs6000_override_options (default_cpu)
char *default_cpu;
{
int i, j;
size_t i, j;
struct rs6000_cpu_select *ptr;
/* Simplify the entries below by making a mask for any POWER
......@@ -241,7 +242,7 @@ rs6000_override_options (default_cpu)
MASK_POWERPC | MASK_SOFT_FLOAT | MASK_NEW_MNEMONICS,
POWER_MASKS | POWERPC_OPT_MASKS | MASK_POWERPC64}};
int ptt_size = sizeof (processor_target_table) / sizeof (struct ptt);
size_t ptt_size = sizeof (processor_target_table) / sizeof (struct ptt);
int multiple = TARGET_MULTIPLE; /* save current -mmultiple/-mno-multiple status */
int string = TARGET_STRING; /* save current -mstring/-mno-string status */
......@@ -337,7 +338,7 @@ rs6000_file_start (file, default_cpu)
FILE *file;
char *default_cpu;
{
int i;
size_t i;
char buffer[80];
char *start = buffer;
struct rs6000_cpu_select *ptr;
......@@ -1187,22 +1188,22 @@ init_cumulative_args (cum, fntype, libname, incoming)
For the AIX ABI structs are always stored left shifted in their
argument slot. */
enum direction
int
function_arg_padding (mode, type)
enum machine_mode mode;
tree type;
{
if (type != 0 && AGGREGATE_TYPE_P (type))
return upward;
return (int)upward;
/* This is the default definition. */
return (! BYTES_BIG_ENDIAN
? upward
? (int)upward
: ((mode == BLKmode
? (type && TREE_CODE (TYPE_SIZE (type)) == INTEGER_CST
&& int_size_in_bytes (type) < (PARM_BOUNDARY / BITS_PER_UNIT))
: GET_MODE_BITSIZE (mode) < PARM_BOUNDARY)
? downward : upward));
? (int)downward : (int)upward));
}
/* If defined, a C expression that gives the alignment boundary, in bits,
......@@ -2221,6 +2222,9 @@ rs6000_replace_regno (x, from, reg)
}
return x;
default:
break;
}
fmt = GET_RTX_FORMAT (GET_CODE (x));
......@@ -3875,7 +3879,6 @@ output_epilog (file, size)
rtx insn = get_last_insn ();
int sp_reg = 1;
int sp_offset = 0;
int i;
/* If the last insn was a BARRIER, we don't have to write anything except
the trace table. */
......@@ -4946,9 +4949,6 @@ rs6000_longcall_ref (call_ref)
rtx call_ref;
{
char *call_name;
int len;
char *p;
rtx reg1, reg2;
tree node;
if (GET_CODE (call_ref) != SYMBOL_REF)
......
......@@ -1468,7 +1468,7 @@ typedef struct rs6000_args
padding. */
#define FUNCTION_ARG_PADDING(MODE, TYPE) \
function_arg_padding (MODE, TYPE)
(enum direction) function_arg_padding (MODE, TYPE)
/* If defined, a C expression that gives the alignment boundary, in bits,
of an argument with the specified mode and type. If it is not defined,
......@@ -2755,26 +2755,26 @@ extern char rs6000_reg_names[][8]; /* register names (0 vs. %r0). */
/* Table of additional register names to use in user input. */
#define ADDITIONAL_REGISTER_NAMES \
{"r0", 0, "r1", 1, "r2", 2, "r3", 3, \
"r4", 4, "r5", 5, "r6", 6, "r7", 7, \
"r8", 8, "r9", 9, "r10", 10, "r11", 11, \
"r12", 12, "r13", 13, "r14", 14, "r15", 15, \
"r16", 16, "r17", 17, "r18", 18, "r19", 19, \
"r20", 20, "r21", 21, "r22", 22, "r23", 23, \
"r24", 24, "r25", 25, "r26", 26, "r27", 27, \
"r28", 28, "r29", 29, "r30", 30, "r31", 31, \
"fr0", 32, "fr1", 33, "fr2", 34, "fr3", 35, \
"fr4", 36, "fr5", 37, "fr6", 38, "fr7", 39, \
"fr8", 40, "fr9", 41, "fr10", 42, "fr11", 43, \
"fr12", 44, "fr13", 45, "fr14", 46, "fr15", 47, \
"fr16", 48, "fr17", 49, "fr18", 50, "fr19", 51, \
"fr20", 52, "fr21", 53, "fr22", 54, "fr23", 55, \
"fr24", 56, "fr25", 57, "fr26", 58, "fr27", 59, \
"fr28", 60, "fr29", 61, "fr30", 62, "fr31", 63, \
{{"r0", 0}, {"r1", 1}, {"r2", 2}, {"r3", 3}, \
{"r4", 4}, {"r5", 5}, {"r6", 6}, {"r7", 7}, \
{"r8", 8}, {"r9", 9}, {"r10", 10}, {"r11", 11}, \
{"r12", 12}, {"r13", 13}, {"r14", 14}, {"r15", 15}, \
{"r16", 16}, {"r17", 17}, {"r18", 18}, {"r19", 19}, \
{"r20", 20}, {"r21", 21}, {"r22", 22}, {"r23", 23}, \
{"r24", 24}, {"r25", 25}, {"r26", 26}, {"r27", 27}, \
{"r28", 28}, {"r29", 29}, {"r30", 30}, {"r31", 31}, \
{"fr0", 32}, {"fr1", 33}, {"fr2", 34}, {"fr3", 35}, \
{"fr4", 36}, {"fr5", 37}, {"fr6", 38}, {"fr7", 39}, \
{"fr8", 40}, {"fr9", 41}, {"fr10", 42}, {"fr11", 43}, \
{"fr12", 44}, {"fr13", 45}, {"fr14", 46}, {"fr15", 47}, \
{"fr16", 48}, {"fr17", 49}, {"fr18", 50}, {"fr19", 51}, \
{"fr20", 52}, {"fr21", 53}, {"fr22", 54}, {"fr23", 55}, \
{"fr24", 56}, {"fr25", 57}, {"fr26", 58}, {"fr27", 59}, \
{"fr28", 60}, {"fr29", 61}, {"fr30", 62}, {"fr31", 63}, \
/* no additional names for: mq, lr, ctr, ap */ \
"cr0", 68, "cr1", 69, "cr2", 70, "cr3", 71, \
"cr4", 72, "cr5", 73, "cr6", 74, "cr7", 75, \
"cc", 68, "sp", 1, "toc", 2 }
{"cr0", 68}, {"cr1", 69}, {"cr2", 70}, {"cr3", 71}, \
{"cr4", 72}, {"cr5", 73}, {"cr6", 74}, {"cr7", 75}, \
{"cc", 68}, {"sp", 1}, {"toc", 2} }
/* How to renumber registers for dbx and gdb. */
......@@ -3101,6 +3101,7 @@ extern struct rtx_def *rs6000_float_const ();
extern struct rtx_def *rs6000_immed_double_const ();
extern struct rtx_def *rs6000_got_register ();
extern int direct_return ();
extern int get_issue_rate ();
extern int any_operand ();
extern int short_cint_operand ();
extern int u_short_cint_operand ();
......@@ -3120,6 +3121,7 @@ extern int offsettable_addr_operand ();
extern int mem_or_easy_const_operand ();
extern int add_operand ();
extern int non_add_cint_operand ();
extern int non_logical_cint_operand ();
extern int logical_operand ();
extern int non_logical_operand ();
extern int mask_constant ();
......@@ -3175,12 +3177,14 @@ extern int rs6000_adjust_cost ();
extern void rs6000_trampoline_template ();
extern int rs6000_trampoline_size ();
extern void rs6000_initialize_trampoline ();
extern void rs6000_output_load_toc_table ();
extern int rs6000_comp_type_attributes ();
extern int rs6000_valid_decl_attribute_p ();
extern int rs6000_valid_type_attribute_p ();
extern void rs6000_set_default_type_attributes ();
extern struct rtx_def *rs6000_dll_import_ref ();
extern struct rtx_def *rs6000_longcall_ref ();
extern int function_arg_padding ();
/* See nonlocal_goto_receiver for when this must be set. */
......
......@@ -1602,6 +1602,7 @@
rtx label = 0;
if (! TARGET_POWER)
{
if (! TARGET_POWERPC)
{
emit_move_insn (gen_rtx (REG, SImode, 3), operands[1]);
......@@ -1613,6 +1614,7 @@
}
else
FAIL;
}
if (GET_CODE (operands[2]) != CONST_INT || INTVAL (operands[2]) < 0)
{
......
......@@ -646,7 +646,9 @@ dbxout_type_fields (type)
/* Continue the line if necessary,
but not before the first field. */
if (tem != TYPE_FIELDS (type))
{
CONTIN;
}
if (use_gnu_debug_info_extensions
&& flag_minimal_debug
......@@ -1427,8 +1429,10 @@ dbxout_type (type, full, show_arg_types)
fprintf (asmfile, ",");
CHARS (20 + IDENTIFIER_LENGTH (TREE_PURPOSE (tem)));
if (TREE_CHAIN (tem) != 0)
{
CONTIN;
}
}
putc (';', asmfile);
CHARS (1);
#endif
......
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