This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: [rz@linux-m68k.org: Re: m68k, extendqidi2 problem]
- From: Gunther Nikl <gni at gecko dot de>
- To: Richard Zidlicky <rz at linux-m68k dot org>
- Cc: Bernardo Innocenti <bernie at develer dot com>, Jim Wilson <wilson at specifixinc dot com>, Richard Henderson <rth at redhat dot com>, gcc at gcc dot gnu dot org
- Date: Wed, 17 Mar 2004 13:17:32 +0100
- Subject: Re: [rz@linux-m68k.org: Re: m68k, extendqidi2 problem]
- References: <20040316215649.GA9585@linux-m68k.org>
On Tue, Mar 16, 2004 at 10:56:49PM +0100, Richard Zidlicky wrote:
> --- gcc-3.4-20040218/gcc/config/m68k/m68k.md.rz-extbdi 2004-03-07 23:08:04.000000000 +0100
> +++ gcc-3.4-20040218/gcc/config/m68k/m68k.md 2004-03-07 23:32:21.000000000 +0100
> @@ -1455,10 +1455,20 @@
> {
> CC_STATUS_INIT;
> operands[2] = gen_rtx_REG (SImode, REGNO (operands[0]) + 1);
> - if (TARGET_68020 || TARGET_COLDFIRE)
> - return "move%.b %1,%2\;extb%.l %2\;smi %0\;extb%.l %0";
> + if (ADDRESS_REG_P(operands[1]))
> + {
> + if (TARGET_68020 || TARGET_COLDFIRE)
> + return "move%.w %1,%2\;extb%.l %2\;smi %0\;extb%.l %0";
> + else
> + return "move%.w %1,%2\;ext%.w %0\;ext%.l %2\;move%.l %2,%0\;smi %0";
Why "ext%.w %0"? Shouldn't it be "ext%.w %2"? Then I don't understand
the "move%.l %2,%0 in the else case and the extbl after smi in the if
case.
> + }
> else
> - return "move%.b %1,%2\;ext%.w %0\;ext%.l %2\;move%.l %2,%0\;smi %0";
> + {
> + if (TARGET_68020 || TARGET_COLDFIRE)
> + return "move%.b %1,%2\;extb%.l %2\;smi %0\;extb%.l %0";
> + else
> + return "move%.b %1,%2\;ext%.w %0\;ext%.l %2\;move%.l %2,%0\;smi %0";
Same here.
Gunther