2003-05-16 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
+ * alpha.c (print_operand_address, alpha_start_function,
+ unicosmk_output_ssib): Use string concatentation on
+ HOST_WIDE_INT_PRINT_* format specifier to collapse multiple
+ function calls into one.
+ * arm.c (arm_print_operand): Likewise.
+ * cris.c (cris_asm_output_mi_thunk): Likewise.
+ * frv.c (frv_asm_output_mi_thunk): Likewise.
+ * ia64.c (ia64_print_operand, process_set): Likewise.
+ * m68k.c (m68k_output_function_epilogue, m68k_output_mi_thunk):
+ Likewise.
+ * mips/iris5gas.h (PUT_SDB_SIZE): Likewise.
+ * mips.h (PUT_SDB_INT_VAL, PUT_SDB_SIZE): Likewise.
+ * pa.c (output_div_insn, pa_asm_output_mi_thunk): Likewise.
+ * pa.h (PRINT_OPERAND_ADDRESS): Likewise.
+ * rs6000.c (rs6000_va_start, print_operand_address): Likewise.
+ * s390.c (s390_assemble_integer): Likewise.
+ * sparc.c (sparc_flat_function_prologue,
+ sparc_flat_function_epilogue): Likewise.
+ * stormy16.c (xstormy16_print_operand_address, xstormy16_print_operand): Likewise.
+ * vax.c (vax_output_mi_thunk): Likewise.
+
* frv.c (frv_print_operand_memory_reference): Fix format specifier
warning.
(frv_rtx_costs): Mark parameter with ATTRIBUTE_UNUSED.
}
if (offset)
- {
- fputc ('+', file);
- fprintf (file, HOST_WIDE_INT_PRINT_DEC, offset);
- }
+ fprintf (file, "+" HOST_WIDE_INT_PRINT_DEC, offset);
addr = XEXP (addr, 0);
if (GET_CODE (addr) == REG)
else
abort ();
- fprintf (file, HOST_WIDE_INT_PRINT_DEC, offset);
- fprintf (file, "($%d)", basereg);
+ fprintf (file, HOST_WIDE_INT_PRINT_DEC "($%d)", offset, basereg);
}
\f
/* Emit RTL insns to initialize the variable parts of a trampoline at
if (TARGET_ABI_UNICOSMK)
;
else if (TARGET_ABI_OPEN_VMS)
- {
- fprintf (file, "\t.frame $%d,", vms_unwind_regno);
- fprintf (file, HOST_WIDE_INT_PRINT_DEC,
- frame_size >= (1UL << 31) ? 0 : frame_size);
- fputs (",$26,", file);
- fprintf (file, HOST_WIDE_INT_PRINT_DEC, reg_offset);
- fputs ("\n", file);
- }
+ fprintf (file, "\t.frame $%d," HOST_WIDE_INT_PRINT_DEC ",$26,"
+ HOST_WIDE_INT_PRINT_DEC "\n",
+ vms_unwind_regno,
+ frame_size >= (1UL << 31) ? 0 : frame_size,
+ reg_offset);
else if (!flag_inhibit_size_directive)
- {
- fprintf (file, "\t.frame $%d,",
- (frame_pointer_needed
- ? HARD_FRAME_POINTER_REGNUM : STACK_POINTER_REGNUM));
- fprintf (file, HOST_WIDE_INT_PRINT_DEC,
- frame_size >= (1UL << 31) ? 0 : frame_size);
- fprintf (file, ",$26,%d\n", current_function_pretend_args_size);
- }
+ fprintf (file, "\t.frame $%d," HOST_WIDE_INT_PRINT_DEC ",$26,%d\n",
+ (frame_pointer_needed
+ ? HARD_FRAME_POINTER_REGNUM : STACK_POINTER_REGNUM),
+ frame_size >= (1UL << 31) ? 0 : frame_size,
+ current_function_pretend_args_size);
/* Describe which registers were spilled. */
if (TARGET_ABI_UNICOSMK)
{
if (imask)
{
- fprintf (file, "\t.mask 0x%lx,", imask);
- fprintf (file, HOST_WIDE_INT_PRINT_DEC,
+ fprintf (file, "\t.mask 0x%lx," HOST_WIDE_INT_PRINT_DEC "\n", imask,
frame_size >= (1UL << 31) ? 0 : reg_offset - frame_size);
- putc ('\n', file);
for (i = 0; i < 32; ++i)
if (imask & (1UL << i))
}
if (fmask)
- {
- fprintf (file, "\t.fmask 0x%lx,", fmask);
- fprintf (file, HOST_WIDE_INT_PRINT_DEC,
- frame_size >= (1UL << 31) ? 0 : reg_offset - frame_size);
- putc ('\n', file);
- }
+ fprintf (file, "\t.fmask 0x%lx," HOST_WIDE_INT_PRINT_DEC "\n", fmask,
+ frame_size >= (1UL << 31) ? 0 : reg_offset - frame_size);
}
#if TARGET_ABI_OPEN_VMS
for (x = machine->first_ciw; x; x = XEXP (x, 1))
{
ciw = XEXP (x, 0);
- fprintf (file, "\t.quad\t");
#if HOST_BITS_PER_WIDE_INT == 32
- fprintf (file, HOST_WIDE_INT_PRINT_DOUBLE_HEX,
+ fprintf (file, "\t.quad\t" HOST_WIDE_INT_PRINT_DOUBLE_HEX "\n",
CONST_DOUBLE_HIGH (ciw), CONST_DOUBLE_LOW (ciw));
#else
- fprintf (file, HOST_WIDE_INT_PRINT_HEX, INTVAL (ciw));
+ fprintf (file, "\t.quad\t" HOST_WIDE_INT_PRINT_HEX "\n", INTVAL (ciw));
#endif
- fprintf (file, "\n");
}
}
if (val == -1)
arm_print_operand (stream, XEXP (x, 1), 0);
else
- {
- fputc ('#', stream);
- fprintf (stream, HOST_WIDE_INT_PRINT_DEC, val);
- }
+ fprintf (stream, "#" HOST_WIDE_INT_PRINT_DEC, val);
}
}
return;
tree funcdecl;
{
if (delta > 0)
- {
- fprintf (stream, "\tadd%s ", ADDITIVE_SIZE_MODIFIER (delta));
- fprintf (stream, HOST_WIDE_INT_PRINT_DEC, delta);
- fprintf (stream, ",$%s\n", reg_names[CRIS_FIRST_ARG_REG]);
- }
+ fprintf (stream, "\tadd%s " HOST_WIDE_INT_PRINT_DEC ",$%s\n",
+ ADDITIVE_SIZE_MODIFIER (delta), delta,
+ reg_names[CRIS_FIRST_ARG_REG]);
else if (delta < 0)
- {
- fprintf (stream, "\tsub%s ", ADDITIVE_SIZE_MODIFIER (-delta));
- fprintf (stream, HOST_WIDE_INT_PRINT_DEC, -delta);
- fprintf (stream, ",$%s\n", reg_names[CRIS_FIRST_ARG_REG]);
- }
+ fprintf (stream, "\tsub%s " HOST_WIDE_INT_PRINT_DEC ",$%s\n",
+ ADDITIVE_SIZE_MODIFIER (-delta), -delta,
+ reg_names[CRIS_FIRST_ARG_REG]);
if (flag_pic)
{
fprintf (file, "\taddi %s,#%d,%s\n", name_arg0, (int) delta, name_arg0);
else
{
- const char *name_add = reg_names[TEMP_REGNO];
- fprintf (file, "\tsethi%s #hi(", parallel);
- fprintf (file, HOST_WIDE_INT_PRINT_DEC, delta);
- fprintf (file, "),%s\n", name_add);
- fprintf (file, "\tsetlo #lo(");
- fprintf (file, HOST_WIDE_INT_PRINT_DEC, delta);
- fprintf (file, "),%s\n", name_add);
+ const char *const name_add = reg_names[TEMP_REGNO];
+ fprintf (file, "\tsethi%s #hi(" HOST_WIDE_INT_PRINT_DEC "),%s\n",
+ parallel, delta, name_add);
+ fprintf (file, "\tsetlo #lo(" HOST_WIDE_INT_PRINT_DEC "),%s\n",
+ delta, name_add);
fprintf (file, "\tadd %s,%s,%s\n", name_add, name_arg0, name_arg0);
}
break;
}
- putc (',', file);
- putc (' ', file);
- fprintf (file, HOST_WIDE_INT_PRINT_DEC, value);
+ fprintf (file, ", " HOST_WIDE_INT_PRINT_DEC, value);
return;
}
if (op0 == dest && GET_CODE (op1) == CONST_INT)
{
if (INTVAL (op1) < 0)
- {
- fputs ("\t.fframe ", asm_out_file);
- fprintf (asm_out_file, HOST_WIDE_INT_PRINT_DEC,
- -INTVAL (op1));
- fputc ('\n', asm_out_file);
- }
+ fprintf (asm_out_file, "\t.fframe "HOST_WIDE_INT_PRINT_DEC"\n",
+ -INTVAL (op1));
else
process_epilogue ();
}
else if (delta < 0 && delta >= -8)
asm_fprintf (file, "\tsubq.l %I%d,4(%Rsp)\n", (int) -delta);
else
- {
- asm_fprintf (file, "\tadd.l %I");
- fprintf (file, HOST_WIDE_INT_PRINT_DEC, delta);
- asm_fprintf (file, ",4(%Rsp)\n");
- }
+ asm_fprintf (file, "\tadd.l %I" HOST_WIDE_INT_PRINT_DEC ",4(%Rsp)\n",
+ delta);
xops[0] = DECL_RTL (function);
#define PUT_SDB_SIZE(a) \
do { \
extern FILE *asm_out_text_file; \
- fprintf (asm_out_text_file, "\t.esize\t"); \
- fprintf (asm_out_text_file, HOST_WIDE_INT_PRINT_DEC, (HOST_WIDE_INT) (a)); \
- fprintf (asm_out_text_file, ";"); \
+ fprintf (asm_out_text_file, "\t.esize\t" HOST_WIDE_INT_PRINT_DEC ";", \
+ (HOST_WIDE_INT) (a)); \
} while (0)
#undef PUT_SDB_TYPE
#define PUT_SDB_INT_VAL(a) \
do { \
extern FILE *asm_out_text_file; \
- fprintf (asm_out_text_file, "\t.val\t"); \
- fprintf (asm_out_text_file, HOST_WIDE_INT_PRINT_DEC, (HOST_WIDE_INT)(a)); \
- fprintf (asm_out_text_file, ";"); \
+ fprintf (asm_out_text_file, "\t.val\t" HOST_WIDE_INT_PRINT_DEC ";", \
+ (HOST_WIDE_INT)(a)); \
} while (0)
#define PUT_SDB_VAL(a) \
#define PUT_SDB_SIZE(a) \
do { \
extern FILE *asm_out_text_file; \
- fprintf (asm_out_text_file, "\t.size\t"); \
- fprintf (asm_out_text_file, HOST_WIDE_INT_PRINT_DEC, (HOST_WIDE_INT)(a)); \
- fprintf (asm_out_text_file, ";"); \
+ fprintf (asm_out_text_file, "\t.size\t" HOST_WIDE_INT_PRINT_DEC ";", \
+ (HOST_WIDE_INT)(a)); \
} while (0)
#define PUT_SDB_DIM(a) \
}
if (unsignedp)
{
- sprintf (buf, "$$divU_");
- sprintf (buf + 7, HOST_WIDE_INT_PRINT_DEC, INTVAL (operands[0]));
+ sprintf (buf, "$$divU_" HOST_WIDE_INT_PRINT_DEC,
+ INTVAL (operands[0]));
return output_millicode_call (insn,
gen_rtx_SYMBOL_REF (SImode, buf));
}
else
{
- sprintf (buf, "$$divI_");
- sprintf (buf + 7, HOST_WIDE_INT_PRINT_DEC, INTVAL (operands[0]));
+ sprintf (buf, "$$divI_" HOST_WIDE_INT_PRINT_DEC,
+ INTVAL (operands[0]));
return output_millicode_call (insn,
gen_rtx_SYMBOL_REF (SImode, buf));
}
fprintf (file, "\tmtsp %%r1,%%sr0\n");
fprintf (file, "\tbe 0(%%sr0,%%r22)\n\tldo ");
}
- fprintf (file, HOST_WIDE_INT_PRINT_DEC, delta);
- fprintf (file, "(%%r26),%%r26\n");
+ fprintf (file, HOST_WIDE_INT_PRINT_DEC "(%%r26),%%r26\n", delta);
}
else
- {
- fprintf (file, "\tb %s\n\tldo ", target_name);
- fprintf (file, HOST_WIDE_INT_PRINT_DEC, delta);
- fprintf (file, "(%%r26),%%r26\n");
- }
+ fprintf (file, "\tb %s\n\tldo " HOST_WIDE_INT_PRINT_DEC
+ "(%%r26),%%r26\n",
+ target_name, delta);
}
else
{
if (!TARGET_64BIT && !TARGET_PORTABLE_RUNTIME && flag_pic)
{
- fprintf (file, "\taddil L'");
- fprintf (file, HOST_WIDE_INT_PRINT_DEC, delta);
- fprintf (file, ",%%r26\n\tldo R'");
- fprintf (file, HOST_WIDE_INT_PRINT_DEC, delta);
- fprintf (file, "(%%r1),%%r26\n");
+ fprintf (file, "\taddil L'" HOST_WIDE_INT_PRINT_DEC
+ ",%%r26\n\tldo R'" HOST_WIDE_INT_PRINT_DEC "(%%r1),%%r26\n",
+ delta, delta);
fprintf (file, "\taddil LT'%s,%%r19\n", lab);
fprintf (file, "\tldw RT'%s(%%r1),%%r22\n", lab);
fprintf (file, "\tldw 0(%%sr0,%%r22),%%r22\n");
}
}
else
- {
- fprintf (file, "\taddil L'");
- fprintf (file, HOST_WIDE_INT_PRINT_DEC, delta);
- fprintf (file, ",%%r26\n\tb %s\n\tldo R'", target_name);
- fprintf (file, HOST_WIDE_INT_PRINT_DEC, delta);
- fprintf (file, "(%%r1),%%r26\n");
- }
+ fprintf (file, "\taddil L'" HOST_WIDE_INT_PRINT_DEC
+ ",%%r26\n\tb %s\n\tldo R'" HOST_WIDE_INT_PRINT_DEC
+ "(%%r1),%%r26\n", delta, target_name, delta);
}
fprintf (file, "\t.EXIT\n\t.PROCEND\n");
fputs (")", FILE); \
break; \
case CONST_INT: \
- fprintf (FILE, HOST_WIDE_INT_PRINT_DEC, INTVAL (addr)); \
- fprintf (FILE, "(%%r0)"); \
+ fprintf (FILE, HOST_WIDE_INT_PRINT_DEC "(%%r0)", INTVAL (addr)); \
break; \
default: \
output_addr_const (FILE, addr); \
n_fpr = current_function_args_info.fregno - FP_ARG_MIN_REG;
if (TARGET_DEBUG_ARG)
- {
- fputs ("va_start: words = ", stderr);
- fprintf (stderr, HOST_WIDE_INT_PRINT_DEC, words);
- fputs (", n_gpr = ", stderr);
- fprintf (stderr, HOST_WIDE_INT_PRINT_DEC, n_gpr);
- fputs (", n_fpr = ", stderr);
- fprintf (stderr, HOST_WIDE_INT_PRINT_DEC, n_fpr);
- putc ('\n', stderr);
- }
+ fprintf (stderr, "va_start: words = "HOST_WIDE_INT_PRINT_DEC", n_gpr = "
+ HOST_WIDE_INT_PRINT_DEC", n_fpr = "HOST_WIDE_INT_PRINT_DEC"\n",
+ words, n_gpr, n_fpr);
t = build (MODIFY_EXPR, TREE_TYPE (gpr), gpr, build_int_2 (n_gpr, 0));
TREE_SIDE_EFFECTS (t) = 1;
reg_names[ REGNO (XEXP (x, 1)) ]);
}
else if (GET_CODE (x) == PLUS && GET_CODE (XEXP (x, 1)) == CONST_INT)
- {
- fprintf (file, HOST_WIDE_INT_PRINT_DEC, INTVAL (XEXP (x, 1)));
- fprintf (file, "(%s)", reg_names[ REGNO (XEXP (x, 0)) ]);
- }
+ fprintf (file, HOST_WIDE_INT_PRINT_DEC "(%s)",
+ INTVAL (XEXP (x, 1)), reg_names[ REGNO (XEXP (x, 0)) ]);
#if TARGET_ELF
else if (GET_CODE (x) == LO_SUM && GET_CODE (XEXP (x, 0)) == REG
&& CONSTANT_P (XEXP (x, 1)))
if (size == 8 && aligned_p
&& GET_CODE (x) == CONST_INT && INTVAL (x) < INT_MIN)
{
- fputs ("\t.quad\t", asm_out_file);
- fprintf (asm_out_file, HOST_WIDE_INT_PRINT_HEX, INTVAL (x));
- putc ('\n', asm_out_file);
+ fprintf (asm_out_file, "\t.quad\t" HOST_WIDE_INT_PRINT_HEX "\n",
+ INTVAL (x));
return true;
}
return default_assemble_integer (x, size, aligned_p);
}
else
{
- fprintf (file, "\tset\t");
- fprintf (file, HOST_WIDE_INT_PRINT_DEC, size);
- fprintf (file, ", %s\n\tsub\t%s, %s, %s\n",
- t1_str, sp_str, t1_str, sp_str);
+ fprintf (file, "\tset\t" HOST_WIDE_INT_PRINT_DEC
+ ", %s\n\tsub\t%s, %s, %s\n",
+ size, t1_str, sp_str, t1_str, sp_str);
if (gmask & HARD_FRAME_POINTER_MASK)
{
fprintf (file, "\tst\t%s, [%s+%d]\n",
}
else
{
- fprintf (file, "\tset\t");
- fprintf (file, HOST_WIDE_INT_PRINT_DEC, size1);
- fprintf (file, ", %s\n\tsub\t%s, %s, %s\n",
- t1_str, sp_str, t1_str, sp_str);
+ fprintf (file, "\tset\t" HOST_WIDE_INT_PRINT_DEC
+ ", %s\n\tsub\t%s, %s, %s\n",
+ size1, t1_str, sp_str, t1_str, sp_str);
if (gmask & HARD_FRAME_POINTER_MASK)
{
fprintf (file, "\tst\t%s, [%s+%d]\n\tadd\t%s, %s, %s\t%s# set up frame pointer\n",
gmask & ~(HARD_FRAME_POINTER_MASK | RETURN_ADDR_MASK),
current_frame_info.fmask,
"st", "std", -size1);
- fprintf (file, "\tset\t");
- fprintf (file, HOST_WIDE_INT_PRINT_DEC, size - size1);
- fprintf (file, ", %s\n\tsub\t%s, %s, %s\n",
- t1_str, sp_str, t1_str, sp_str);
+ fprintf (file, "\tset\t" HOST_WIDE_INT_PRINT_DEC
+ ", %s\n\tsub\t%s, %s, %s\n",
+ size - size1, t1_str, sp_str, t1_str, sp_str);
if (dwarf2out_do_frame ())
if (! (gmask & HARD_FRAME_POINTER_MASK))
dwarf2out_def_cfa ("", STACK_POINTER_REGNUM, size);
delay slot if not otherwise filled by the reload sequence. */
if (size > 4095)
- {
- fprintf (file, "\tset\t");
- fprintf (file, HOST_WIDE_INT_PRINT_DEC, size);
- fprintf (file, ", %s\n", t1_str);
- }
+ fprintf (file, "\tset\t" HOST_WIDE_INT_PRINT_DEC ", %s\n",
+ size, t1_str);
if (frame_pointer_needed)
{
/* Offset to register save area from %sp. */
reg_offset = size1 - reg_offset;
- fprintf (file, "\tset\t");
- fprintf (file, HOST_WIDE_INT_PRINT_DEC, size1);
- fprintf (file, ", %s\n\tadd\t%s, %s, %s\n",
- t1_str, sp_str, t1_str, sp_str);
+ fprintf (file, "\tset\t" HOST_WIDE_INT_PRINT_DEC
+ ", %s\n\tadd\t%s, %s, %s\n",
+ size1, t1_str, sp_str, t1_str, sp_str);
}
/* We must restore the frame pointer and return address reg first
{
size -= size1;
if (size > 4095)
- {
- fprintf (file, "\tset\t");
- fprintf (file, HOST_WIDE_INT_PRINT_DEC, size);
- fprintf (file, ", %s\n", t1_str);
- }
+ fprintf (file, "\tset\t" HOST_WIDE_INT_PRINT_DEC ", %s\n",
+ size, t1_str);
}
if (current_function_returns_struct)
if (post_inc)
fputs ("++", file);
if (offset != 0)
- {
- fputc (',', file);
- fprintf (file, HOST_WIDE_INT_PRINT_DEC, offset);
- }
+ fprintf (file, "," HOST_WIDE_INT_PRINT_DEC, offset);
fputc (')', file);
}
if (l == -1)
output_operand_lossage ("`B' operand has multiple bits set");
- fputs (IMMEDIATE_PREFIX, file);
- fprintf (file, HOST_WIDE_INT_PRINT_DEC, l);
+ fprintf (file, IMMEDIATE_PREFIX HOST_WIDE_INT_PRINT_DEC, l);
return;
}
if (code == 'O')
xx = -xx;
- fputs (IMMEDIATE_PREFIX, file);
- fprintf (file, HOST_WIDE_INT_PRINT_DEC, xx - 1);
+ fprintf (file, IMMEDIATE_PREFIX HOST_WIDE_INT_PRINT_DEC, xx - 1);
return;
}
HOST_WIDE_INT vcall_offset ATTRIBUTE_UNUSED;
tree function;
{
- fprintf (file, "\t.word 0x0ffc\n");
- fprintf (file, "\taddl2 $");
- fprintf (file, HOST_WIDE_INT_PRINT_DEC, delta);
+ fprintf (file, "\t.word 0x0ffc\n\taddl2 $" HOST_WIDE_INT_PRINT_DEC, delta);
asm_fprintf (file, ",4(%Rap)\n");
fprintf (file, "\tjmp ");
assemble_name (file, XSTR (XEXP (DECL_RTL (function), 0), 0));