[PATCH] D70224: [WinEH] Fix the wrong alignment orientation during calculating EH frame.
Pengfei Wang via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Nov 13 23:29:06 PST 2019
pengfei created this revision.
pengfei added reviewers: rnk, RKSimon, craig.topper, andrew.w.kaylor.
Herald added subscribers: llvm-commits, hiraditya.
Herald added a project: LLVM.
This is a bug fix for further issues in PR43585.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D70224
Files:
llvm/lib/Target/X86/X86FrameLowering.cpp
llvm/test/CodeGen/X86/win64-funclet-savexmm.ll
Index: llvm/test/CodeGen/X86/win64-funclet-savexmm.ll
===================================================================
--- llvm/test/CodeGen/X86/win64-funclet-savexmm.ll
+++ llvm/test/CodeGen/X86/win64-funclet-savexmm.ll
@@ -85,17 +85,17 @@
; CHECK: subq $88, %rsp
; CHECK: .seh_stackalloc 88
; CHECK: leaq 112(%rdx), %rbp
-; CHECK: vmovaps %xmm8, 48(%rsp)
-; CHECK: .seh_savexmm %xmm8, 48
-; CHECK: vmovaps %xmm7, 64(%rsp)
-; CHECK: .seh_savexmm %xmm7, 64
-; CHECK: vmovaps %xmm6, 80(%rsp)
-; CHECK: .seh_savexmm %xmm6, 80
+; CHECK: vmovaps %xmm8, 32(%rsp)
+; CHECK: .seh_savexmm %xmm8, 32
+; CHECK: vmovaps %xmm7, 48(%rsp)
+; CHECK: .seh_savexmm %xmm7, 48
+; CHECK: vmovaps %xmm6, 64(%rsp)
+; CHECK: .seh_savexmm %xmm6, 64
; CHECK: .seh_endprologue
; CHECK: movl -{{[0-9]+}}(%rbp), %ecx
-; CHECK: vmovaps 80(%rsp), %xmm6
-; CHECK: vmovaps 64(%rsp), %xmm7
-; CHECK: vmovaps 48(%rsp), %xmm8
+; CHECK: vmovaps 64(%rsp), %xmm6
+; CHECK: vmovaps 48(%rsp), %xmm7
+; CHECK: vmovaps 32(%rsp), %xmm8
; CHECK: leaq .LBB0_1(%rip), %rax
; CHECK: addq $88, %rsp
; CHECK: popq %rbx
Index: llvm/lib/Target/X86/X86FrameLowering.cpp
===================================================================
--- llvm/lib/Target/X86/X86FrameLowering.cpp
+++ llvm/lib/Target/X86/X86FrameLowering.cpp
@@ -1860,7 +1860,7 @@
return getFrameIndexReference(MF, FI, FrameReg);
FrameReg = TRI->getStackRegister();
- return alignTo(MFI.getMaxCallFrameSize(), getStackAlignment()) + it->second;
+ return alignDown(MFI.getMaxCallFrameSize(), getStackAlignment()) + it->second;
}
int X86FrameLowering::getFrameIndexReferenceSP(const MachineFunction &MF,
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D70224.229237.patch
Type: text/x-patch
Size: 1663 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20191114/1f29e1fc/attachment.bin>
More information about the llvm-commits
mailing list