This is the mail archive of the
libc-ports@sources.redhat.com
mailing list for the libc-ports project.
Re: Porting glibc to Coldfire
- From: Andreas Schwab <schwab at suse dot de>
- To: richard at codesourcery dot com
- Cc: libc-ports at sourceware dot org
- Date: Thu, 28 Sep 2006 23:44:42 +0200
- Subject: Re: Porting glibc to Coldfire
- References: <87bqqmrmne.fsf@talisman.home> <200608192030.17435.zippel@linux-m68k.org> <874pvtnx7x.fsf@talisman.home> <je8xknh9cs.fsf@sykes.suse.de> <874puuk530.fsf@talisman.home>
Richard Sandiford <richard@codesourcery.com> writes:
> @@ -79,15 +89,23 @@ _dl_runtime_profile:
> move.l %sp, %a2
> move.l %sp, %a0
> lea 28(%sp), %a1
> - | Round framesize up to even
> - addq.l #1, %d1
> - lsr #1, %d1
> - sub.l %d1, %a0
> + | Round framesize up to longword alignment
> + addq.l #3, %d1
> + and.l #-3, %d1
> sub.l %d1, %a0
> move.l %a0, %sp
> +#ifdef __mcoldfire__
> + tst.l %d1
> + beq 2f
> +1: move.l (%a0)+, (%a1)+
> + subq.l #4,%d1
> + bne 1b
> +2:
> +#else
> jra 2f
> 1: move.w (%a1)+, (%a0)+
> 2: dbra %d1,1b
> +#endif
This is wrong, the !__mcoldfire__ case now copies twice as much.
Andreas.
--
Andreas Schwab, SuSE Labs, schwab@suse.de
SuSE Linux Products GmbH, Maxfeldstraße 5, 90409 Nürnberg, Germany
PGP key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5
"And now for something completely different."