File tree Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -549,10 +549,12 @@ void MachineSMEABI::emitAllocateLazySaveBuffer(
549
549
550
550
// 1. Allocate the lazy save buffer.
551
551
if (Buffer == AArch64::NoRegister) {
552
- // TODO This function grows the stack with a subtraction, which doesn't work
553
- // on Windows. Some refactoring to share the functionality in
554
- // LowerWindowsDYNAMIC_STACKALLOC will be required once the Windows ABI
555
- // supports SME
552
+ // TODO: On Windows, we allocate the lazy save buffer in SelectionDAG (so
553
+ // Buffer != AArch64::NoRegister). This is done to reuse the existing
554
+ // expansions (which can insert stack checks). This works, but it means we
555
+ // will always allocate the lazy save buffer (even if the function contains
556
+ // no lazy saves). If we want to handle Windows here, we'll need to
557
+ // implement something similar to LowerWindowsDYNAMIC_STACKALLOC.
556
558
assert (!Subtarget->isTargetWindows () &&
557
559
" Lazy ZA save is not yet supported on Windows" );
558
560
Buffer = MRI->createVirtualRegister (&AArch64::GPR64RegClass);
You can’t perform that action at this time.
0 commit comments