On 08/05/2013 09:14 PM, Mathieu Desnoyers wrote:
>>
>> For unconditional jmp that should be pretty safe barring any fundamental
>> changes to the instruction set, in which case we can enable it as
>> needed, but for extra robustness it probably should skip prefix bytes.
>
> On x86-32, some prefixes are actually meaningful. AFAIK, the 0x66 prefix
> is used for:
>
> E9 cw jmp rel16 relative jump, only in 32-bit
>
> Other prefixes can probably be safely skipped.
>
Yes. Some of them are used as hints or for MPX.
> Another question is whether anything prevents the assembler from
> generating a jump near (absolute indirect), or far jump. The code above
> seems to assume that we have either a short or near relative jump.
Absolutely something prevents! It would be a very serious error for the
assembler to generate such instructions.
-hpa