[PATCH] D108887: [X86][MS] Fix the aligement mismatch of vector variable arguments on Win32

Reid Kleckner via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Aug 30 20:32:39 PDT 2021


rnk added inline comments.


================
Comment at: llvm/lib/Target/X86/X86CallingConv.td:29-30
+    : CCIf<"State.isVarArg() && "
+           "State.getMachineFunction().getSubtarget().getTargetTriple()."
+           "isOSWindows()",
+           A>;
----------------
pengfei wrote:
> rnk wrote:
> > Please check what mingw does in this case.
> With this patch, mingw also uses 4 bytes alignment for both caller and callee.
> But I'm not sure if it is the correct approach since I don't have a mingw environment to test.
> @LiuChen3 fixed Linux 32 bits problem in D78564 by changing callee's alignment to the vector size. Not sure if we should fix in that way.
@mstorsjo , do you mind checking what GCC does on Windows here? Mainly I'm looking out for the possibility that GCC passes such vectors indirectly when passed through varargs.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D108887/new/

https://reviews.llvm.org/D108887



More information about the llvm-commits mailing list