This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [patch] m68k: don't try to push bytes
- To: DJ Delorie <dj at redhat dot com>
- Subject: Re: [patch] m68k: don't try to push bytes
- From: Graham Stott <grahams at redhat dot com>
- Date: Wed, 28 Feb 2001 20:36:40 +0000
- Cc: gcc-patches at gcc dot gnu dot org
- References: <200102282029.PAA26079@greed.delorie.com>
DJ Delorie wrote:
>
> 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)
> +
Suggest you parenthesis the macro parameters to avoid surprises.
> /* Offset of first parameter from the argument pointer register value. */
> #define FIRST_PARM_OFFSET(FNDECL) 8
>
Graham