[PATCH] D70157: Align branches within 32-Byte boundary

annita.zhang via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Dec 9 05:17:52 PST 2019


annita.zhang added a comment.

> The point is that we have explicit requirement at the start and we have a lowering into 16-byte sequence that we need to be preserved exactly as it is.
>  Essentially what we need is  a "protection" for this sequence from any changes by machinery that generates the binary code.
>  How can we protect a particular byte sequence from being changed by this branch aligner?

No, we can't. The current solution is based on assembler to insert prefix or nop before the cross (or against) boundary branches. It can only ensure the explicit alignment specified by directive, but not any implicit alignment. I don't think any fixup based on assembler can do it. On the other hand, any code sequence after the alignment directive or even just in a function has some kind of implicit alignment. It's hard for assembler to tell which implicit alignment to preserve. The preferred way is to use explicit alignment directive to specify it.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D70157/new/

https://reviews.llvm.org/D70157





More information about the cfe-commits mailing list