Re: [RFC] gcc feature request: Moving blocks into sections

From: H. Peter Anvin
Date: Tue Aug 06 2013 - 00:28:38 EST


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




--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/