[llvm] r196334 - [Stackmap] Emit multi-byte nops for X86.

Juergen Ributzka juergen at apple.com
Thu Jan 2 22:15:42 PST 2014


Sorry Joerg,

I missed your comment. You are right! For example LLVM tends to ignore/optimize away the offset when it is 0. That is why I had to add these odd offsets to force the offset field to be of a certain size. I am also testing the assembly case in the unit tests to make sure the nops are the correct size, but that applies only for the LLVM pipeline. I haven’t tested it with other assemblers, so I can’t guarantee they will have the same results now or in the future.

I wish there would be a nop assembly directive with well defined behavior. This would make the implementation much easier and all the implementation complexity I mentioned in the other email would go away.

Cheers,
Juergen
 
On Dec 4, 2013, at 1:46 PM, Joerg Sonnenberger <joerg at britannica.bec.de> wrote:

> On Tue, Dec 03, 2013 at 04:49:34PM -0800, Juergen Ributzka wrote:
>> The existing long nop support is only used to align code sections in
>> the AsmBackend and directly emits the raw bytes into the object file.
>> This implementation is on a higher level that works for MCAsmStreamer and MCObjectStreamer.
> 
> I don't see how you can force a specific byte sequence for MCAsmStreamer
> as the syntax for fixed sized nops is *not* well defined.
> 
> Joerg
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits





More information about the llvm-commits mailing list