warning.
(asm_declare_function_name): Fix signed/unsigned warning.
(print_operand): Fix format specifier warning.
* convex.h (S_REGNO_P, A_REGNO_P): Fix signed/unsigned warning.
* dsp16xx-protos.h (uns_comparison_operator,
num_1600_core_shifts): Prototype.
* dsp16xx.c: Include tm_p.h, not dsp16xx-protos.h.
(frame_size, frame_pointer_offset): Delete.
(dsp16xx_output_function_prologue, dsp16xx_output_function_epilogue):
Make static. Fix format specifier warnings.
* dsp16xx.h (IS_ACCUM_REG): Fix unsigned>=0 warning.
(EXTRA_SECTION_FUNCTIONS): Prototype const_section.
* dsp16xx.md: Add default case in switches.
* fr30.h (IN_RANGE): Delete.
* ia64.h (ASM_OUTPUT_MI_THUNK): Fix format specifier warnings.
* mcore-protos.h (mcore_output_cmov): Const-ify.
* mcore.c (mcore_output_cmov): Likewise.
* mcore.h (switch_to_section): Make static and prototype.
* mn10200.h (REGNO_OK_FOR_INDEX_P, REG_OK_FOR_INDEX_P): Fix
unsigned>=0 warnings.
* mn10300.h (REGNO_IN_RANGE_P): Likewise.
* rs6000-protos.h (read_only_data_section,
read_only_private_data_section): Prototype.
* rs6000.h (ASM_OUTPUT_BYTE): Fix format specifier warning.
* sh.c (sh_adjust_cost): Mark parameter with ATTRIBUTE_UNUSED.
* sh.h (GENERAL_REGISTER_P): Fix unsigned>=0 warning.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@46758
138bc75d-0d04-0410-961f-
82ee72b054a4
2001-11-03 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
+ * convex.c (convex_output_function_prologue): Fix format specifier
+ warning.
+ (asm_declare_function_name): Fix signed/unsigned warning.
+ (print_operand): Fix format specifier warning.
+ * convex.h (S_REGNO_P, A_REGNO_P): Fix signed/unsigned warning.
+ * dsp16xx-protos.h (uns_comparison_operator,
+ num_1600_core_shifts): Prototype.
+ * dsp16xx.c: Include tm_p.h, not dsp16xx-protos.h.
+ (frame_size, frame_pointer_offset): Delete.
+ (dsp16xx_output_function_prologue, dsp16xx_output_function_epilogue):
+ Make static. Fix format specifier warnings.
+ * dsp16xx.h (IS_ACCUM_REG): Fix unsigned>=0 warning.
+ (EXTRA_SECTION_FUNCTIONS): Prototype const_section.
+ * dsp16xx.md: Add default case in switches.
+ * fr30.h (IN_RANGE): Delete.
+ * ia64.h (ASM_OUTPUT_MI_THUNK): Fix format specifier warnings.
+ * mcore-protos.h (mcore_output_cmov): Const-ify.
+ * mcore.c (mcore_output_cmov): Likewise.
+ * mcore.h (switch_to_section): Make static and prototype.
+ * mn10200.h (REGNO_OK_FOR_INDEX_P, REG_OK_FOR_INDEX_P): Fix
+ unsigned>=0 warnings.
+ * mn10300.h (REGNO_IN_RANGE_P): Likewise.
+ * rs6000-protos.h (read_only_data_section,
+ read_only_private_data_section): Prototype.
+ * rs6000.h (ASM_OUTPUT_BYTE): Fix format specifier warning.
+ * sh.c (sh_adjust_cost): Mark parameter with ATTRIBUTE_UNUSED.
+ * sh.h (GENERAL_REGISTER_P): Fix unsigned>=0 warning.
+
+2001-11-03 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
+
* dwarf2asm.c (dw2_asm_output_pcrel): Mark parameters with
ATTRIBUTE_UNUSED.
* final.c (final_scan_insn): Add brackets around body of if-stmt.
{
size = ((size) + 7) & -8;
if (size)
- fprintf (file, "\tsub.w #%d,sp\n", size);
+ {
+ fprintf (file, "\tsub.w #");
+ fprintf (file, HOST_WIDE_INT_PRINT_DEC, size);
+ fprintf (file, ",sp\n");
+ }
}
/* This function generates the assembly code for function exit.
p = version_string;
for (i = 0; i < 3; ) {
c = *p;
- if (c - '0' < (unsigned) 10)
+ if (ISDIGIT (c))
vers[i++] = c;
if (c == 0 || c == ' ')
vers[i++] = '0';
break;
default:
if (code == 'u')
- fprintf (file, "#%d", CONST_DOUBLE_HIGH (x));
+ {
+ fprintf (file, "#");
+ fprintf (file, HOST_WIDE_INT_PRINT_DEC, CONST_DOUBLE_HIGH (x));
+ }
else
- fprintf (file, "#%d", CONST_DOUBLE_LOW (x));
+ {
+ fprintf (file, "#");
+ fprintf (file, HOST_WIDE_INT_PRINT_DEC, CONST_DOUBLE_LOW (x));
+ }
}
break;
#define REGNO_REG_CLASS(REGNO) (regno_reg_class[REGNO])
-#define S_REGNO_P(REGNO) (((REGNO) - S0_REGNUM) < (unsigned) 8)
-#define A_REGNO_P(REGNO) (((REGNO) - A0_REGNUM) < (unsigned) 8)
+#define S_REGNO_P(REGNO) ((unsigned)((REGNO) - S0_REGNUM) < 8)
+#define A_REGNO_P(REGNO) ((unsigned)((REGNO) - A0_REGNUM) < 8)
#define S_REG_P(X) (REG_P (X) && S_REGNO_P (REGNO (X)))
#define A_REG_P(X) (REG_P (X) && A_REGNO_P (REGNO (X)))
extern void emit_1600_core_shift PARAMS ((enum rtx_code, rtx *, int));
extern int dsp16xx_address_cost PARAMS ((rtx));
extern int symbolic_address_p PARAMS ((rtx));
+extern int uns_comparison_operator PARAMS ((rtx, enum machine_mode));
#endif /* RTX_CODE */
extern int regno_reg_class PARAMS ((int));
extern void function_prologue PARAMS ((FILE *, int));
extern void function_epilogue PARAMS ((FILE *, int));
+extern int num_1600_core_shifts PARAMS ((int));
#include "ggc.h"
#include "toplev.h"
#include "recog.h"
-#include "dsp16xx-protos.h"
+#include "tm_p.h"
#include "target.h"
#include "target-def.h"
return total_size;
}
-int
-frame_size ()
-{
- return (int) compute_frame_size(get_frame_size());
-}
-
-int
-frame_pointer_offset ()
-{
- if (!leaf_function_p())
- return (-(current_function_outgoing_args_size + 1));
- else
- return 1;
-}
-
int
dsp16xx_call_saved_register (regno)
int regno;
return live;
}
-void
+static void
dsp16xx_output_function_prologue (file, size)
FILE *file;
HOST_WIDE_INT size;
total_size = compute_frame_size (size);
fprintf (file, "\t/* FUNCTION PROLOGUE: */\n");
- fprintf (file, "\t/* total=%d, vars= %d, regs= %d, args=%d, extra= %d */\n",
+ fprintf (file, "\t/* total=%ld, vars= %ld, regs= %d, args=%d, extra= %ld */\n",
current_frame_info.total_size,
current_frame_info.var_size,
current_frame_info.reg_size,
current_function_outgoing_args_size,
current_frame_info.extra_size);
- fprintf (file, "\t/* fp save offset= %d, sp save_offset= %d */\n\n",
+ fprintf (file, "\t/* fp save offset= %ld, sp save_offset= %ld */\n\n",
current_frame_info.fp_save_offset,
current_frame_info.sp_save_offset);
/* Set up the 'ybase' register window. */
else
{
if (SMALL_INTVAL(current_frame_info.var_size) && ((current_frame_info.var_size & 0x8000) == 0))
- fprintf (file, "\t%s=%d\n\t*%s++%s\n", reg_names[REG_J], current_frame_info.var_size, sp, reg_names[REG_J]);
+ fprintf (file, "\t%s=%ld\n\t*%s++%s\n", reg_names[REG_J], current_frame_info.var_size, sp, reg_names[REG_J]);
else
fatal_error ("Stack size > 32k");
}
{
fprintf (file, "\t%s=%s\n", a1h, sp);
fprintf (file, "\t%s=%s\n", fp, a1h); /* Establish new base frame */
- fprintf (file, "\t%s=%d\n", reg_names[REG_J], -total_size);
+ fprintf (file, "\t%s=%ld\n", reg_names[REG_J], -total_size);
fprintf (file, "\t*%s++%s\n", fp, reg_names[REG_J]);
}
dsp16xx_lshrhi3_libcall = (rtx) 0;
}
-void
+static void
dsp16xx_output_function_epilogue (file, size)
FILE *file;
HOST_WIDE_INT size ATTRIBUTE_UNUSED;
fprintf (file, "\t*%s--\n", sp);
else
{
- fprintf (file, "\t%s=%d\n\t*%s++%s\n",
+ fprintf (file, "\t%s=%ld\n\t*%s++%s\n",
reg_names[REG_J], -current_frame_info.args_size, sp, reg_names[REG_J]);
}
}
fprintf (file, "\t*%s--\n", sp);
else
{
- fprintf (file, "\t%s=%d\n\t*%s++%s\n",
+ fprintf (file, "\t%s=%ld\n\t*%s++%s\n",
reg_names[REG_J], -current_frame_info.var_size, sp, reg_names[REG_J]);
}
}
}
#endif
fprintf (file, "\"%s\"\n", temp_filename);
- fprintf (file, "");
fprintf (file, "#include <%s.h>\n", save_chip_name);
#define REG_YBASE31 57
/* Do we have a accumulator register? */
-#define IS_ACCUM_REG(REGNO) ((REGNO) >= REG_A0 && (REGNO) <= REG_A1L)
+#define IS_ACCUM_REG(REGNO) IN_RANGE ((REGNO), REG_A0, REG_A1L)
#define IS_ACCUM_LOW_REG(REGNO) ((REGNO) == REG_A0L || (REGNO) == REG_A1L)
/* Do we have a virtual ybase register */
#define EXTRA_SECTIONS in_const
#define EXTRA_SECTION_FUNCTIONS \
+extern void const_section PARAMS ((void)); \
void \
const_section () \
{ \
case 0:
case 1:
return \"%0&%1\";
+ default:
+ abort();
}
}"
[(set_attr "type" "f3_alu,f3_alu")])
case 2:
return \"*%0++\;*%0++\";
+ default:
+ abort();
}
case 2:
case 10:
case 11:
return \"%0=%b1+%H2\";
+ default:
+ abort();
}
}"
[(set_attr "type" "data_move_memory,data_move_multiple,f3_alu_i,f3_alu_i,f3_alu,f3_alu,f3_alu,f3_alu,f3_alu_i,f3_alu_i,f3_alu_i,f3_alu_i")])
case 7: case 8:
case 9: case 10:
return \"%0=%b1-%H2\";
+ default:
+ abort();
}
}"
[(set_attr "type" "data_move_multiple,f3_alu_i,f3_alu_i,f3_alu,f3_alu,f3_alu,f3_alu,f3_alu_i,f3_alu_i,f3_alu_i,f3_alu_i")])
case 8:
case 9:
return \"\";
+ default:
+ abort();
}
}"
[(set_attr "type" "special,data_move_multiple,f3_alu,data_move_multiple,data_move_multiple,data_move_multiple,data_move_multiple,data_move_multiple,nothing,nothing")])
case 9: case 10:
return \"%0=%1\";
+ default:
+ abort();
}
}"
[(set_attr "type" "data_move,data_move,data_move_short_i,data_move_i,data_move_memory,data_move_memory,data_move_memory,data_move_memory,nothing,malu,malu")])
case 9: case 10:
return \"%0=%1\";
+ default:
+ abort();
}
}"
[(set_attr "type" "data_move,data_move,data_move_short_i,data_move_i,data_move_memory,data_move_memory,data_move_memory,data_move_memory,nothing,malu,malu")])
case 5:
case 6:
return \"%u0=%u1\;%w0=%w1\";
+ default:
+ abort();
}
}"
[(set_attr "type" "move,move,load_i,load,store,load,store")])
;; return \"move %w0=%1\;%0=0\";
;; else
;; return \"%w0=%1\;%0=0\";
+;; default:
+;; abort();
;; }
;; }")
case 3:
return \"%0 = extractz(%m1, 0x1000)\";
+ default:
+ abort();
}
}"
[(set_attr "type" "data_move_2,data_move_2,data_move_2,shift_i")])
}
else
return \"%w0=%1\;%0=0\";
+ default:
+ abort();
}
}"
[(set_attr "type" "data_move_2,data_move_2,data_move_2")])
/*}}}*/ \f
/*{{{ CONSTANTS. */
-/* Return true if a value is inside a range */
-#define IN_RANGE(VALUE, LOW, HIGH) \
- ( ((unsigned HOST_WIDE_INT)((VALUE) - (LOW))) \
- <= ((unsigned HOST_WIDE_INT)( (HIGH) - (LOW))))
-
/* A C expression that defines the machine-dependent operand constraint letters
(`I', `J', `K', .. 'P') that specify particular ranges of integer values.
If C is one of those letters, the expression should check that VALUE, an
#define ASM_OUTPUT_MI_THUNK(FILE, THUNK_FNDECL, DELTA, FUNCTION) \
do { \
if (CONST_OK_FOR_I (DELTA)) \
- fprintf (FILE, "\tadds r32 = %d, r32\n", (DELTA)); \
+ { \
+ fprintf (FILE, "\tadds r32 = "); \
+ fprintf (FILE, HOST_WIDE_INT_PRINT_DEC, (DELTA)); \
+ fprintf (FILE, ", r32\n"); \
+ } \
else \
{ \
if (CONST_OK_FOR_J (DELTA)) \
- fprintf (FILE, "\taddl r2 = %d, r0\n", (DELTA)); \
+ { \
+ fprintf (FILE, "\taddl r2 = "); \
+ fprintf (FILE, HOST_WIDE_INT_PRINT_DEC, (DELTA)); \
+ fprintf (FILE, ", r0\n"); \
+ } \
else \
- fprintf (FILE, "\tmovl r2 = %d\n", (DELTA)); \
+ { \
+ fprintf (FILE, "\tmovl r2 = "); \
+ fprintf (FILE, HOST_WIDE_INT_PRINT_DEC, (DELTA)); \
+ fprintf (FILE, "\n"); \
+ } \
fprintf (FILE, "\t;;\n"); \
fprintf (FILE, "\tadd r32 = r2, r32\n"); \
} \
extern const char * mcore_output_bclri PARAMS ((rtx, int));
extern const char * mcore_output_bseti PARAMS ((rtx, int));
-extern const char * mcore_output_cmov PARAMS ((rtx *, int, char *));
+extern const char * mcore_output_cmov PARAMS ((rtx *, int, const char *));
extern char * mcore_output_call PARAMS ((rtx *, int));
extern int mcore_is_dead PARAMS ((rtx, rtx));
extern int mcore_expand_insv PARAMS ((rtx *));
mcore_output_cmov (operands, cmp_t, test)
rtx operands[];
int cmp_t;
- char * test;
+ const char * test;
{
int load_value;
int adjust_value;
ASM_DECLARE_OBJECT_NAME and then switch back to the original section
afterwards. */
#define SWITCH_SECTION_FUNCTION \
-void \
+static void switch_to_section PARAMS ((enum in_section, tree)); \
+static void \
switch_to_section (section, decl) \
enum in_section section; \
tree decl; \
|| (reg_renumber[regno] > 3 && reg_renumber[regno] < FIRST_PSEUDO_REGISTER))
#define REGNO_OK_FOR_INDEX_P(regno) \
- (((regno) >= 0 && regno < 4) \
+ (IN_RANGE ((regno), 0, 3) \
|| (reg_renumber[regno] >= 0 && reg_renumber[regno] < 4))
/* Nonzero if X is a hard reg that can be used as an index
or if it is a pseudo reg. */
#define REG_OK_FOR_INDEX_P(X) \
- (((REGNO (X) >= 0 && REGNO(X) <= 3) || REGNO (X) >= FIRST_PSEUDO_REGISTER))
+ (IN_RANGE (REGNO (X), 0, 3) || REGNO (X) >= FIRST_PSEUDO_REGISTER)
/* Nonzero if X is a hard reg that can be used as a base reg
or if it is a pseudo reg. */
#define REG_OK_FOR_BASE_P(X) \
(((regno) >= (min) && (regno) <= (max)) || (regno) >= FIRST_PSEUDO_REGISTER)
#else
# define REGNO_IN_RANGE_P(regno,min,max) \
- (((regno) >= (min) && (regno) <= (max)) \
+ (IN_RANGE ((regno), (min), (max)) \
|| (reg_renumber \
&& reg_renumber[(regno)] >= (min) && reg_renumber[(regno)] <= (max)))
#endif
extern void sdata2_section PARAMS ((void));
extern void sbss_section PARAMS ((void));
extern void private_data_section PARAMS ((void));
+extern void read_only_data_section PARAMS ((void));
+extern void read_only_private_data_section PARAMS ((void));
extern int get_TOC_alias_set PARAMS ((void));
extern int uses_TOC PARAMS ((void));
extern void rs6000_emit_prologue PARAMS ((void));
/* This is how to output an assembler line for a numeric constant byte. */
#define ASM_OUTPUT_BYTE(FILE,VALUE) \
- fprintf (FILE, "\t.byte 0x%x\n", (VALUE))
+ fprintf (FILE, "\t.byte 0x%x\n", (int)(VALUE))
/* This is used by the definition of ASM_OUTPUT_ADDR_ELT in defaults.h. */
#define ASM_LONG (TARGET_32BIT ? ".long" : DOUBLE_INT_ASM_OP)
static int
sh_adjust_cost (insn, link, dep_insn, cost)
rtx insn;
- rtx link;
+ rtx link ATTRIBUTE_UNUSED;
rtx dep_insn;
int cost;
{
#define LAST_XD_REG (FIRST_XD_REG + 7)
#define GENERAL_REGISTER_P(REGNO) \
- ((REGNO) >= FIRST_GENERAL_REG && (REGNO) <= LAST_GENERAL_REG)
+ IN_RANGE ((REGNO), FIRST_GENERAL_REG, LAST_GENERAL_REG)
#define GENERAL_OR_AP_REGISTER_P(REGNO) \
(GENERAL_REGISTER_P (REGNO) || ((REGNO) == AP_REG))