Commit 6e92f4b6 by Kaveh R. Ghazi Committed by Kaveh Ghazi

Warning fixes:

        * mips/iris6.h (TARGET_DEFAULT): Parenthesize macro definition.
        * mips/mips.c: Include stdlib.h and unistd.h.
        (mips_asm_file_end): Add braces around empty body in an if-statement.
        (function_prologue): Wrap variable `fnname' in
        !FUNCTION_NAME_ALREADY_DECLARED.  Correct format specifier in fprintf.
        (mips_select_rtx_section, mips_select_section): Declare as void.
        * mips/mips.h: Add prototypes for extern functions in mips.c.
        (FUNCTION_ARG_REGNO_P): Add parentheses around && within ||.
        (ENCODE_SECTION_INFO): Add braces around empty body in an
        if-statement.
        * mips/mips.md (movdi): Add parentheses around && within ||.
        (movsf, movdf): Likewise.
        (branch_zero, branch_zero_di): Add default case in
        enumeration switch.

From-SVN: r18419
parent b10df6f5
Thu Mar 5 09:55:15 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
* mips/iris6.h (TARGET_DEFAULT): Parenthesize macro definition.
* mips/mips.c: Include stdlib.h and unistd.h.
(mips_asm_file_end): Add braces around empty body in an if-statement.
(function_prologue): Wrap variable `fnname' in
!FUNCTION_NAME_ALREADY_DECLARED. Correct format specifier in fprintf.
(mips_select_rtx_section, mips_select_section): Declare as void.
* mips/mips.h: Add prototypes for extern functions in mips.c.
(FUNCTION_ARG_REGNO_P): Add parentheses around && within ||.
(ENCODE_SECTION_INFO): Add braces around empty body in an
if-statement.
* mips/mips.md (movdi): Add parentheses around && within ||.
(movsf, movdf): Likewise.
(branch_zero, branch_zero_di): Add default case in
enumeration switch.
Thu Mar 5 02:45:48 1998 Richard Henderson <rth@cygnus.com> Thu Mar 5 02:45:48 1998 Richard Henderson <rth@cygnus.com>
* alpha/alpha.h (TARGET_WINDOWS_NT, TARGET_OPEN_VMS): Just make them * alpha/alpha.h (TARGET_WINDOWS_NT, TARGET_OPEN_VMS): Just make them
......
...@@ -24,7 +24,7 @@ Boston, MA 02111-1307, USA. */ ...@@ -24,7 +24,7 @@ Boston, MA 02111-1307, USA. */
#define MULTILIB_DEFAULTS { "mabi=n32" } #define MULTILIB_DEFAULTS { "mabi=n32" }
#ifndef TARGET_DEFAULT #ifndef TARGET_DEFAULT
#define TARGET_DEFAULT MASK_ABICALLS|MASK_FLOAT64|MASK_64BIT #define TARGET_DEFAULT (MASK_ABICALLS|MASK_FLOAT64|MASK_64BIT)
#endif #endif
#include "mips/iris5.h" #include "mips/iris5.h"
......
...@@ -29,6 +29,12 @@ Boston, MA 02111-1307, USA. */ ...@@ -29,6 +29,12 @@ Boston, MA 02111-1307, USA. */
#include "config.h" #include "config.h"
#include <stdio.h> #include <stdio.h>
#ifdef HAVE_STDLIB_H
#include <stdlib.h>
#endif
#ifdef HAVE_UNISTD_H
#include <unistd.h>
#endif
#include "rtl.h" #include "rtl.h"
#include "regs.h" #include "regs.h"
...@@ -5332,7 +5338,9 @@ mips_asm_file_end (file) ...@@ -5332,7 +5338,9 @@ mips_asm_file_end (file)
int len; int len;
if (HALF_PIC_P ()) if (HALF_PIC_P ())
HALF_PIC_FINISH (file); {
HALF_PIC_FINISH (file);
}
if (extern_head) if (extern_head)
{ {
...@@ -6079,7 +6087,9 @@ function_prologue (file, size) ...@@ -6079,7 +6087,9 @@ function_prologue (file, size)
FILE *file; FILE *file;
int size; int size;
{ {
#ifndef FUNCTION_NAME_ALREADY_DECLARED
char *fnname; char *fnname;
#endif
long tsize = current_frame_info.total_size; long tsize = current_frame_info.total_size;
ASM_OUTPUT_SOURCE_FILENAME (file, DECL_SOURCE_FILE (current_function_decl)); ASM_OUTPUT_SOURCE_FILENAME (file, DECL_SOURCE_FILE (current_function_decl));
...@@ -6118,7 +6128,7 @@ function_prologue (file, size) ...@@ -6118,7 +6128,7 @@ function_prologue (file, size)
if (!flag_inhibit_size_directive) if (!flag_inhibit_size_directive)
{ {
fprintf (file, "\t.frame\t%s,%d,%s\t\t# vars= %d, regs= %d/%d, args= %d, extra= %d\n", fprintf (file, "\t.frame\t%s,%ld,%s\t\t# vars= %ld, regs= %d/%d, args= %d, extra= %ld\n",
reg_names[ (frame_pointer_needed) ? HARD_FRAME_POINTER_REGNUM : STACK_POINTER_REGNUM ], reg_names[ (frame_pointer_needed) ? HARD_FRAME_POINTER_REGNUM : STACK_POINTER_REGNUM ],
tsize, tsize,
reg_names[31 + GP_REG_FIRST], reg_names[31 + GP_REG_FIRST],
...@@ -6856,6 +6866,7 @@ mips_can_use_return_insn () ...@@ -6856,6 +6866,7 @@ mips_can_use_return_insn ()
/* Choose the section to use for the constant rtx expression X that has /* Choose the section to use for the constant rtx expression X that has
mode MODE. */ mode MODE. */
void
mips_select_rtx_section (mode, x) mips_select_rtx_section (mode, x)
enum machine_mode mode; enum machine_mode mode;
rtx x; rtx x;
...@@ -6889,6 +6900,7 @@ mips_select_rtx_section (mode, x) ...@@ -6889,6 +6900,7 @@ mips_select_rtx_section (mode, x)
/* Choose the section to use for DECL. RELOC is true if its value contains /* Choose the section to use for DECL. RELOC is true if its value contains
any relocatable expression. */ any relocatable expression. */
void
mips_select_section (decl, reloc) mips_select_section (decl, reloc)
tree decl; tree decl;
int reloc; int reloc;
......
...@@ -164,6 +164,7 @@ extern int arith32_operand (); ...@@ -164,6 +164,7 @@ extern int arith32_operand ();
extern int arith_operand (); extern int arith_operand ();
extern int cmp_op (); extern int cmp_op ();
extern long compute_frame_size (); extern long compute_frame_size ();
extern int const_float_1_operand ();
extern void expand_block_move (); extern void expand_block_move ();
extern int equality_op (); extern int equality_op ();
extern void final_prescan_insn (); extern void final_prescan_insn ();
...@@ -181,6 +182,7 @@ extern int large_int (); ...@@ -181,6 +182,7 @@ extern int large_int ();
extern int mips_address_cost (); extern int mips_address_cost ();
extern void mips_asm_file_end (); extern void mips_asm_file_end ();
extern void mips_asm_file_start (); extern void mips_asm_file_start ();
extern int mips_can_use_return_insn ();
extern int mips_const_double_ok (); extern int mips_const_double_ok ();
extern void mips_count_memory_refs (); extern void mips_count_memory_refs ();
extern int mips_debugger_offset (); extern int mips_debugger_offset ();
...@@ -215,19 +217,23 @@ extern void mips_order_regs_for_local_alloc (); ...@@ -215,19 +217,23 @@ extern void mips_order_regs_for_local_alloc ();
extern struct rtx_def * mips16_gp_pseudo_reg (); extern struct rtx_def * mips16_gp_pseudo_reg ();
extern struct rtx_def * mips16_gp_offset (); extern struct rtx_def * mips16_gp_offset ();
extern int mips16_gp_offset_p (); extern int mips16_gp_offset_p ();
extern int mips16_constant ();
extern int mips16_constant_after_function_p (); extern int mips16_constant_after_function_p ();
extern int build_mips16_call_stub (); extern int build_mips16_call_stub ();
/* Recognition functions that return if a condition is true. */ /* Recognition functions that return if a condition is true. */
extern int address_operand (); extern int address_operand ();
extern int call_insn_operand ();
extern int const_double_operand (); extern int const_double_operand ();
extern int const_int_operand (); extern int const_int_operand ();
extern int consttable_operand ();
extern int general_operand (); extern int general_operand ();
extern int immediate_operand (); extern int immediate_operand ();
extern int memory_address_p (); extern int memory_address_p ();
extern int memory_operand (); extern int memory_operand ();
extern int nonimmediate_operand (); extern int nonimmediate_operand ();
extern int nonmemory_operand (); extern int nonmemory_operand ();
extern int pic_address_needs_scratch ();
extern int register_operand (); extern int register_operand ();
extern int scratch_operand (); extern int scratch_operand ();
extern int move_operand (); extern int move_operand ();
...@@ -263,6 +269,8 @@ extern void rdata_section (); ...@@ -263,6 +269,8 @@ extern void rdata_section ();
extern void readonly_data_section (); extern void readonly_data_section ();
extern void sdata_section (); extern void sdata_section ();
extern void text_section (); extern void text_section ();
extern void mips_select_rtx_section ();
extern void mips_select_section ();
/* Stubs for half-pic support if not OSF/1 reference platform. */ /* Stubs for half-pic support if not OSF/1 reference platform. */
...@@ -2321,10 +2329,10 @@ extern struct mips_frame_info current_frame_info; ...@@ -2321,10 +2329,10 @@ extern struct mips_frame_info current_frame_info;
#define FUNCTION_ARG_REGNO_P(N) \ #define FUNCTION_ARG_REGNO_P(N) \
(((N) >= GP_ARG_FIRST && (N) <= GP_ARG_LAST) \ (((N) >= GP_ARG_FIRST && (N) <= GP_ARG_LAST) \
|| (! TARGET_SOFT_FLOAT \ || ((! TARGET_SOFT_FLOAT \
&& ((N) >= FP_ARG_FIRST && (N) <= FP_ARG_LAST) \ && ((N) >= FP_ARG_FIRST && (N) <= FP_ARG_LAST) \
&& (TARGET_FLOAT64 || (0 == (N) % 2))) \ && (TARGET_FLOAT64 || (0 == (N) % 2))) \
&& ! fixed_regs[N]) && ! fixed_regs[N]))
/* A C expression which can inhibit the returning of certain function /* A C expression which can inhibit the returning of certain function
values in registers, based on the type of value. A nonzero value says values in registers, based on the type of value. A nonzero value says
...@@ -3040,7 +3048,9 @@ do \ ...@@ -3040,7 +3048,9 @@ do \
} \ } \
\ \
else if (HALF_PIC_P ()) \ else if (HALF_PIC_P ()) \
HALF_PIC_ENCODE (DECL); \ { \
HALF_PIC_ENCODE (DECL); \
} \
} \ } \
while (0) while (0)
......
...@@ -4420,8 +4420,8 @@ move\\t%0,%z4\\n\\ ...@@ -4420,8 +4420,8 @@ move\\t%0,%z4\\n\\
&& !register_operand (operands[0], DImode) && !register_operand (operands[0], DImode)
&& !register_operand (operands[1], DImode) && !register_operand (operands[1], DImode)
&& (TARGET_MIPS16 && (TARGET_MIPS16
|| (GET_CODE (operands[1]) != CONST_INT || INTVAL (operands[1]) != 0) || ((GET_CODE (operands[1]) != CONST_INT || INTVAL (operands[1]) != 0)
&& operands[1] != CONST0_RTX (DImode))) && operands[1] != CONST0_RTX (DImode))))
{ {
rtx temp = force_reg (DImode, operands[1]); rtx temp = force_reg (DImode, operands[1]);
emit_move_insn (operands[0], temp); emit_move_insn (operands[0], temp);
...@@ -5500,8 +5500,8 @@ move\\t%0,%z4\\n\\ ...@@ -5500,8 +5500,8 @@ move\\t%0,%z4\\n\\
&& !register_operand (operands[0], SFmode) && !register_operand (operands[0], SFmode)
&& !register_operand (operands[1], SFmode) && !register_operand (operands[1], SFmode)
&& (TARGET_MIPS16 && (TARGET_MIPS16
|| (GET_CODE (operands[1]) != CONST_INT || INTVAL (operands[1]) != 0) || ((GET_CODE (operands[1]) != CONST_INT || INTVAL (operands[1]) != 0)
&& operands[1] != CONST0_RTX (SFmode))) && operands[1] != CONST0_RTX (SFmode))))
{ {
rtx temp = force_reg (SFmode, operands[1]); rtx temp = force_reg (SFmode, operands[1]);
emit_move_insn (operands[0], temp); emit_move_insn (operands[0], temp);
...@@ -5560,8 +5560,8 @@ move\\t%0,%z4\\n\\ ...@@ -5560,8 +5560,8 @@ move\\t%0,%z4\\n\\
&& !register_operand (operands[0], DFmode) && !register_operand (operands[0], DFmode)
&& !register_operand (operands[1], DFmode) && !register_operand (operands[1], DFmode)
&& (TARGET_MIPS16 && (TARGET_MIPS16
|| (GET_CODE (operands[1]) != CONST_INT || INTVAL (operands[1]) != 0) || ((GET_CODE (operands[1]) != CONST_INT || INTVAL (operands[1]) != 0)
&& operands[1] != CONST0_RTX (DFmode))) && operands[1] != CONST0_RTX (DFmode))))
{ {
rtx temp = force_reg (DFmode, operands[1]); rtx temp = force_reg (DFmode, operands[1]);
emit_move_insn (operands[0], temp); emit_move_insn (operands[0], temp);
...@@ -7140,6 +7140,8 @@ move\\t%0,%z4\\n\\ ...@@ -7140,6 +7140,8 @@ move\\t%0,%z4\\n\\
case LEU: return \"%*beq%?\\t%z1,%.,%2\"; case LEU: return \"%*beq%?\\t%z1,%.,%2\";
case GEU: return \"%*j\\t%2\"; case GEU: return \"%*j\\t%2\";
case LTU: return \"%*bne%?\\t%.,%.,%2\"; case LTU: return \"%*bne%?\\t%.,%.,%2\";
default:
break;
} }
return \"%*b%C0z%?\\t%z1,%2\"; return \"%*b%C0z%?\\t%z1,%2\";
...@@ -7154,6 +7156,8 @@ move\\t%0,%z4\\n\\ ...@@ -7154,6 +7156,8 @@ move\\t%0,%z4\\n\\
case LEU: return \"%*bne%?\\t%z1,%.,%3\"; case LEU: return \"%*bne%?\\t%z1,%.,%3\";
case GEU: return \"%*beq%?\\t%.,%.,%3\"; case GEU: return \"%*beq%?\\t%.,%.,%3\";
case LTU: return \"%*j\\t%3\"; case LTU: return \"%*j\\t%3\";
default:
break;
} }
return \"%*b%N0z%?\\t%z1,%3\"; return \"%*b%N0z%?\\t%z1,%3\";
...@@ -7214,6 +7218,8 @@ move\\t%0,%z4\\n\\ ...@@ -7214,6 +7218,8 @@ move\\t%0,%z4\\n\\
case LEU: return \"%*beq%?\\t%z1,%.,%2\"; case LEU: return \"%*beq%?\\t%z1,%.,%2\";
case GEU: return \"%*j\\t%2\"; case GEU: return \"%*j\\t%2\";
case LTU: return \"%*bne%?\\t%.,%.,%2\"; case LTU: return \"%*bne%?\\t%.,%.,%2\";
default:
break;
} }
return \"%*b%C0z%?\\t%z1,%2\"; return \"%*b%C0z%?\\t%z1,%2\";
...@@ -7228,6 +7234,8 @@ move\\t%0,%z4\\n\\ ...@@ -7228,6 +7234,8 @@ move\\t%0,%z4\\n\\
case LEU: return \"%*bne%?\\t%z1,%.,%3\"; case LEU: return \"%*bne%?\\t%z1,%.,%3\";
case GEU: return \"%*beq%?\\t%.,%.,%3\"; case GEU: return \"%*beq%?\\t%.,%.,%3\";
case LTU: return \"%*j\\t%3\"; case LTU: return \"%*j\\t%3\";
default:
break;
} }
return \"%*b%N0z%?\\t%z1,%3\"; return \"%*b%N0z%?\\t%z1,%3\";
......
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