This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[patch] m68k: don't try to push bytes
- To: gcc-patches at gcc dot gnu dot org
- Subject: [patch] m68k: don't try to push bytes
- From: DJ Delorie <dj at redhat dot com>
- Date: Wed, 28 Feb 2001 15:29:23 -0500
There's a comment in m68k.c:output_move_qimode that says:
/* This is probably useless, since it loses for pushing a struct
of several bytes a byte at a time. */
Well, the execute/931004-* tests fail because of that, so this tells
gcc to avoid using byte pushes. OK to apply?
2001-02-28 DJ Delorie <dj@redhat.com>
* config/m68k/m68k.h (MOVE_BY_PIECES_P): Avoid pushing bytes,
since that doesn't work the way gcc wants on a generic m68k.
Index: config/m68k/m68k.h
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/m68k/m68k.h,v
retrieving revision 1.48
diff -p -3 -r1.48 m68k.h
*** m68k.h 2001/01/01 20:35:31 1.48
--- m68k.h 2001/02/28 20:27:17
*************** extern enum reg_class regno_reg_class[];
*** 921,926 ****
--- 921,931 ----
On the 5200 (coldfire), sp@- in a byte insn pushes just a byte. */
#define PUSH_ROUNDING(BYTES) (TARGET_5200 ? BYTES : ((BYTES) + 1) & ~1)
+ /* We want to avoid trying to push bytes. */
+ #define MOVE_BY_PIECES_P(SIZE, ALIGN) \
+ (move_by_pieces_ninsns (SIZE, ALIGN) < MOVE_RATIO) \
+ && ((SIZE >=16 && ALIGN >= 16) || TARGET_5200)
+
/* Offset of first parameter from the argument pointer register value. */
#define FIRST_PARM_OFFSET(FNDECL) 8