This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: 3.1 m68k/coldfire code gen problem!!
- From: Peter Barada <pbarada at mail dot wm dot sps dot mot dot com>
- To: schwab at suse dot de
- Cc: joel dot sherrill at OARcorp dot com, gcc at gcc dot gnu dot org
- Date: Thu, 9 May 2002 10:48:38 -0400
- Subject: Re: 3.1 m68k/coldfire code gen problem!!
- References: <3CD9AE90.C0DA1281@OARcorp.com> <jeit5y8ay2.fsf@sykes.suse.de>
>2002-05-09 Andreas Schwab <schwab@suse.de>
>
> * config/m68k/m68k.md (tabljump+2): Use `move.w %0,%0' for sign
> extending an address register.
1) The move.w from memory to the address register did the sign extension
anyway so in this case the 'move.w %0,%0' is a no-op.
2) What about the case where ASM_RETURN_CASE_JUMP is defined? You'll
have to modify the definition to look at operands[0] to see if its
an address register(m68kelf.h and 6 other files)
I suggest that you modify the defintion of ASM_RETURN_CASE_JUMP to
be(at least from m68kelf.h):
#define ASM_RETURN_CASE_JUMP(operands) \
do { \
if (ADDRESS_REG_P (operands[0])) \
return "jmp %%pc@(2,%0:l)"; \
if (TARGET_5200) \
return "ext%.l %0\;jmp %%pc@(2,%0:l)"; \
else \
return "jmp %%pc@(2,%0:w)"; \
} while (0)
Note that 'operands' is now a parameter to the macro.
--
Peter Barada Peter.Barada@motorola.com
Wizard 781-852-2768 (direct)
WaveMark Solutions(wholly owned by Motorola) 781-270-0193 (fax)