[PATCH] D138955: [AArch64] Make sure we don't emit packed unwind for .seh_save_any_reg_p
Eli Friedman via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Nov 30 13:49:54 PST 2022
This revision was landed with ongoing or failed builds.
This revision was automatically updated to reflect the committed changes.
Closed by commit rGd98f74a470d6: [AArch64] Make sure we don't emit packed unwind for .seh_save_any_reg_p (authored by efriedma).
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D138955/new/
https://reviews.llvm.org/D138955
Files:
llvm/lib/MC/MCWin64EH.cpp
llvm/test/MC/AArch64/seh-packed-unwind.s
Index: llvm/test/MC/AArch64/seh-packed-unwind.s
===================================================================
--- llvm/test/MC/AArch64/seh-packed-unwind.s
+++ llvm/test/MC/AArch64/seh-packed-unwind.s
@@ -370,6 +370,12 @@
// CHECK-NEXT: ExceptionRecord:
// CHECK-NEXT: ExceptionData {
// CHECK: EpiloguePacked: Yes
+// CHECK: RuntimeFunction {
+// CHECK-NEXT: Function: nonpacked16
+// CHECK-NEXT: ExceptionRecord:
+// CHECK-NEXT: ExceptionData {
+// CHECK: EpiloguePacked: Yes
+
.text
func1:
@@ -1115,3 +1121,39 @@
.seh_endepilogue
ret
.seh_endproc
+
+nonpacked16:
+ .seh_proc nonpacked16
+ // Make sure we correctly analyze .seh_save_any_reg_p
+ stp x29, x30, [sp, #-176]!
+ .seh_save_fplr_x 176
+ stp q6, q7, [sp, #16]
+ .seh_save_any_reg_p q6, 16
+ stp q8, q9, [sp, #48]
+ .seh_save_any_reg_p q8, 48
+ stp q10, q11, [sp, #80]
+ .seh_save_any_reg_p q10, 80
+ stp q12, q13, [sp, #112]
+ .seh_save_any_reg_p q12, 112
+ stp q14, q15, [sp, #144]
+ .seh_save_any_reg_p q14, 144
+ mov x29, sp
+ .seh_set_fp
+ .seh_endprologue
+ nop
+ .seh_startepilogue
+ ldp q14, q15, [sp, #144]
+ .seh_save_any_reg_p q14, 144
+ ldp q12, q13, [sp, #112]
+ .seh_save_any_reg_p q12, 112
+ ldp q10, q11, [sp, #80]
+ .seh_save_any_reg_p q10, 80
+ ldp q8, q9, [sp, #48]
+ .seh_save_any_reg_p q8, 48
+ ldp q6, q7, [sp, #16]
+ .seh_save_any_reg_p q6, 16
+ ldp x29, x30, [sp], #176
+ .seh_save_fplr_x 176
+ .seh_endepilogue
+ br x9
+ .seh_endproc
Index: llvm/lib/MC/MCWin64EH.cpp
===================================================================
--- llvm/lib/MC/MCWin64EH.cpp
+++ llvm/lib/MC/MCWin64EH.cpp
@@ -984,6 +984,21 @@
return false;
Location = End;
break;
+ case Win64EH::UOP_SaveAnyRegI:
+ case Win64EH::UOP_SaveAnyRegIP:
+ case Win64EH::UOP_SaveAnyRegD:
+ case Win64EH::UOP_SaveAnyRegDP:
+ case Win64EH::UOP_SaveAnyRegQ:
+ case Win64EH::UOP_SaveAnyRegQP:
+ case Win64EH::UOP_SaveAnyRegIX:
+ case Win64EH::UOP_SaveAnyRegIPX:
+ case Win64EH::UOP_SaveAnyRegDX:
+ case Win64EH::UOP_SaveAnyRegDPX:
+ case Win64EH::UOP_SaveAnyRegQX:
+ case Win64EH::UOP_SaveAnyRegQPX:
+ // These are never canonical; they don't show up with the usual Arm64
+ // calling convention.
+ return false;
}
}
if (RegI > 10 || RegF > 8)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D138955.479064.patch
Type: text/x-patch
Size: 2569 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20221130/b72f1ba8/attachment.bin>
More information about the llvm-commits
mailing list