[cfe-dev] Is force_align_arg_pointer function attribute supported at x86?

Anatol Pomozov via cfe-dev cfe-dev at lists.llvm.org
Wed Aug 2 16:23:01 PDT 2017


Hi Tim

On Wed, Jun 21, 2017 at 7:12 PM, Tim Northover <t.p.northover at gmail.com> wrote:
> On 21 June 2017 at 14:21, Anatol Pomozov <anatol.pomozov at gmail.com> wrote:
>> In my example above start_64() is the entry point for 64 mode. 32-bit
>> code makes a long jump and does not follow x86_64 stack alignment
>> policy. Having __attribute__((force_align_arg_pointer)) in this 64bit
>> code is a valid use-case IMO.
>
> The jump has to be made with inline assembly, that puts the whole
> control transfer well outside the compiler's purview. That said, I
> doubt there'd be strenuous objections to supporting it if patches
> turned up.

Here is the patch that enables
__attribute__((force_align_arg_pointer)) at x86_64. Tested with my 64
bit OS and it seems work as expected.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Enable-force_align_arg_pointer-attribute-at-x86_64.patch
Type: text/x-patch
Size: 2826 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20170802/b2408e56/attachment.bin>


More information about the cfe-dev mailing list