[LLVMdev] Proposal: Adding aligned instruction bundle support to MC
garious at gmail.com
Tue Dec 4 17:23:38 PST 2012
> we are splitting the effort to manageable chunks that can
> be committed, tested and reviewed separately as
> independently as feasible
I'd be interested in experimenting with this stuff sooner than later.
Could you dump all the patches in a publicly accessible repo? How about
On Tue, Dec 4, 2012 at 3:53 PM, Eli Bendersky <eliben at google.com> wrote:
> We (the Portable Native Client team) would like to start upstreaming
> our LLVM modifications which contain support for Software Fault
> Isolation (SFI) as required for sandboxing programs to run under
> Native Client. Since the "total patch size" is quite big, we are
> splitting the effort to manageable chunks that can be committed,
> tested and reviewed separately as independently as feasible.
> One of the first things we'd like to start with is support for aligned
> instruction bundles in MC (assembler) level. This support exists in
> gas since binutils version 2.23
> Succinctly, the initial proposal is to add the following directives:
> .bundle_align_mode <num>
> With the following semantics:
> When aligned instruction bundle mode ("bundling" in short) is enabled
> (.bundle_align_mode was encountered with an argument > 0, which is the
> power of 2 to which the bundle size is equal), single
> instructions and groups of instructions between .bundle_lock and
> .bundle_unlock directives cannot cross a bundle boundary.
> For example, consider the following:
> .bundle_align_mode 4
> Assuming that each of the mov instructions is 7 bytes long and mov1 is
> aligned to a 16-byte boundary, two bytes of NOP padding will be
> inserted between mov2 and mov3 to make sure that mov3 does not cross a
> 16-byte bundle boundary.
> A slightly modified example:
> .bundle_align_mode 4
> Here, since the bundle-locked sequence "mov2 mov3" cannot cross a
> bundle boundary, 9 bytes of NOP padding will be inserted between mov1
> and mov2.
> For information on how this ability is used for software fault
> isolation by Native Client, see the following resources:
> * http://src.chromium.org/viewvc/native_client/data/site/NaCl_SFI.pdf[PDF link]
> * Other papers listed at
> We want to start with this feature because it is self-contained in MC,
> makes LLVM more compatible with gas, level and can be easily tested.
> Future upstreaming efforts will be able to build upon this
> Any comments, ideas and suggestions are welcome.
> LLVM Developers mailing list
> LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the llvm-dev