* config/microblaze/microblaze.c (microblaze_block_move_straight):
Use XALLOCAVEC.
(microblaze_option_override): Don't use C++ style comments.
(save_restore_insns): Remove unused variable base_offset.
(microblaze_expand_prologue): Remove unused variable insn.
(microblaze_secondary_reload): Adjust type to match target.h .
(microblaze_elf_in_small_data_p): Move declarations to start of block.
(microblaze_expand_move): Likewise.
* config/microblaze/microblaze.h (LARGE_INT):
Avoid signed / unsigned comparisons.
(ASM_OUTPUT_ALIGNED_COMMON, ASM_OUTPUT_ALIGNED_LOCAL): Likewise.
(ASM_FORMAT_PRIVATE_NAME): Make format specifier match printed data.
(ASM_FINISH_DECLARE_OBJECT): Likewise. Constify name.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@167186
138bc75d-0d04-0410-961f-
82ee72b054a4
+2010-11-26 Joern Rennecke <amylaar@spamcop.net>
+
+ PR target/46623
+ * config/microblaze/microblaze.c (microblaze_block_move_straight):
+ Use XALLOCAVEC.
+ (microblaze_option_override): Don't use C++ style comments.
+ (save_restore_insns): Remove unused variable base_offset.
+ (microblaze_expand_prologue): Remove unused variable insn.
+ (microblaze_secondary_reload): Adjust type to match target.h .
+ (microblaze_elf_in_small_data_p): Move declarations to start of block.
+ (microblaze_expand_move): Likewise.
+ * config/microblaze/microblaze.h (LARGE_INT):
+ Avoid signed / unsigned comparisons.
+ (ASM_OUTPUT_ALIGNED_COMMON, ASM_OUTPUT_ALIGNED_LOCAL): Likewise.
+ (ASM_FORMAT_PRIVATE_NAME): Make format specifier match printed data.
+ (ASM_FINISH_DECLARE_OBJECT): Likewise. Constify name.
+
2010-11-26 Michael Matz <matz@suse.de>
* tree-ssa-copy.c (fini_copy_prop): Don't DCE when we have loops.
delta = bits / BITS_PER_UNIT;
/* Allocate a buffer for the temporary registers. */
- regs = alloca (sizeof (rtx) * length / delta);
+ regs = XALLOCAVEC (rtx, length / delta);
/* Load as many BITS-sized chunks as possible. Use a normal load if
the source has enough alignment, otherwise use left/right pairs. */
if (ver < 0)
{
/* No hardware exceptions in earlier versions. So no worries. */
- // microblaze_select_flags &= ~(MICROBLAZE_MASK_NO_UNSAFE_DELAY);
+#if 0
+ microblaze_select_flags &= ~(MICROBLAZE_MASK_NO_UNSAFE_DELAY);
+#endif
microblaze_no_unsafe_delay = 0;
microblaze_pipe = MICROBLAZE_PIPE_3;
}
|| (MICROBLAZE_VERSION_COMPARE (microblaze_select_cpu, "v4.00.b")
== 0))
{
- // microblaze_select_flags |= (MICROBLAZE_MASK_NO_UNSAFE_DELAY);
+#if 0
+ microblaze_select_flags |= (MICROBLAZE_MASK_NO_UNSAFE_DELAY);
+#endif
microblaze_no_unsafe_delay = 1;
microblaze_pipe = MICROBLAZE_PIPE_3;
}
{
/* We agree to use 5 pipe-stage model even on area optimized 3
pipe-stage variants. */
- // microblaze_select_flags &= ~(MICROBLAZE_MASK_NO_UNSAFE_DELAY);
+#if 0
+ microblaze_select_flags &= ~(MICROBLAZE_MASK_NO_UNSAFE_DELAY);
+#endif
microblaze_no_unsafe_delay = 0;
microblaze_pipe = MICROBLAZE_PIPE_5;
if (MICROBLAZE_VERSION_COMPARE (microblaze_select_cpu, "v5.00.a") == 0
/* Always use DFA scheduler. */
microblaze_sched_use_dfa = 1;
- // microblaze_abicalls = MICROBLAZE_ABICALLS_NO;
+#if 0
+ microblaze_abicalls = MICROBLAZE_ABICALLS_NO;
+#endif
/* Initialize the high, low values for legit floating point constants. */
real_maxval (&dfhigh, 0, DFmode);
0, isr_mem_rtx = 0;
rtx isr_msr_rtx = 0, insn;
long mask = current_frame_info.mask;
- HOST_WIDE_INT base_offset, gp_offset;
+ HOST_WIDE_INT gp_offset;
int regno;
if (frame_pointer_needed
gcc_assert (gp_offset > 0);
base_reg_rtx = stack_pointer_rtx;
- base_offset = 0;
/* For interrupt_handlers, need to save/restore the MSR. */
if (interrupt_handler)
if (flag_pic == 2 && df_regs_ever_live_p (MB_ABI_PIC_ADDR_REGNUM))
{
- rtx insn;
SET_REGNO (pic_offset_table_rtx, MB_ABI_PIC_ADDR_REGNUM);
- insn = emit_insn (gen_set_got (pic_offset_table_rtx)); /* setting GOT. */
+ emit_insn (gen_set_got (pic_offset_table_rtx)); /* setting GOT. */
}
/* If we are profiling, make sure no instructions are scheduled before
/* Implement TARGET_SECONDARY_RELOAD. */
-static enum reg_class
+static reg_class_t
microblaze_secondary_reload (bool in_p ATTRIBUTE_UNUSED, rtx x ATTRIBUTE_UNUSED,
- enum reg_class rclass, enum machine_mode mode ATTRIBUTE_UNUSED,
+ reg_class_t rclass, enum machine_mode mode ATTRIBUTE_UNUSED,
secondary_reload_info *sri ATTRIBUTE_UNUSED)
{
if (rclass == ST_REGS)
static bool
microblaze_elf_in_small_data_p (const_tree decl)
{
+ HOST_WIDE_INT size;
+
if (!TARGET_XLGPOPT)
return false;
return true;
}
- HOST_WIDE_INT size = int_size_in_bytes (TREE_TYPE (decl));
+ size = int_size_in_bytes (TREE_TYPE (decl));
return (size > 0 && size <= microblaze_section_threshold);
}
rtx addr = XEXP (operands[0], 0);
if (GET_CODE (addr) == SYMBOL_REF)
{
+ rtx ptr_reg, result;
+
if (reload_in_progress)
df_set_regs_ever_live (PIC_OFFSET_TABLE_REGNUM, true);
- rtx ptr_reg, result;
-
addr = expand_pic_symbol_ref (mode, addr);
ptr_reg = gen_reg_rtx (Pmode);
emit_move_insn (ptr_reg, addr);
/* REGISTER AND CONSTANT CLASSES */
#define SMALL_INT(X) ((unsigned HOST_WIDE_INT) (INTVAL (X) + 0x8000) < 0x10000)
-#define LARGE_INT(X) (INTVAL (X) >= 0x80000000 && INTVAL (X) <= 0xffffffff)
+#define LARGE_INT(X) \
+ (INTVAL (X) > 0 && UINTVAL (X) >= 0x80000000 && UINTVAL (X) <= 0xffffffff)
#define PLT_ADDR_P(X) (GET_CODE (X) == UNSPEC && XINT (X,1) == UNSPEC_PLT)
/* Test for a valid operand for a call instruction.
Don't allow the arg pointer register or virtual regs
#undef ASM_OUTPUT_ALIGNED_COMMON
#define ASM_OUTPUT_ALIGNED_COMMON(FILE, NAME, SIZE, ALIGN) \
do { \
- if (SIZE > 0 && SIZE <= microblaze_section_threshold \
- && TARGET_XLGPOPT) \
+ if ((SIZE) > 0 && (SIZE) <= INT_MAX \
+ && (int) (SIZE) <= microblaze_section_threshold \
+ && TARGET_XLGPOPT) \
{ \
switch_to_section (sbss_section); \
} \
#undef ASM_OUTPUT_ALIGNED_LOCAL
#define ASM_OUTPUT_ALIGNED_LOCAL(FILE, NAME, SIZE, ALIGN) \
do { \
- if (SIZE > 0 && SIZE <= microblaze_section_threshold \
- && TARGET_XLGPOPT) \
+ if ((SIZE) > 0 && (SIZE) <= INT_MAX \
+ && (int) (SIZE) <= microblaze_section_threshold \
+ && TARGET_XLGPOPT) \
{ \
switch_to_section (sbss_section); \
} \
LABELNO is an integer which is different for each call. */
#define ASM_FORMAT_PRIVATE_NAME(OUTPUT, NAME, LABELNO) \
( (OUTPUT) = (char *) alloca (strlen ((NAME)) + 10), \
- sprintf ((OUTPUT), "%s.%d", (NAME), (LABELNO)))
+ sprintf ((OUTPUT), "%s.%lu", (NAME), (unsigned long)(LABELNO)))
/* How to start an assembler comment.
The leading space is important (the microblaze assembler requires it). */
size_directive_output = 1; \
fprintf (FILE, "%s", SIZE_ASM_OP); \
assemble_name (FILE, NAME); \
- fprintf (FILE, ",%d\n", int_size_in_bytes (TREE_TYPE (DECL))); \
+ fprintf (FILE, "," HOST_WIDE_INT_PRINT_DEC "\n", \
+ int_size_in_bytes (TREE_TYPE (DECL))); \
} \
microblaze_declare_object (FILE, NAME, "", ":\n", 0); \
} while (0)
#undef ASM_FINISH_DECLARE_OBJECT
#define ASM_FINISH_DECLARE_OBJECT(FILE, DECL, TOP_LEVEL, AT_END) \
do { \
- char *name = XSTR (XEXP (DECL_RTL (DECL), 0), 0); \
+ const char *name = XSTR (XEXP (DECL_RTL (DECL), 0), 0); \
if (!flag_inhibit_size_directive && DECL_SIZE (DECL) \
&& ! AT_END && TOP_LEVEL \
&& DECL_INITIAL (DECL) == error_mark_node \
size_directive_output = 1; \
fprintf (FILE, "%s", SIZE_ASM_OP); \
assemble_name (FILE, name); \
- fprintf (FILE, ",%d\n", int_size_in_bytes (TREE_TYPE (DECL))); \
+ fprintf (FILE, "," HOST_WIDE_INT_PRINT_DEC "\n", \
+ int_size_in_bytes (TREE_TYPE (DECL))); \
} \
} while (0)