linux-mips
[Top] [All Lists]

Re: [PATCH] Introduce __fill_user() and kill __bzero()

To: Thiemo Seufer <ths@networkno.de>
Subject: Re: [PATCH] Introduce __fill_user() and kill __bzero()
From: Franck Bui-Huu <vagabon.xyz@gmail.com>
Date: Sun, 11 Nov 2007 14:57:48 +0100
Cc: Ralf Baechle <ralf@linux-mips.org>, linux-mips <linux-mips@linux-mips.org>
Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:user-agent:mime-version:to:cc:subject:references:in-reply-to:content-type:content-transfer-encoding; bh=neVcTXFPSfP8rSxdiGkkgDRfYwjtnGilTTLB0FRC0Zw=; b=O2assTj2ZeBG+/xHaYobd6oAyxTSOnmGnxX5lAxXnTO3fQc6alGkE3voIyW24Bek0ExrnSjmlWoXIpGTJ5L1AIVEYWc5IAA+VXsIU0yf8XiThWwSqbchPKGVyi8bZTYIAuKIdiQScdn2o0qqYgWO1pwq+CjIMLFcarrnucnqtqA=
Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:user-agent:mime-version:to:cc:subject:references:in-reply-to:content-type:content-transfer-encoding; b=iqIGVVvcqbTGS4kg/JVYznnMMmkN4yrI1/viyPntTJpkqHmqiu72NW9UgltX2Wyp4WgtPEqhdjUYXDA7Chr2WiPgPuWKuwuQYreg0mMY0VXlEK4LoN/34YnQwvG895HlcwK9x/JxdNMWpRi11eY/SvI85XewOMRrXSIE0CTnEho=
In-reply-to: <20071111130130.GB8363@networkno.de>
Original-recipient: rfc822;linux-mips@linux-mips.org
References: <4736C1EA.2050009@gmail.com> <20071111130130.GB8363@networkno.de>
Sender: linux-mips-bounce@linux-mips.org
User-agent: Thunderbird 2.0.0.5 (X11/20070719)
Thiemo Seufer wrote:
>>  /*
>> - * memset(void *s, int c, size_t n)
>> + * An outline version of memset, which should be used either by gcc or
>> + * by assembly code.
>> + */
>> +NESTED(memset, 24, ra)
>> +    PTR_ADDU        sp, sp, -24
>> +    LONG_S          a0, 16(sp)
>> +    LONG_S          ra, 20(sp)
>> +    jal             __fill_user
>> +    LONG_L          v0, 16(sp)
>> +    LONG_L          ra, 20(sp)
>> +    PTR_ADDU        sp, sp, 24
>> +    jr              ra
>> +END(memset)
> 
> This will break on 64bit kernels.
> 

Obviously...

Looks like I should find a good place to implement it in C... or do
you know a sane way (without too many #ifdef) to do that in assembly
code ?

thanks,
                Franck


<Prev in Thread] Current Thread [Next in Thread>