This is the mail archive of the libc-ports@sources.redhat.com mailing list for the libc-ports project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Porting glibc to Coldfire


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."


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]