Messages in this thread | | | Date | Fri, 25 Apr 2008 09:42:26 -0700 | From | "H. Peter Anvin" <> | Subject | Re: [PATCH 1/1] x86: fix text_poke |
| |
Mathieu Desnoyers wrote: > > Yes, the immediate values, in general, only need to do atomic writes, > because I have taken care of placing the mov instruction in the correct > alignment so its immediate value happens to be aligned in memory. > However, the latest optimisation I did to change a conditional branch > into a jump when the correct code pattern is detected : > > mov, test, bne short > into a > nop2, nop2, nop1, jmp short > > or > > mov, test, bne near > into a > nop2, nop2, nop1, jmp near >
And how, pray tell, do you deal with the fact that:
a) the EFLAGS may be live on exit; b) there might be a jump into the middle of this instruction sequence?
-hpa
| |