This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Testing m68k changes on AmigaOS and Linux/m68k
On Wed, Oct 15, 2003 at 11:32:47AM +0200, Gunther Nikl wrote:
> > The compiler used to work fine with m68k-elf and m68k-uclinux last week
> > (last tested from CVS sources on 20031011).
>
> Are you sure? ;-)
Argl! Turns out that bug was a bug in my patches which still redefined
ARG_POINTER_REGNUM to FRAME_POINTER_REGNUM :-/ Sorry for the false report
about that issue.
However, I found a bug that was hidden by the wrong test when saving
registers. The wrong mask is used when saving multiple registers in
m68k_output_function_prologue(). The diff includes the original change.
No ChangeLog entry this time.
Gunther
--cut--
--- m68k.c_ Mon Oct 13 14:39:45 2003
+++ m68k.c Wed Oct 15 18:37:02 2003
@@ -966,7 +966,7 @@ m68k_output_function_prologue (FILE *str
warning ("stack limit expression is not supported");
}
- if (num_saved_regs <= 2)
+ if (current_frame.reg_no <= 2)
{
/* Store each separately in the same order moveml uses.
Using two movel instructions instead of a single moveml
@@ -1007,17 +1007,17 @@ m68k_output_function_prologue (FILE *str
the fsize_with_regs amount. */
#ifdef MOTOROLA
- asm_fprintf (stream, "\tmovm.l %I0x%x,(%Rsp)\n", current_frame.reg_mask);
+ asm_fprintf (stream, "\tmovm.l %I0x%x,(%Rsp)\n", current_frame.reg_rev_mask);
#else
- asm_fprintf (stream, "\tmoveml %I0x%x,%Rsp@\n", current_frame.reg_mask);
+ asm_fprintf (stream, "\tmoveml %I0x%x,%Rsp@\n", current_frame.reg_rev_mask);
#endif
}
else
{
#ifdef MOTOROLA
- asm_fprintf (stream, "\tmovm.l %I0x%x,-(%Rsp)\n", current_frame.reg_mask);
+ asm_fprintf (stream, "\tmovm.l %I0x%x,-(%Rsp)\n", current_frame.reg_rev_mask);
#else
- asm_fprintf (stream, "\tmoveml %I0x%x,%Rsp@-\n", current_frame.reg_mask);
+ asm_fprintf (stream, "\tmoveml %I0x%x,%Rsp@-\n", current_frame.reg_rev_mask);
#endif
}
if (dwarf2out_do_frame ())
@@ -1029,7 +1029,7 @@ m68k_output_function_prologue (FILE *str
if (! frame_pointer_needed)
dwarf2out_def_cfa (l, STACK_POINTER_REGNUM, cfa_offset);
for (regno = 0, n_regs = 0; regno < 16; regno++)
- if (current_frame.reg_mask & (1 << regno))
+ if (current_frame.reg_rev_mask & (1 << regno))
dwarf2out_reg_save (l, regno,
-cfa_offset + n_regs++ * 4);
}
--cut--