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


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


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