[PATCH] D34337: [PPC] Fix two bugs in frame lowering.

Hal Finkel via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jun 29 08:04:07 PDT 2017


hfinkel added a comment.

In https://reviews.llvm.org/D34337#794950, @nemanjai wrote:

> LGTM. If @hfinkel doesn't have any objections, I think this can go in.


So... I believe if we make this change as-is then we've dropped Darwin support. Darwin had a 224-byte red zone. I'm in favor of doing that, but I don't think we should just do it subtly like this. I'd add a check for Darwin for now (to keep the 224). Then we can rip it out with the rest of Darwin support when we do that.



================
Comment at: lib/Target/PowerPC/PPCFrameLowering.cpp:1873
+    // Insert alignment padding, we need 16-byte alignment. Note: for postive
+    // number the alignment formula is : y = x + (n-1) & ~(n-1). But since we
+    // are using negative number here (the stack grows downward). We should
----------------
Please add parens here (x + (n-1)) & (n-1).


https://reviews.llvm.org/D34337





More information about the llvm-commits mailing list