[PATCH] D41131: [AArch64] Implement stack probing for windows

Martin Storsjö via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Dec 14 22:16:13 PST 2017


mstorsjo added inline comments.


================
Comment at: lib/Target/AArch64/AArch64FrameLowering.cpp:597
+      break;
+    }
+
----------------
compnerd wrote:
> mstorsjo wrote:
> > compnerd wrote:
> > > Is this something that Visual Studio supports?  Or the code model an extension like the ARMv7 case?
> > I modeled this based on what MSVC produces. It's pretty similar to the ARMv7 case, with one difference: On ARM, on return from `__chkstk`, the register has been rescaled into bytes, so you do `sub sp, sp, r4`, while here it's kept in the same unit as on input to `__chkstk`, and thus need to do `sub sp, sp, x15, lsl #4`.
> Oh, I assumed as much.  However, the behavior of the large code model is something which is a conforming extension.  The generated code is slightly different to allow the values to extend past what the pattern MSVC emits would allow.  I am asking if they did this differently in the ARM64 backend or if that is an extension (and thus should be documented).
I didn't check that case with msvc, I'll have a look.


https://reviews.llvm.org/D41131





More information about the llvm-commits mailing list