| To: | herbert@xxxxxxxxxxxxxxxxxxx |
|---|---|
| Subject: | Re: [XFRM] Make XFRM core subsystem af-independent |
| From: | YOSHIFUJI Hideaki / 吉藤英明 <yoshfuji@xxxxxxxxxxxxxx> |
| Date: | Sat, 18 Sep 2004 10:24:04 +0900 (JST) |
| Cc: | davem@xxxxxxxxxxxxx, netdev@xxxxxxxxxxx, yoshfuji@xxxxxxxxxxxxxx |
| In-reply-to: | <20040918001216.GB24235@xxxxxxxxxxxxxxxxxxx> |
| Organization: | USAGI Project |
| References: | <20040918.085003.77842779.yoshfuji@xxxxxxxxxxxxxx> <20040917170607.2e96b58a.davem@xxxxxxxxxxxxx> <20040918001216.GB24235@xxxxxxxxxxxxxxxxxxx> |
| Sender: | netdev-bounce@xxxxxxxxxxx |
In article <20040918001216.GB24235@xxxxxxxxxxxxxxxxxxx> (at Sat, 18 Sep 2004
10:12:16 +1000), Herbert Xu <herbert@xxxxxxxxxxxxxxxxxxx> says:
> On Fri, Sep 17, 2004 at 05:06:07PM -0700, David S. Miller wrote:
> >
> > Compiler is smarter than you think :-)
>
> Sparc bigots :)
>
> Unfortunately it can't do that on architectures where the arguments
> are pushed onto the stack in reverse order, i.e., i386.
I've tested on i386.
.globl ip_route_output_key
.type ip_route_output_key,@function
ip_route_output_key:
movl 4(%esp),%edx
movl 8(%esp),%eax
pushl $0
pushl $0
pushl %eax
pushl %edx
call ip_route_output_flow
addl $16,%esp
ret
This is not good.
We, however, now have (up to 3) register parameters on i386 (CONFIG_REGPARM),
and assembly code is:
.globl ip_route_output_key
.type ip_route_output_key,@function
ip_route_output_key:
pushl $0
xorl %ecx, %ecx
call ip_route_output_flow
popl %ecx
ret
This is (not good as sparc, but) not bad
(well, much better than before at least).
--
Hideaki YOSHIFUJI @ USAGI Project <yoshfuji@xxxxxxxxxxxxxx>
GPG FP: 9022 65EB 1ECF 3AD1 0BDF 80D8 4807 F894 E062 0EEA
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| ||
| Previous by Date: | Re: [TRIVIAL] Fix recent bug in fib_semantics.c, Jon Smirl |
|---|---|
| Next by Date: | Re: [TRIVIAL] Fix recent bug in fib_semantics.c, Jon Smirl |
| Previous by Thread: | Re: [XFRM] Make XFRM core subsystem af-independent, Herbert Xu |
| Next by Thread: | Re: [XFRM] Make XFRM core subsystem af-independent, YOSHIFUJI Hideaki / 吉藤英明 |
| Indexes: | [Date] [Thread] [Top] [All Lists] |