lkml.org 
[lkml]   [2012]   [Jul]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [RFC][PATCH 2/4 v4] ftrace/x86: Add save_regs for i386 function calls
From
Date
On Thu, 2012-07-19 at 15:53 -0700, H. Peter Anvin wrote:

> lea is not typically faster than add, but in the case of Atom, it is
> done in an earlier pipeline stage (AGU instead of ALU) which means lea
> is faster if its inputs are already available as address expressions and
> is consumed by address expressions; the goal is to avoid the ALU->AGU
> forwarding latency.

Well, the question is, which is faster:

lea 8(%esp), %esp
addl $8, %esp

Basically, all we want to do is add 8 to the stack pointer. And this is
for the x86_32 version of whatever hardware is in use.

-- Steve




\
 
 \ /
  Last update: 2012-07-20 01:41    [from the cache]
©2003-2011 Jasper Spaans