This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[patch] m68k: Clean up fmovem and movem patterns.
- From: Kazu Hirata <kazu at codesourcery dot com>
- To: gcc-patches at gcc dot gnu dot org
- Cc: law at redhat dot com, schwab at suse dot de
- Cc: bernie at develer dot com
- Cc: zippel at linux-m68k dot org
- Date: Wed, 3 Oct 2007 14:11:37 -0700
- Subject: [patch] m68k: Clean up fmovem and movem patterns.
Hi,
Attached is a patch to clean up fmovem and movem.
Roman Zippel suggested that movm.l is not in the MOTOROLA format.
Looking at M68000PRM.pdf, I don't think fmovm is in the MOTOROLA
format either.
This patch cleans them up by sticking to what M68000PRM.pdf uses for
the MOROTOLA case. Specifically, we use fmovem and movem.l in the
MOTOROLA case. This patch is a no-op for the !MOTOROLA case.
Tested on m68k-elf. OK to apply?
Kazu Hirata
2007-10-03 Kazu Hirata <kazu@codesourcery.com>
* config/m68k/m68k.c (m68k_output_movem): Use the MOTOROLA if
MOTOROLA is to true.
Index: gcc/config/m68k/m68k.c
===================================================================
--- gcc/config/m68k/m68k.c (revision 128992)
+++ gcc/config/m68k/m68k.c (working copy)
@@ -3318,16 +3318,16 @@ m68k_output_movem (rtx *operands, rtx pa
if (FP_REGNO_P (REGNO (XEXP (XVECEXP (pattern, 0, first), store_p))))
{
if (store_p)
- return MOTOROLA ? "fmovm %1,%a0" : "fmovem %1,%a0";
+ return "fmovem %1,%a0";
else
- return MOTOROLA ? "fmovm %a0,%1" : "fmovem %a0,%1";
+ return "fmovem %a0,%1";
}
else
{
if (store_p)
- return MOTOROLA ? "movm.l %1,%a0" : "moveml %1,%a0";
+ return "movem%.l %1,%a0";
else
- return MOTOROLA ? "movm.l %a0,%1" : "moveml %a0,%1";
+ return "movem%.l %a0,%1";
}
}