Messages in this thread | | | Date | Wed, 16 Apr 2008 16:29:51 +0200 | From | Ingo Molnar <> | Subject | Re: [RFC PATCH 1/2] Marker probes in futex.c |
| |
* Arjan van de Ven <arjan@infradead.org> wrote:
> > Not only does the compare and jmp need to be consecutive, but the > > movb $0x0,%al also does. I *could* try to detect specific code > > inserted in between, but I really have to make sure I don't get > > burned by the compiler inserting a jmp there. > > I wonder if just sticking in 2 barriers around your code make gcc stop > moving stuff too much
hm, an extra optimization barrier might have worse effects than even an extra instruction. I think if the detection and patching can be made 100% safe, we dont care about the remaining 4% of markers that gcc somehow reorders.
and in parallel gcc folks might want to start helping us achieve single-instruction branch points? Currently there's no way to get flags values out of inline assembly, except via a register intermediary which adds another instruction. For flags that are unaffected by gcc's input/output constraint generation code it would make sense to allow them to be exported out of inline assembly.
Ingo
| |