diff options
author | Gunther Nikl <gni@gecko.de> | 2003-10-26 22:08:07 +0000 |
---|---|---|
committer | Bernardo Innocenti <bernie@gcc.gnu.org> | 2003-10-26 23:08:07 +0100 |
commit | 858025041274c93ca54456cdf29caabd1c9fb342 (patch) | |
tree | 81a6acc842e1c5ba68e2f20b80afcdd5d7ff4957 | |
parent | a89e3f2128fe8977cb114403f8f6d4899d852a30 (diff) | |
download | gcc-858025041274c93ca54456cdf29caabd1c9fb342.zip gcc-858025041274c93ca54456cdf29caabd1c9fb342.tar.gz gcc-858025041274c93ca54456cdf29caabd1c9fb342.tar.bz2 |
m68k.c (m68k_compute_frame_layout): Swap reg_mask and reg_rev_mask computation.
* config/m68k/m68k.c (m68k_compute_frame_layout): Swap reg_mask and
reg_rev_mask computation.
(m68k_output_function_prologue): Fix usage of current_frame (one typo
and one missing); use reg_rev_mask not reg_mask.
(m68k_output_function_epilogue): Fix usage of current_frame;
use fpu_rev_mask not fpu_mask.
From-SVN: r72964
-rw-r--r-- | gcc/ChangeLog | 9 | ||||
-rw-r--r-- | gcc/config/m68k/m68k.c | 14 |
2 files changed, 16 insertions, 7 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 3d9ea8c..794acfd 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,12 @@ +2003-10-26 Gunther Nikl <gni@gecko.de> + + * config/m68k/m68k.c (m68k_compute_frame_layout): Swap reg_mask and + reg_rev_mask computation. + (m68k_output_function_prologue): Fix usage of current_frame (one typo + and one missing); use reg_rev_mask not reg_mask. + (m68k_output_function_epilogue): Fix usage of current_frame; + use fpu_rev_mask not fpu_mask. + 2003-10-26 Bernardo Innocenti <bernie@develer.com> * config/m68k/m68k.c (m68k_output_function_prologue): Eliminate diff --git a/gcc/config/m68k/m68k.c b/gcc/config/m68k/m68k.c index 59bd544..64c8c9c6 100644 --- a/gcc/config/m68k/m68k.c +++ b/gcc/config/m68k/m68k.c @@ -358,8 +358,8 @@ m68k_compute_frame_layout (void) for (regno = 16; regno < 24; regno++) if (m68k_save_reg (regno, interrupt_handler)) { - mask |= 1 << (23 - regno); - rmask |= 1 << (regno - 16); + mask |= 1 << (regno - 16); + rmask |= 1 << (23 - regno); saved++; } current_frame.foffset = saved * 12 /* (TARGET_CFV4E ? 8 : 12) */; @@ -610,7 +610,7 @@ m68k_output_function_prologue (FILE *stream, HOST_WIDE_INT size ATTRIBUTE_UNUSED #ifdef MOTOROLA asm_fprintf (stream, "\tfmovm %I0x%x,-(%Rsp)\n", current_frame.fpu_mask); #else - asm_fprintf (stream, "\tfmovem %I0x%x,%Rsp@-\n", current_frmae.fpu_mask); + asm_fprintf (stream, "\tfmovem %I0x%x,%Rsp@-\n", current_frame.fpu_mask); #endif if (dwarf2out_do_frame ()) { @@ -695,9 +695,9 @@ m68k_output_function_prologue (FILE *stream, HOST_WIDE_INT size ATTRIBUTE_UNUSED 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 ()) @@ -922,7 +922,7 @@ m68k_output_function_epilogue (FILE *stream, HOST_WIDE_INT size ATTRIBUTE_UNUSED #else asm_fprintf (stream, "\tmoveml %s@(-%wd),%I0x%x\n", reg_names[FRAME_POINTER_REGNUM], - offset + fsize, + current_frame.offset + fsize, current_frame.reg_mask); #endif } @@ -1001,7 +1001,7 @@ m68k_output_function_epilogue (FILE *stream, HOST_WIDE_INT size ATTRIBUTE_UNUSED asm_fprintf (stream, "\tfmovm -%wd(%s),%I0x%x\n", current_frame.foffset + fsize, reg_names[FRAME_POINTER_REGNUM], - current_frame.fpu_mask); + current_frame.fpu_rev_mask); #else asm_fprintf (stream, "\tfmovem %s@(-%wd),%I0x%x\n", reg_names[FRAME_POINTER_REGNUM], |