diff options
Diffstat (limited to 'gcc/config/nds32/nds32.c')
-rw-r--r-- | gcc/config/nds32/nds32.c | 22 |
1 files changed, 13 insertions, 9 deletions
diff --git a/gcc/config/nds32/nds32.c b/gcc/config/nds32/nds32.c index 02b1eb4..e0836d8 100644 --- a/gcc/config/nds32/nds32.c +++ b/gcc/config/nds32/nds32.c @@ -1689,18 +1689,22 @@ nds32_asm_output_mi_thunk (FILE *file, tree thunk ATTRIBUTE_UNUSED, { if (satisfies_constraint_Is15 (GEN_INT (delta))) { - fprintf (file, "\taddi\t$r%d, $r%d, %ld\n", + fprintf (file, "\taddi\t$r%d, $r%d, " HOST_WIDE_INT_PRINT_DEC "\n", this_regno, this_regno, delta); } else if (satisfies_constraint_Is20 (GEN_INT (delta))) { - fprintf (file, "\tmovi\t$ta, %ld\n", delta); + fprintf (file, "\tmovi\t$ta, " HOST_WIDE_INT_PRINT_DEC "\n", delta); fprintf (file, "\tadd\t$r%d, $r%d, $ta\n", this_regno, this_regno); } else { - fprintf (file, "\tsethi\t$ta, hi20(%ld)\n", delta); - fprintf (file, "\tori\t$ta, $ta, lo12(%ld)\n", delta); + fprintf (file, + "\tsethi\t$ta, hi20(" HOST_WIDE_INT_PRINT_DEC ")\n", + delta); + fprintf (file, + "\tori\t$ta, $ta, lo12(" HOST_WIDE_INT_PRINT_DEC ")\n", + delta); fprintf (file, "\tadd\t$r%d, $r%d, $ta\n", this_regno, this_regno); } } @@ -2318,7 +2322,7 @@ nds32_print_operand (FILE *stream, rtx x, int code) { /* If user gives integer value directly (0~1023), we just print out the value. */ - fprintf (stream, "%d", op_value); + fprintf (stream, HOST_WIDE_INT_PRINT_DEC, op_value); } else if (op_value < 0 || op_value >= ((int) ARRAY_SIZE (nds32_intrinsic_register_names) @@ -2429,8 +2433,8 @@ nds32_print_operand_address (FILE *stream, machine_mode /*mode*/, rtx x) if (REG_P (op0) && CONST_INT_P (op1)) { /* [Ra + imm] */ - fprintf (stream, "[%s + (%d)]", - reg_names[REGNO (op0)], (int)INTVAL (op1)); + fprintf (stream, "[%s + (" HOST_WIDE_INT_PRINT_DEC ")]", + reg_names[REGNO (op0)], INTVAL (op1)); } else if (REG_P (op0) && REG_P (op1)) { @@ -2501,8 +2505,8 @@ nds32_print_operand_address (FILE *stream, machine_mode /*mode*/, rtx x) else if (REG_P (op0) && CONST_INT_P (op1)) { /* [Ra], imm */ - fprintf (stream, "[%s], %d", - reg_names[REGNO (op0)], (int)INTVAL (op1)); + fprintf (stream, "[%s], " HOST_WIDE_INT_PRINT_DEC, + reg_names[REGNO (op0)], INTVAL (op1)); } else { |