This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Xtensa: committed patch to fix compile warnings
- From: Bob Wilson <bwilson at tensilica dot com>
- To: gcc-patches at gcc dot gnu dot org
- Date: Fri, 24 Jan 2003 14:10:41 -0800
- Subject: Xtensa: committed patch to fix compile warnings
- Organization: Tensilica, Inc.
This patch fixes several compile warnings for Xtensa targets. Tested and
committed on the top-of-trunk.
2003-01-24 Bob Wilson <bob.wilson@acm.org>
* config/xtensa/xtensa.c: Remove unused include of machmode.h.
(xtensa_emit_call, print_operand): Fix printf format strings
to avoid compile warnings.
(xtensa_function_prologue, xtensa_function_epilogue): Change type
of "size" argument to HOST_WIDE_INT to fix compile warnings.
* config/xtensa/xtensa-protos.h
(xtensa_function_prologue, xtensa_function_epilogue): Ditto.
Index: xtensa-protos.h
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/xtensa/xtensa-protos.h,v
retrieving revision 1.6
diff -c -3 -p -r1.6 xtensa-protos.h
*** xtensa-protos.h 22 Nov 2002 00:23:31 -0000 1.6
--- xtensa-protos.h 24 Jan 2003 22:01:26 -0000
*************** extern void xtensa_declare_object
*** 113,120 ****
PARAMS ((FILE *, char *, char *, char *, int));
extern long compute_frame_size PARAMS ((int));
extern int xtensa_frame_pointer_required PARAMS ((void));
! extern void xtensa_function_prologue PARAMS ((FILE *, int));
! extern void xtensa_function_epilogue PARAMS ((FILE *, int));
extern void order_regs_for_local_alloc PARAMS ((void));
#endif /* !__XTENSA_PROTOS_H__ */
--- 113,120 ----
PARAMS ((FILE *, char *, char *, char *, int));
extern long compute_frame_size PARAMS ((int));
extern int xtensa_frame_pointer_required PARAMS ((void));
! extern void xtensa_function_prologue PARAMS ((FILE *, HOST_WIDE_INT));
! extern void xtensa_function_epilogue PARAMS ((FILE *, HOST_WIDE_INT));
extern void order_regs_for_local_alloc PARAMS ((void));
#endif /* !__XTENSA_PROTOS_H__ */
Index: xtensa.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/xtensa/xtensa.c,v
retrieving revision 1.22
diff -c -3 -p -r1.22 xtensa.c
*** xtensa.c 16 Dec 2002 18:22:05 -0000 1.22
--- xtensa.c 24 Jan 2003 22:01:26 -0000
*************** Software Foundation, 59 Temple Place - S
*** 25,31 ****
#include "tm.h"
#include "rtl.h"
#include "regs.h"
- #include "machmode.h"
#include "hard-reg-set.h"
#include "basic-block.h"
#include "real.h"
--- 25,30 ----
*************** xtensa_emit_call (callop, operands)
*** 1668,1674 ****
rtx tgt = operands[callop];
if (GET_CODE (tgt) == CONST_INT)
! sprintf (result, "call8\t0x%x", INTVAL (tgt));
else if (register_operand (tgt, VOIDmode))
sprintf (result, "callx8\t%%%d", callop);
else
--- 1667,1673 ----
rtx tgt = operands[callop];
if (GET_CODE (tgt) == CONST_INT)
! sprintf (result, "call8\t0x%lx", INTVAL (tgt));
else if (register_operand (tgt, VOIDmode))
sprintf (result, "callx8\t%%%d", callop);
else
*************** print_operand (file, op, letter)
*** 1997,2007 ****
}
case 'L':
! fprintf (file, "%d", (32 - INTVAL (op)) & 0x1f);
break;
case 'R':
! fprintf (file, "%d", INTVAL (op) & 0x1f);
break;
case 'x':
--- 1996,2006 ----
}
case 'L':
! fprintf (file, "%ld", (32 - INTVAL (op)) & 0x1f);
break;
case 'R':
! fprintf (file, "%ld", INTVAL (op) & 0x1f);
break;
case 'x':
*************** print_operand (file, op, letter)
*** 2010,2016 ****
case 'd':
default:
! fprintf (file, "%d", INTVAL (op));
break;
}
--- 2009,2015 ----
case 'd':
default:
! fprintf (file, "%ld", INTVAL (op));
break;
}
*************** xtensa_reorg (first)
*** 2271,2277 ****
void
xtensa_function_prologue (file, size)
FILE *file;
! int size ATTRIBUTE_UNUSED;
{
unsigned long tsize = compute_frame_size (get_frame_size ());
--- 2270,2276 ----
void
xtensa_function_prologue (file, size)
FILE *file;
! HOST_WIDE_INT size ATTRIBUTE_UNUSED;
{
unsigned long tsize = compute_frame_size (get_frame_size ());
*************** xtensa_function_prologue (file, size)
*** 2304,2310 ****
void
xtensa_function_epilogue (file, size)
FILE *file;
! int size ATTRIBUTE_UNUSED;
{
rtx insn = get_last_insn ();
/* If the last insn was a BARRIER, we don't have to write anything. */
--- 2303,2309 ----
void
xtensa_function_epilogue (file, size)
FILE *file;
! HOST_WIDE_INT size ATTRIBUTE_UNUSED;
{
rtx insn = get_last_insn ();
/* If the last insn was a BARRIER, we don't have to write anything. */