aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gcc/ChangeLog9
-rw-r--r--gcc/config/s390/linux.h26
-rw-r--r--gcc/config/s390/s390.c9
-rw-r--r--gcc/config/s390/s390.h1
4 files changed, 29 insertions, 16 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 640da38..36bc053 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,12 @@
+2001-10-24 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
+
+ * s390/linux.h (ASM_OUTPUT_BYTE): Fix format specifier warnings.
+ (ASM_OUTPUT_ASCII): Const-ify. Fix signed/unsigned warning.
+ (ASM_OUTPUT_MI_THUNK): Fix format specifier warnings.
+ * s390.c (s390_final_chunkify): Don't use string concatenation.
+ (s390_function_prologue, s390_function_epilogue): Const-ify.
+ * s390.h (FUNCTION_PROFILER): Remove unused variable.
+
2001-10-24 Jakub Jelinek <jakub@redhat.com>
* c-decl.c (finish_decl): Don't add DECL_STMTs for nested function
diff --git a/gcc/config/s390/linux.h b/gcc/config/s390/linux.h
index 3c9ad69..bd5198f 100644
--- a/gcc/config/s390/linux.h
+++ b/gcc/config/s390/linux.h
@@ -166,7 +166,7 @@ do { fprintf (FILE, "%s\t", ASM_LONG); \
/* This is how to output an assembler line for a numeric constant byte. */
#define ASM_OUTPUT_BYTE(FILE, VALUE) \
- fprintf ((FILE), "%s 0x%x\n", ASM_BYTE_OP, (VALUE))
+ fprintf ((FILE), "%s 0x%x\n", ASM_BYTE_OP, (int)(VALUE))
/* internal macro to output long */
#define _ASM_OUTPUT_LONG(FILE, VALUE) \
@@ -224,12 +224,12 @@ do { fprintf (FILE, "%s\t", ASM_LONG); \
#undef ASM_OUTPUT_ASCII
#define ASM_OUTPUT_ASCII(FILE, STR, LENGTH) \
do { \
- register unsigned char *_ascii_bytes = (unsigned char *) (STR); \
- register unsigned char *limit = _ascii_bytes + (LENGTH); \
+ register const unsigned char *_ascii_bytes = (const unsigned char *) (STR); \
+ register const unsigned char *limit = _ascii_bytes + (LENGTH); \
register unsigned bytes_in_chunk = 0; \
for (; _ascii_bytes < limit; _ascii_bytes++) \
{ \
- register unsigned char *p; \
+ register const unsigned char *p; \
if (bytes_in_chunk >= 64) \
{ \
fputc ('\n', (FILE)); \
@@ -237,7 +237,7 @@ do { \
} \
for (p = _ascii_bytes; p < limit && *p != '\0'; p++) \
continue; \
- if (p < limit && (p - _ascii_bytes) <= STRING_LIMIT) \
+ if (p < limit && (p - _ascii_bytes) <= (long)STRING_LIMIT) \
{ \
if (bytes_in_chunk > 0) \
{ \
@@ -307,7 +307,9 @@ do { \
fprintf (FILE, "@GOTENT\n"); \
fprintf (FILE, "\tlg 1,0(1)\n"); \
fprintf (FILE, "\tbr 1\n"); \
- fprintf (FILE, "0:\t.long %d\n",DELTA); \
+ fprintf (FILE, "0:\t.long "); \
+ fprintf (FILE, HOST_WIDE_INT_PRINT_DEC, (DELTA)); \
+ fprintf (FILE, "\n"); \
} \
else \
{ \
@@ -318,7 +320,9 @@ do { \
fprintf (FILE, "\tjg "); \
assemble_name (FILE, XSTR (XEXP (DECL_RTL (FUNCTION), 0), 0)); \
fprintf (FILE, "\n"); \
- fprintf (FILE, "0:\t.long %d\n",DELTA); \
+ fprintf (FILE, "0:\t.long "); \
+ fprintf (FILE, HOST_WIDE_INT_PRINT_DEC, (DELTA)); \
+ fprintf (FILE, "\n"); \
} \
} \
else \
@@ -330,7 +334,9 @@ do { \
fprintf (FILE, "\t.long "); \
assemble_name (FILE, XSTR (XEXP (DECL_RTL (FUNCTION), 0), 0)); \
fprintf (FILE, "@GOT\n"); \
- fprintf (FILE, "\t.long %d\n",DELTA); \
+ fprintf (FILE, "\t.long "); \
+ fprintf (FILE, HOST_WIDE_INT_PRINT_DEC, (DELTA)); \
+ fprintf (FILE, "\n"); \
fprintf (FILE, "0:\tal %d,8(1)\n", \
aggregate_value_p (TREE_TYPE \
(TREE_TYPE (FUNCTION))) ? 3 : 2 ); \
@@ -344,7 +350,9 @@ do { \
fprintf (FILE, "\t.long "); \
assemble_name (FILE, XSTR (XEXP (DECL_RTL (FUNCTION), 0), 0)); \
fprintf (FILE, "-.\n"); \
- fprintf (FILE, "\t.long %d\n",DELTA); \
+ fprintf (FILE, "\t.long "); \
+ fprintf (FILE, HOST_WIDE_INT_PRINT_DEC, (DELTA)); \
+ fprintf (FILE, "\n"); \
fprintf (FILE, "0:\tal %d,4(1)\n", \
aggregate_value_p (TREE_TYPE \
(TREE_TYPE (FUNCTION))) ? 3 : 2 ); \
diff --git a/gcc/config/s390/s390.c b/gcc/config/s390/s390.c
index d287859..72ab963 100644
--- a/gcc/config/s390/s390.c
+++ b/gcc/config/s390/s390.c
@@ -2161,8 +2161,7 @@ s390_final_chunkify (chunkify)
{
debug_rtx (insn);
debug_rtx (tmp);
- fprintf (stderr, "s390 multiple literalpool support:"
- "\n No code label between this insn %X %X",
+ fprintf (stderr, "s390 multiple literalpool support:\n No code label between this insn %X %X",
naddr, INSN_ADDRESSES (INSN_UID (tmp)));
abort ();
}
@@ -2487,8 +2486,7 @@ s390_function_prologue (file, lsize)
long frame_size;
rtx stack_label = 0, got_label = 0;
char *l;
- char b64[2] = " ";
- b64[0] = TARGET_64BIT ? 'g' : '\0';
+ const char *const b64 = TARGET_64BIT ? "g" : "";
/* Check for too large size of local variables */
@@ -2801,9 +2799,8 @@ s390_function_epilogue (file, lsize)
long frame_size;
int return_reg = RETURN_REGNUM;
int fp, offset;
- char b64[2] = " ";
+ const char *const b64 = TARGET_64BIT ? "g" : "";
- b64[0] = TARGET_64BIT ? 'g' : '\0';
frame_size = STARTING_FRAME_OFFSET + lsize + save_fprs_p () * 64;
if (current_function_uses_pic_offset_table)
diff --git a/gcc/config/s390/s390.h b/gcc/config/s390/s390.h
index 90ba647..468b49ea 100644
--- a/gcc/config/s390/s390.h
+++ b/gcc/config/s390/s390.h
@@ -814,7 +814,6 @@ CUMULATIVE_ARGS;
do { \
extern rtx s390_profile[]; \
extern int s390_pool_count; \
- rtx tmp; \
static char label[128]; \
fprintf (FILE, "# function profiler \n"); \
if (TARGET_64BIT) \