[LLVMdev] Emitting x86 Multi-Byte NOP in MachineFunctionPass

Rafael EspĂ­ndola rafael.espindola at gmail.com
Sun Dec 1 11:30:25 PST 2013


On 8 November 2013 17:39, John Criswell <criswell at illinois.edu> wrote:
> Dear All,
>
> I'm trying to emit one of the multi-byte NOP sequences for x86.  Any one of
> the following NOP encodings will do:
>
> 0x66 0x90
> 0x0f 0x1f 0x00
> 0x0f 0x1f 0x40 0x00
>
> In LLVM 3.1, there doesn't seem to be a multi-byte NOP in the TD files.
>
> Is there a way to get a MachineFunctionPass to emit one of these sequences
> (or to just tell it to emit a certain byte sequence into the code segment)?

The MC layer will produce that when aligning, so you might be able to
just output a .align (assuming that 3.1 has those nops at the MC
layer. Trunk does).

Cheers,
Rafael



More information about the llvm-dev mailing list