Re: [patch 13/17] Immediate Values - x86 Optimization

!MAILaRCHIVE_VOTE_RePLACE
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: H. Peter Anvin <hpa@...>
Cc: <akpm@...>, Ingo Molnar <mingo@...>, <linux-kernel@...>, Andi Kleen <andi@...>, Rusty Russell <rusty@...>, Andi Kleen <ak@...>, Chuck Ebbert <cebbert@...>, Christoph Hellwig <hch@...>, Jeremy Fitzhardinge <jeremy@...>, Thomas Gleixner <tglx@...>, Ingo Molnar <mingo@...>, Adrian Bunk <bunk@...>, Alexey Dobriyan <adobriyan@...>, <akpm@...>
Date: Wednesday, April 9, 2008 - 3:08 pm

* H. Peter Anvin (hpa@zytor.com) wrote:

This comment explains why I use the =q constraint for the 1 bytes
immediate value. It makes sure we use an instruction with 1-byte opcode,
without REX.R prefix, on x86_64.

That's required for the NMI-safe version of the immediate values, which
uses a breakpoint, but not for this version based on stop_machine_run().
However, to minimize the amount of changes between the two versions, I
left the =q constraint, which is more restrictive. Is it worth it to use
=r instead ? It will typically let the compiler use a wider range of
registers on x86_64.

Thanks,

Mathieu


-- 
Mathieu Desnoyers
Computer Engineering Ph.D. Student, Ecole Polytechnique de Montreal
OpenPGP key fingerprint: 8CD5 52C3 8E3C 4140 715F  BA06 3F25 A8FE 3BAE 9A68
--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[patch 13/17] Immediate Values - x86 Optimization, Mathieu Desnoyers, (Wed Apr 9, 11:08 am)
Re: [patch 13/17] Immediate Values - x86 Optimization, H. Peter Anvin, (Wed Apr 9, 2:01 pm)
Re: [patch 13/17] Immediate Values - x86 Optimization, Mathieu Desnoyers, (Wed Apr 9, 3:08 pm)
Re: [patch 13/17] Immediate Values - x86 Optimization, H. Peter Anvin, (Wed Apr 9, 6:33 pm)
Re: [patch 13/17] Immediate Values - x86 Optimization, Mathieu Desnoyers, (Wed Apr 9, 8:42 pm)
Re: [patch 13/17] Immediate Values - x86 Optimization, H. Peter Anvin, (Wed Apr 9, 8:47 pm)