[PATCH] D36272: [CodeGen][x86_64] Enable 'force_align_arg_pointer' attribute at x86_64

Anatol Pomozov via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Aug 24 11:44:53 PDT 2017


anatol.pomozov added a comment.

Related maillist discussion is http://lists.llvm.org/pipermail/cfe-dev/2017-June/054359.html

> Are we SURE the stack alignment for this type is supposed to be 16 bit as well?  I didn't see any discussion about it in the email conversation.
>  I have very little understanding of this attribute, but I would (perhaps naiively) presume that it would be different on 64 bit targets.

x86_64 ABI requires 16-byte stack alignment and compiler already enforces it at the caller side. It does not work when we jump from 32bit code (where stack might not be 16-byte aligned) to 64bit code. So we need a way to enforce the stack alignment at  callee side. In this case the attribute above is helpful.


https://reviews.llvm.org/D36272





More information about the cfe-commits mailing list