diff options
author | meissner <meissner@138bc75d-0d04-0410-961f-82ee72b054a4> | 1998-03-25 13:17:37 +0000 |
---|---|---|
committer | meissner <meissner@138bc75d-0d04-0410-961f-82ee72b054a4> | 1998-03-25 13:17:37 +0000 |
commit | a665c15300ab648a71af909dc0cacfb4c1550716 (patch) | |
tree | 3457945541aaabd9c1d04c7bbf59ee53bc6c20fa /gcc/config/rs6000 | |
parent | 3b33002d352eb8d3a4464e6603f85f5b4a7104b4 (diff) | |
download | gcc-a665c15300ab648a71af909dc0cacfb4c1550716.tar.gz |
Fix warnings from Kaveh R. Ghazi
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@18826 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/config/rs6000')
-rw-r--r-- | gcc/config/rs6000/rs6000.c | 22 | ||||
-rw-r--r-- | gcc/config/rs6000/rs6000.h | 46 | ||||
-rw-r--r-- | gcc/config/rs6000/rs6000.md | 24 |
3 files changed, 49 insertions, 43 deletions
diff --git a/gcc/config/rs6000/rs6000.c b/gcc/config/rs6000/rs6000.c index aa80812803c..3be059db13f 100644 --- a/gcc/config/rs6000/rs6000.c +++ b/gcc/config/rs6000/rs6000.c @@ -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) diff --git a/gcc/config/rs6000/rs6000.h b/gcc/config/rs6000/rs6000.h index cdc4bdc748d..e50bf5d948f 100644 --- a/gcc/config/rs6000/rs6000.h +++ b/gcc/config/rs6000/rs6000.h @@ -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, \ - /* 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 } + {{"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} } /* 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. */ diff --git a/gcc/config/rs6000/rs6000.md b/gcc/config/rs6000/rs6000.md index 8e5c122e680..9bd5afd6959 100644 --- a/gcc/config/rs6000/rs6000.md +++ b/gcc/config/rs6000/rs6000.md @@ -1602,17 +1602,19 @@ rtx label = 0; if (! TARGET_POWER) - if (! TARGET_POWERPC) - { - emit_move_insn (gen_rtx (REG, SImode, 3), operands[1]); - emit_move_insn (gen_rtx (REG, SImode, 4), operands[2]); - emit_insn (gen_divus_call ()); - emit_move_insn (operands[0], gen_rtx (REG, SImode, 3)); - emit_move_insn (operands[3], gen_rtx (REG, SImode, 4)); - DONE; - } - else - FAIL; + { + if (! TARGET_POWERPC) + { + emit_move_insn (gen_rtx (REG, SImode, 3), operands[1]); + emit_move_insn (gen_rtx (REG, SImode, 4), operands[2]); + emit_insn (gen_divus_call ()); + emit_move_insn (operands[0], gen_rtx (REG, SImode, 3)); + emit_move_insn (operands[3], gen_rtx (REG, SImode, 4)); + DONE; + } + else + FAIL; + } if (GET_CODE (operands[2]) != CONST_INT || INTVAL (operands[2]) < 0) { |