lkml.org 
[lkml]   [2007]   [Dec]   [21]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [patch 14/24] Immediate Values - x86 Optimization (updated)
* H. Peter Anvin (hpa@zytor.com) wrote:
> Mathieu Desnoyers wrote:
>> Argh.. Rusty asked to have a simplified version first, and then to
>> implement the "more complex" one on top of it. However, in order to get
>> the reentrancy I need for the markers, I need the complex version of the
>> immediate values. Therefore, you find, in this patchset, the simple
>> version first, and then, the more complex one implemented on top.
>> About this patch header, the initial idea was to use the "Q" and "R"
>> constraints, but, as stated just below, the "q" and "r" constraints are
>> used instead to make sure the REX prefixed opcodes for 1, 2, and 4 bytes
>> immediate values are never used. So the complete header follows the
>> source code, it's just that this paragraph could be clearer.
>
> Then you have it backwards. "Q" and "R" avoid REX prefixes, "q" and "r" DO
> NOT.
>
> -hpa

Right.. I did that 1 month ago, which is already far away in my memory.
Looking back at this, here is what is the real situation. I attach the
patches that fixes the comments accordingly as reply to my original
posts.

- "Redux" immediate values : no need to put a breakpoint, therefore, no
need to know where the instruction starts. It's therefore OK to have a
REX prefix.
- More reentrant immediate value : uses a breakpoint. Needs to know the
instruction's first byte. This is why we keep the "instruction size"
variable, so we can support the REX prefixed instructions too.

Therefore, the "q" and "r" constraints are OK : they _allow_ REX
prefixes.

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


\
 
 \ /
  Last update: 2007-12-21 14:25    [W:0.034 / U:0.388 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site