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

Martin Storsjö via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Dec 14 23:14:26 PST 2017


mstorsjo added inline comments.


================
Comment at: lib/Target/AArch64/AArch64FrameLowering.cpp:597
+      break;
+    }
+
----------------
mstorsjo wrote:
> 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.
So I presume that MSVC didn't have any command line flag to enable a large code model from before/on other archs? I don't seem to find one in MSVC for ARM64 at least. (I.e., for the armv7 case, was this a case of MSVC just not supporting such a code model, or that it does but didn't emit code like this?)

In any case, I'll update this patch with similar documentation as for arm, about the fact that this is an extension.


https://reviews.llvm.org/D41131





More information about the llvm-commits mailing list