lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <063D6719AE5E284EB5DD2968C1650D6DCFFB3ABD@AcuExch.aculab.com>
Date:   Fri, 17 Mar 2017 11:08:05 +0000
From:   David Laight <David.Laight@...LAB.COM>
To:     'Hayes Wang' <hayeswang@...ltek.com>,
        "netdev@...r.kernel.org" <netdev@...r.kernel.org>
CC:     nic_swsd <nic_swsd@...ltek.com>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        "linux-usb@...r.kernel.org" <linux-usb@...r.kernel.org>
Subject: RE: [PATCH net-next] r8152: simply the arguments

From: Hayes Wang
> Sent: 17 March 2017 03:00
> To: David Laight; netdev@...r.kernel.org
> Cc: nic_swsd; linux-kernel@...r.kernel.org; linux-usb@...r.kernel.org
> Subject: RE: [PATCH net-next] r8152: simply the arguments
> 
> David Laight [mailto:David.Laight@...LAB.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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ