From: Hayes Wang
> Sent: 17 March 2017 03:00
> To: David Laight; net...@vger.kernel.org
> Cc: nic_swsd; linux-ker...@vger.kernel.org; linux-usb@vger.kernel.org
> Subject: RE: [PATCH net-next] r8152: simply the arguments
> 
> David Laight [mailto:david.lai...@aculab.com]
> > Sent: Thursday, March 16, 2017 10:28 PM
> [...]
> > If you are really lucky the compiler will optimise it away.
> > Otherwise it will generate another local variable and possibly
> > a register spill to stack.
> 
> However, I could reduce the time for calculating the address,
> because I only calculate it once and save the result to a variable.
> Right?

 address you want is just an offset from another pointer that is
commonly used and ought to be assigned to a register variable.

The offset can be added by the instruction that puts the value into
the register used for the first function argument.

So 'saving' it in another variable is extra work.

        David

--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to