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: Richard Sandiford <richard at codesourcery dot com>
- To: Andreas Schwab <schwab at suse dot de>
- Cc: libc-ports at sourceware dot org
- Date: Fri, 29 Sep 2006 08:06:28 +0100
- 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> <jeslibvf79.fsf@sykes.suse.de>
Andreas Schwab <schwab@suse.de> writes:
> 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.
Gah! You're right of course. Is it OK with the move.w changed
into a move.l? If so, do you want me to refresh the patch, or would
it be easier for you to just edit it locally?
Richard