diff options
author | Kaveh R. Ghazi <ghazi@caip.rutgers.edu> | 2003-05-16 21:31:37 +0000 |
---|---|---|
committer | Kaveh Ghazi <ghazi@gcc.gnu.org> | 2003-05-16 21:31:37 +0000 |
commit | 94c5db545027930ae1bea5523c346c13eefdeb78 (patch) | |
tree | de802b2e35153f15acf935aac68c5820cf4c6b4e /gcc/config | |
parent | 1bdfacf6ea02d9aed8b945aa79dd4482050ea858 (diff) | |
download | gcc-94c5db545027930ae1bea5523c346c13eefdeb78.zip gcc-94c5db545027930ae1bea5523c346c13eefdeb78.tar.gz gcc-94c5db545027930ae1bea5523c346c13eefdeb78.tar.bz2 |
i370.c (ascebc, ebcasc): Wrap in macros controlling usage.
* i370.c (ascebc, ebcasc): Wrap in macros controlling usage.
(i370_output_function_prologue): Fix format specifier warnings.
* i370.h (PRINT_OPERAND): Likewise.
From-SVN: r66884
Diffstat (limited to 'gcc/config')
-rw-r--r-- | gcc/config/i370/i370.c | 13 | ||||
-rw-r--r-- | gcc/config/i370/i370.h | 38 |
2 files changed, 30 insertions, 21 deletions
diff --git a/gcc/config/i370/i370.c b/gcc/config/i370/i370.c index d5ab6ce..5dc6301 100644 --- a/gcc/config/i370/i370.c +++ b/gcc/config/i370/i370.c @@ -173,6 +173,7 @@ static const char *const mvs_function_table[MVS_FUNCTION_TABLE_LENGTH] = #endif /* TARGET_HLASM */ /* ===================================================== */ +#if defined(TARGET_EBCDIC) && !defined(HOST_EBCDIC) /* ASCII to EBCDIC conversion table. */ static const unsigned char ascebc[256] = { @@ -225,7 +226,10 @@ static const unsigned char ascebc[256] = 0x3F, 0x3F, 0x3F, 0x3F, 0x3F, 0x3F, 0x3F, 0x3F, 0x3F, 0x3F, 0x3F, 0x3F, 0x3F, 0x3F, 0x3F, 0xFF }; +#endif /* TARGET_EBCDIC && ! HOST_EBCDIC */ + +#if defined(HOST_EBCDIC) && !defined(TARGET_EBCDIC) /* EBCDIC to ASCII conversion table. */ static const unsigned char ebcasc[256] = { @@ -294,6 +298,7 @@ static const unsigned char ebcasc[256] = /*F8 8 9 */ 0x38, 0x39, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF }; +#endif /* HOST_EBCDIC && ! TARGET_EBCDIC */ /* Initialize the GCC target structure. */ #ifdef TARGET_HLASM @@ -1302,8 +1307,9 @@ i370_output_function_prologue (f, l) fprintf (f, "* Function %s prologue\n", mvs_function_name); fprintf (f, "FDSE%03d\tDSECT\n", function_label_index); fprintf (f, "\tDS\tD\n"); - fprintf (f, "\tDS\tCL(%d)\n", STACK_POINTER_OFFSET + l - + current_function_outgoing_args_size); + fprintf (f, "\tDS\tCL(" HOST_WIDE_INT_PRINT_DEC ")\n", + STACK_POINTER_OFFSET + l + + current_function_outgoing_args_size); fprintf (f, "\tORG\tFDSE%03d\n", function_label_index); fprintf (f, "\tDS\tCL(120+8)\n"); fprintf (f, "\tORG\n"); @@ -1491,7 +1497,8 @@ i370_output_function_prologue (f, frame_size) aligned_size = (stackframe_size + 7) >> 3; aligned_size <<= 3; - fprintf (f, "# arg_size=0x%x frame_size=0x%x aligned size=0x%x\n", + fprintf (f, "# arg_size=0x%x frame_size=" HOST_WIDE_INT_PRINT_HEX + " aligned size=0x%x\n", current_function_outgoing_args_size, frame_size, aligned_size); fprintf (f, "\t.using\t.,r15\n"); diff --git a/gcc/config/i370/i370.h b/gcc/config/i370/i370.h index 8489da0..48ade28 100644 --- a/gcc/config/i370/i370.h +++ b/gcc/config/i370/i370.h @@ -1249,7 +1249,7 @@ enum reg_class if (CODE == 'O') \ { \ if (GET_CODE (addr) == PLUS) \ - fprintf (FILE, "%d", INTVAL (XEXP (addr, 1))); \ + fprintf (FILE, HOST_WIDE_INT_PRINT_DEC, INTVAL (XEXP (addr, 1))); \ else \ fprintf (FILE, "0"); \ } \ @@ -1274,21 +1274,21 @@ enum reg_class break; \ case CONST_INT: \ if (CODE == 'B') \ - fprintf (FILE, "%d", INTVAL (XV) & 0xff); \ + fprintf (FILE, "%d", (int) (INTVAL (XV) & 0xff)); \ else if (CODE == 'X') \ - fprintf (FILE, "%02X", INTVAL (XV) & 0xff); \ + fprintf (FILE, "%02X", (int) (INTVAL (XV) & 0xff)); \ else if (CODE == 'h') \ - fprintf (FILE, "%d", (INTVAL (XV) << 16) >> 16); \ + fprintf (FILE, HOST_WIDE_INT_PRINT_DEC, (INTVAL (XV) << 16) >> 16); \ else if (CODE == 'H') \ { \ mvs_page_lit += 2; \ - fprintf (FILE, "=H'%d'", (INTVAL (XV) << 16) >> 16); \ + fprintf (FILE, "=H'" HOST_WIDE_INT_PRINT_DEC "'", (INTVAL (XV) << 16) >> 16); \ } \ else if (CODE == 'K') \ { \ /* auto sign-extension of signed 16-bit to signed 32-bit */ \ mvs_page_lit += 4; \ - fprintf (FILE, "=F'%d'", (INTVAL (XV) << 16) >> 16); \ + fprintf (FILE, "=F'" HOST_WIDE_INT_PRINT_DEC "'", (INTVAL (XV) << 16) >> 16); \ } \ else if (CODE == 'W') \ { \ @@ -1304,7 +1304,7 @@ enum reg_class else \ { \ mvs_page_lit += 4; \ - fprintf (FILE, "=F'%d'", INTVAL (XV)); \ + fprintf (FILE, "=F'" HOST_WIDE_INT_PRINT_DEC "'", INTVAL (XV)); \ } \ break; \ case CONST_DOUBLE: \ @@ -1362,8 +1362,8 @@ enum reg_class fprintf (FILE, "=V("); \ ASM_OUTPUT_LABELREF (FILE, \ XSTR (XEXP (XEXP (XV, 0), 0), 0)); \ - fprintf (FILE, ")\n\tA\t%s,=F'%d'", curreg, \ - INTVAL (XEXP (XEXP (XV, 0), 1))); \ + fprintf (FILE, ")\n\tA\t%s,=F'" HOST_WIDE_INT_PRINT_DEC "'", \ + curreg, INTVAL (XEXP (XEXP (XV, 0), 1))); \ } \ else \ { \ @@ -1543,7 +1543,7 @@ enum reg_class if (CODE == 'O') \ { \ if (GET_CODE (addr) == PLUS) \ - fprintf (FILE, "%d", INTVAL (XEXP (addr, 1))); \ + fprintf (FILE, HOST_WIDE_INT_PRINT_DEC, INTVAL (XEXP (addr, 1))); \ else \ fprintf (FILE, "0"); \ } \ @@ -1568,21 +1568,23 @@ enum reg_class break; \ case CONST_INT: \ if (CODE == 'B') \ - fprintf (FILE, "%d", INTVAL (XV) & 0xff); \ + fprintf (FILE, "%d", (int) (INTVAL (XV) & 0xff)); \ else if (CODE == 'X') \ - fprintf (FILE, "%02X", INTVAL (XV) & 0xff); \ + fprintf (FILE, "%02X", (int) (INTVAL (XV) & 0xff)); \ else if (CODE == 'h') \ - fprintf (FILE, "%d", (INTVAL (XV) << 16) >> 16); \ + fprintf (FILE, HOST_WIDE_INT_PRINT_DEC, (INTVAL (XV) << 16) >> 16); \ else if (CODE == 'H') \ { \ mvs_page_lit += 2; \ - fprintf (FILE, "=H'%d'", (INTVAL (XV) << 16) >> 16); \ + fprintf (FILE, "=H'" HOST_WIDE_INT_PRINT_DEC "'", \ + (INTVAL (XV) << 16) >> 16); \ } \ else if (CODE == 'K') \ { \ /* auto sign-extension of signed 16-bit to signed 32-bit */ \ mvs_page_lit += 4; \ - fprintf (FILE, "=F'%d'", (INTVAL (XV) << 16) >> 16); \ + fprintf (FILE, "=F'" HOST_WIDE_INT_PRINT_DEC "'", \ + (INTVAL (XV) << 16) >> 16); \ } \ else if (CODE == 'W') \ { \ @@ -1598,7 +1600,7 @@ enum reg_class else \ { \ mvs_page_lit += 4; \ - fprintf (FILE, "=F'%d'", INTVAL (XV)); \ + fprintf (FILE, "=F'" HOST_WIDE_INT_PRINT_DEC "'", INTVAL (XV)); \ } \ break; \ case CONST_DOUBLE: \ @@ -1656,8 +1658,8 @@ enum reg_class fprintf (FILE, "=V("); \ ASM_OUTPUT_LABELREF (FILE, \ XSTR (XEXP (XEXP (XV, 0), 0), 0)); \ - fprintf (FILE, ")\n\tA\t%s,=F'%d'", curreg, \ - INTVAL (XEXP (XEXP (XV, 0), 1))); \ + fprintf (FILE, ")\n\tA\t%s,=F'" HOST_WIDE_INT_PRINT_DEC "'", \ + curreg, INTVAL (XEXP (XEXP (XV, 0), 1))); \ } \ else \ { \ |