[PATCH] D35720: [AArch64] Reserve a 16 byte aligned amount of fixed stack for win64 varargs

Martin Storsjö via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Jul 21 09:55:35 PDT 2017


mstorsjo added inline comments.


================
Comment at: lib/Target/AArch64/AArch64ISelLowering.cpp:2894-2895
       GPRIdx = MFI.CreateFixedObject(GPRSaveSize, -(int)GPRSaveSize, false);
-    else
+      if (GPRSaveSize & 15)
+        MFI.CreateFixedObject(8, -(int)alignTo(GPRSaveSize, 16), false);
+    } else
----------------
t.p.northover wrote:
> This is all a bit inconsistent. Parts of it are trying to handle `GPRSaveSize % 16 != 8` but it just goes right ahead and makes the slot 8 bytes.
Which way would you suggest doing it? In practice it will only ever be 8 or 0. Using `16 - alignTo(size,16)` as size for this fixed object? Using some other condition than `& 15` for checking if it's needed?


https://reviews.llvm.org/D35720





More information about the llvm-commits mailing list