Fix compile time warnings
From-SVN: r43199
This commit is contained in:
parent
d4a6cf3861
commit
16f104b32c
@ -1,3 +1,21 @@
|
||||
2001-06-11 Nick Clifton <nickc@cambridge.redhat.com>
|
||||
|
||||
* config/m32r/m32r.md (movstrsi_internal): Do not expect a
|
||||
return string from m32r_output_block_move.
|
||||
* config/m32r/m32r-protos.h: Make m32r_output_block_move a
|
||||
void function.
|
||||
* config/m32r/m32r.h (INT32_P): Rename to UNIT32_P and remove
|
||||
integer overflow.
|
||||
(ROUND_ADVANCE): Remove signed/unsigned conflict.
|
||||
* config/m32r/m32r.c: Declare prototypes for static functions.
|
||||
(move_src_operand): Replace INT32_P with UINT32_P.
|
||||
(function_arg_partial_nregs): Fixed signed/unsigned conflict
|
||||
in initialisation of 'size'.
|
||||
(m32r_sched_reord): Remove redundant declarations of 'code'.
|
||||
(m32r_output_block_move): Change to a void function.
|
||||
(m32r_encode_section_info): Cast return of
|
||||
TREE_STRING_POINTER to avoid compile time warning.
|
||||
|
||||
2001-06-11 Richard Henderson <rth@redhat.com>
|
||||
|
||||
* config/alpha/osf5.h (TARGET_LD_BUGGY_LDGP): New.
|
||||
|
@ -1,5 +1,5 @@
|
||||
/* Prototypes for m32r.c functions used in the md file & elsewhere.
|
||||
Copyright (C) 1999, 2000 Free Software Foundation, Inc.
|
||||
Copyright (C) 1999, 2000, 2001 Free Software Foundation, Inc.
|
||||
|
||||
This file is part of GNU CC.
|
||||
|
||||
@ -60,7 +60,7 @@ extern int m32r_address_code PARAMS ((rtx));
|
||||
extern void m32r_initialize_trampoline PARAMS ((rtx, rtx, rtx));
|
||||
extern int zero_and_one PARAMS ((rtx, rtx));
|
||||
extern char * emit_cond_move PARAMS ((rtx *, rtx));
|
||||
extern char * m32r_output_block_move PARAMS ((rtx, rtx *));
|
||||
extern void m32r_output_block_move PARAMS ((rtx, rtx *));
|
||||
extern void m32r_expand_block_move PARAMS ((rtx *));
|
||||
extern void m32r_print_operand PARAMS ((FILE *, rtx, int));
|
||||
extern void m32r_print_operand_address PARAMS ((FILE *, rtx));
|
||||
|
@ -1,5 +1,5 @@
|
||||
/* Subroutines used for code generation on the Mitsubishi M32R cpu.
|
||||
Copyright (C) 1996, 1997, 1998, 1999, 2000 Free Software Foundation, Inc.
|
||||
Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001 Free Software Foundation, Inc.
|
||||
|
||||
This file is part of GNU CC.
|
||||
|
||||
@ -34,6 +34,7 @@ Boston, MA 02111-1307, USA. */
|
||||
#include "function.h"
|
||||
#include "recog.h"
|
||||
#include "toplev.h"
|
||||
#include "ggc.h"
|
||||
#include "m32r-protos.h"
|
||||
|
||||
/* Save the operands last given to a compare for use when we
|
||||
@ -55,7 +56,9 @@ enum m32r_sdata m32r_sdata;
|
||||
int m32r_sched_odd_word_p;
|
||||
|
||||
/* Forward declaration. */
|
||||
static void init_reg_tables PARAMS ((void));
|
||||
static void init_reg_tables PARAMS ((void));
|
||||
static void block_move_call PARAMS ((rtx, rtx, rtx));
|
||||
static int m32r_is_insn PARAMS ((rtx));
|
||||
|
||||
/* Called by OVERRIDE_OPTIONS to initialize various things. */
|
||||
|
||||
@ -372,7 +375,7 @@ m32r_encode_section_info (decl)
|
||||
if (TREE_CODE_CLASS (TREE_CODE (decl)) == 'd'
|
||||
&& DECL_SECTION_NAME (decl) != NULL_TREE)
|
||||
{
|
||||
char *name = TREE_STRING_POINTER (DECL_SECTION_NAME (decl));
|
||||
char *name = (char *) TREE_STRING_POINTER (DECL_SECTION_NAME (decl));
|
||||
if (! strcmp (name, ".sdata") || ! strcmp (name, ".sbss"))
|
||||
{
|
||||
#if 0 /* ??? There's no reason to disallow this, is there? */
|
||||
@ -436,6 +439,7 @@ m32r_encode_section_info (decl)
|
||||
const char *str = XSTR (XEXP (rtl, 0), 0);
|
||||
int len = strlen (str);
|
||||
char *newstr = ggc_alloc (len + 2);
|
||||
|
||||
strcpy (newstr + 1, str);
|
||||
*newstr = prefix;
|
||||
XSTR (XEXP (rtl, 0), 0) = newstr;
|
||||
@ -744,7 +748,7 @@ move_src_operand (op, mode)
|
||||
loadable with one insn, and split the rest into two. The instances
|
||||
where this would help should be rare and the current way is
|
||||
simpler. */
|
||||
return INT32_P (INTVAL (op));
|
||||
return UINT32_P (INTVAL (op));
|
||||
case LABEL_REF :
|
||||
return TARGET_ADDR24;
|
||||
case CONST_DOUBLE :
|
||||
@ -1345,9 +1349,11 @@ function_arg_partial_nregs (cum, mode, type, named)
|
||||
int named ATTRIBUTE_UNUSED;
|
||||
{
|
||||
int ret;
|
||||
int size = (((mode == BLKmode && type)
|
||||
? int_size_in_bytes (type)
|
||||
: GET_MODE_SIZE (mode)) + UNITS_PER_WORD - 1) / UNITS_PER_WORD;
|
||||
unsigned int size =
|
||||
(((mode == BLKmode && type)
|
||||
? (unsigned int) int_size_in_bytes (type)
|
||||
: GET_MODE_SIZE (mode)) + UNITS_PER_WORD - 1)
|
||||
/ UNITS_PER_WORD;
|
||||
|
||||
if (*cum >= M32R_MAX_PARM_REGS)
|
||||
ret = 0;
|
||||
@ -1559,7 +1565,6 @@ m32r_sched_reorder (stream, verbose, ready, n_ready)
|
||||
for (i = n_ready-1; i >= 0; i--)
|
||||
{
|
||||
rtx insn = ready[i];
|
||||
enum rtx_code code;
|
||||
|
||||
if (! m32r_is_insn (insn))
|
||||
{
|
||||
@ -1615,7 +1620,6 @@ m32r_sched_reorder (stream, verbose, ready, n_ready)
|
||||
for (i = 0; i < n_ready; i++)
|
||||
{
|
||||
rtx insn = ready[i];
|
||||
enum rtx_code code;
|
||||
|
||||
fprintf (stream, " %d", INSN_UID (ready[i]));
|
||||
|
||||
@ -2777,7 +2781,7 @@ m32r_expand_block_move (operands)
|
||||
operands[3] is a temp register.
|
||||
operands[4] is a temp register. */
|
||||
|
||||
char *
|
||||
void
|
||||
m32r_output_block_move (insn, operands)
|
||||
rtx insn ATTRIBUTE_UNUSED;
|
||||
rtx operands[];
|
||||
@ -2891,8 +2895,6 @@ m32r_output_block_move (insn, operands)
|
||||
|
||||
first_time = 0;
|
||||
}
|
||||
|
||||
return "";
|
||||
}
|
||||
|
||||
/* Return true if op is an integer constant, less than or equal to
|
||||
|
@ -753,15 +753,13 @@ extern enum reg_class m32r_regno_reg_class[FIRST_PSEUDO_REGISTER];
|
||||
#define INT8_P(X) ((X) >= -0x80 && (X) <= 0x7f)
|
||||
#define INT16_P(X) ((X) >= -0x8000 && (X) <= 0x7fff)
|
||||
#define CMP_INT16_P(X) ((X) >= -0x7fff && (X) <= 0x8000)
|
||||
#define UINT16_P(X) (((unsigned HOST_WIDE_INT)(X)) <= 0xffff)
|
||||
#define UPPER16_P(X) (((X) & 0xffff) == 0 \
|
||||
&& ((X) >> 16) >= -0x8000 \
|
||||
&& ((X) >> 16) <= 0x7fff)
|
||||
#define UINT24_P(X) (((unsigned HOST_WIDE_INT) (X)) < 0x1000000)
|
||||
#define INT32_P(X) (((X) >= -(HOST_WIDE_INT) 0x80000000 \
|
||||
&& (X) <= (HOST_WIDE_INT) 0x7fffffff) \
|
||||
|| (unsigned HOST_WIDE_INT) (X) <= 0xffffffff)
|
||||
#define UINT5_P(X) ((X) >= 0 && (X) < 32)
|
||||
#define UINT16_P(X) (((unsigned HOST_WIDE_INT) (X)) <= 0x0000ffff)
|
||||
#define UINT24_P(X) (((unsigned HOST_WIDE_INT) (X)) <= 0x00ffffff)
|
||||
#define UINT32_P(X) (((unsigned HOST_WIDE_INT) (X)) <= 0xffffffff)
|
||||
#define UINT5_P(X) ((X) >= 0 && (X) < 32)
|
||||
#define INVERTED_SIGNED_8BIT(VAL) ((VAL) >= -127 && (VAL) <= 128)
|
||||
|
||||
#define CONST_OK_FOR_LETTER_P(VALUE, C) \
|
||||
@ -1046,19 +1044,11 @@ M32R_STACK_ALIGN (current_function_outgoing_args_size)
|
||||
/* Round arg MODE/TYPE up to the next word boundary. */
|
||||
#define ROUND_ADVANCE_ARG(MODE, TYPE) \
|
||||
((MODE) == BLKmode \
|
||||
? ROUND_ADVANCE (int_size_in_bytes (TYPE)) \
|
||||
? ROUND_ADVANCE ((unsigned int) int_size_in_bytes (TYPE)) \
|
||||
: ROUND_ADVANCE (GET_MODE_SIZE (MODE)))
|
||||
|
||||
/* Round CUM up to the necessary point for argument MODE/TYPE. */
|
||||
#if 0
|
||||
#define ROUND_ADVANCE_CUM(CUM, MODE, TYPE) \
|
||||
((((MODE) == BLKmode ? TYPE_ALIGN (TYPE) : GET_MODE_BITSIZE (MODE)) \
|
||||
> BITS_PER_WORD) \
|
||||
? ((CUM) + 1 & ~1) \
|
||||
: (CUM))
|
||||
#else
|
||||
#define ROUND_ADVANCE_CUM(CUM, MODE, TYPE) (CUM)
|
||||
#endif
|
||||
|
||||
/* Return boolean indicating arg of type TYPE and mode MODE will be passed in
|
||||
a reg. This includes arguments that have to be passed by reference as the
|
||||
|
@ -1,5 +1,5 @@
|
||||
;; Machine description of the Mitsubishi M32R cpu for GNU C compiler
|
||||
;; Copyright (C) 1996, 1997, 1998, 1999 Free Software Foundation, Inc.
|
||||
;; Copyright (C) 1996, 1997, 1998, 1999, 2001 Free Software Foundation, Inc.
|
||||
|
||||
;; This file is part of GNU CC.
|
||||
|
||||
@ -2498,6 +2498,6 @@
|
||||
(clobber (match_scratch:SI 3 "=&r")) ;; temp 1
|
||||
(clobber (match_scratch:SI 4 "=&r"))] ;; temp 2
|
||||
""
|
||||
"* return m32r_output_block_move (insn, operands);"
|
||||
"* m32r_output_block_move (insn, operands); return \"\"; "
|
||||
[(set_attr "type" "store8")
|
||||
(set_attr "length" "72")]) ;; Maximum
|
||||
|
Loading…
Reference in New Issue
Block a user