+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.
/* 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.
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));
/* 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.
#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
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. */
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? */
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;
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 :
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;
for (i = n_ready-1; i >= 0; i--)
{
rtx insn = ready[i];
- enum rtx_code code;
if (! m32r_is_insn (insn))
{
for (i = 0; i < n_ready; i++)
{
rtx insn = ready[i];
- enum rtx_code code;
fprintf (stream, " %d", INSN_UID (ready[i]));
}
sprintf (buffer, "mvfc %s, cbr", dest);
-
+
/* If the true value was '0' then we need to invert the results of the move. */
if (INTVAL (operands [2]) == 0)
sprintf (buffer + strlen (buffer), "\n\txor3 %s, %s, #1",
dest, dest);
-
+
return buffer;
}
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[];
first_time = 0;
}
-
- return "";
}
/* Return true if op is an integer constant, less than or equal to
#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) \
/* 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
;; 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.
(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