Source-Changes-D archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: CVS commit: src/sys/arch/amd64/amd64



On Wed, Jul 01, 2015 at 02:04:43AM +0000, Christos Zoulas wrote:
> In article <20150630233112.GA8194%britannica.bec.de@localhost>,
> Joerg Sonnenberger  <joerg%britannica.bec.de@localhost> wrote:
> >On Tue, Jun 30, 2015 at 05:08:24PM -0400, Christos Zoulas wrote:
> >> Module Name:	src
> >> Committed By:	christos
> >> Date:		Tue Jun 30 21:08:24 UTC 2015
> >> 
> >> Modified Files:
> >> 	src/sys/arch/amd64/amd64: cpu_in_cksum.S
> >> 
> >> Log Message:
> >> handle PIC compilation (if we are building a PIE system; this is used
> >by tests)
> >
> >Isn't the leaq generally preferable as smaller?
> 
> I believe leaq is 7 bytes, and movq is 5. But I am not sure which takes
> more cycles.

'leaq' with %rip will have to be a long encoding since rip relative
isn't a 386 addressing mode.

My guess is that both take the same number of cycles on current cpus.
Some old brain cells recall 'lea' using different hardware from the ALU
(for adds) so happening at a different stage in the pipeline and having
different result delay and/or concurrency rules - but I can't remember
which particular cpu that applied to.

	David

-- 
David Laight: david%l8s.co.uk@localhost


Home | Main Index | Thread Index | Old Index