[m68k]: patch to fix m68k_output_mi_thunk() for ColdFire
Falk Hueffner
hueffner@informatik.uni-tuebingen.de
Wed May 26 21:45:00 GMT 2004
Peter Barada <peter@the-baradas.com> writes:
> Index: gcc/config/m68k/m68k.c
> ===================================================================
> RCS file: /cvs/uberbaum/gcc/config/m68k/m68k.c,v
> retrieving revision 1.129
> diff -c -3 -p -r1.129 m68k.c
> *** gcc/config/m68k/m68k.c 10 Mar 2004 05:07:45 -0000 1.129
> --- gcc/config/m68k/m68k.c 26 May 2004 21:37:56 -0000
> *************** m68k_output_mi_thunk (FILE *file, tree t
> *** 3371,3377 ****
> "\tsubq.l %I%d,4(%Rsp)\n" :
> "\tsubql %I%d,%Rsp@(4)\n",
> (int) -delta);
> ! else
> asm_fprintf (file, MOTOROLA ?
> "\tadd.l %I%wd,4(%Rsp)\n" :
> "\taddl %I%wd,%Rsp@(4)\n",
> --- 3371,3394 ----
> "\tsubq.l %I%d,4(%Rsp)\n" :
> "\tsubql %I%d,%Rsp@(4)\n",
> (int) -delta);
> ! else if (TARGET_COLDFIRE)
> ! {
> ! /* ColdFire can't add/sub a constant to memory unless it ins
> ! the range of addq/subq. So load the vlaue into %d0 and
> ! then add it to 4(%sp). */
> ! if (delta >= -128 && delta <= 127)
> ! asm_fprintf (file, MOTOROLA ?
> ! "\tmoveq.l %I%wd,%Rd0\n" :
> ! "\tmoveql %I%wd,%Rd0\n", (int)delta);
> ! else
> ! asm_fprintf (file, MOTOROLA ?
> ! "\tmove.l %I%wd,%Rd0\n" :
> ! "\tmovel %I%wd,%Rd0\n", (int)delta);
> ! asm_fprintf (file, MOTOROLA?
> ! "\tadd.l %Rd0,4(%Rsp)\n" :
> ! "\taddl %Rd0,%Rsp@(4)\n");
> ! }
> !
Aren't you missing an "else" here?
> asm_fprintf (file, MOTOROLA ?
> "\tadd.l %I%wd,4(%Rsp)\n" :
> "\taddl %I%wd,%Rsp@(4)\n",
--
Falk
More information about the Gcc
mailing list