| To: | Franck Bui-Huu <vagabon.xyz@gmail.com> |
|---|---|
| Subject: | Re: [PATCH] Introduce __fill_user() and kill __bzero() |
| From: | Thiemo Seufer <ths@networkno.de> |
| Date: | Wed, 14 Nov 2007 13:48:40 +0000 |
| Cc: | Ralf Baechle <ralf@linux-mips.org>, linux-mips <linux-mips@linux-mips.org> |
| In-reply-to: | <473AEB52.40501@gmail.com> |
| Original-recipient: | rfc822;linux-mips@linux-mips.org |
| References: | <4736C1EA.2050009@gmail.com> <20071111130130.GB8363@networkno.de> <473AB0B6.2070208@gmail.com> <20071114115807.GL8363@networkno.de> <473AEB52.40501@gmail.com> |
| Sender: | linux-mips-bounce@linux-mips.org |
| User-agent: | Mutt/1.5.16 (2007-06-11) |
Franck Bui-Huu wrote:
> Thiemo Seufer wrote:
> > In general we do (think of stack unwinding etc.). I believe this
> > implementation should move to C, as it doesn't need an assembler
> > implementation:
> >
> > void *memset (void *s, int c, kernel_size_t n)
> > {
> > __fill_user(s, c, n);
> > return s;
> > }
> >
> > It looks much nicer that way. :-)
> >
>
> Sure but memset.S was a really good place to implement memset(), wasn't
> it ?
What about using memset.c and fill_user.S ?
> And since the implementation should have been trivial,
As you found out now, nothing is trivial in assembler. :-)
> I thought it was ok to implement in assembly.
As a general rule, assembly should only be used when C doesn't cut it.
Thiemo
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| ||
| Previous by Date: | Re: smp8634 add memory at dram1, david |
|---|---|
| Next by Date: | Re: [PATCH] Introduce __fill_user() and kill __bzero(), Franck Bui-Huu |
| Previous by Thread: | Re: [PATCH] Introduce __fill_user() and kill __bzero(), Franck Bui-Huu |
| Next by Thread: | Re: [PATCH] Introduce __fill_user() and kill __bzero(), Franck Bui-Huu |
| Indexes: | [Date] [Thread] [Top] [All Lists] |