aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/MC/MCWin64EH.cpp
diff options
context:
space:
mode:
authorEli Friedman <efriedma@quicinc.com>2022-12-01 12:06:31 -0800
committerEli Friedman <efriedma@quicinc.com>2022-12-01 12:06:31 -0800
commite65c5eebb8ed534b4575878e42e532389dcb5a2c (patch)
treeb47e07b846c9fc6ce6018a2d1d227d43de7cc7d6 /llvm/lib/MC/MCWin64EH.cpp
parentdd8d0d21ce6d0665ef5d426372096aaed85b479a (diff)
downloadllvm-e65c5eebb8ed534b4575878e42e532389dcb5a2c.zip
llvm-e65c5eebb8ed534b4575878e42e532389dcb5a2c.tar.gz
llvm-e65c5eebb8ed534b4575878e42e532389dcb5a2c.tar.bz2
[AArch64] Make opcode switch in tryARM64PackedUnwind comprehensive.
I don't think compiler-generated code could actually be affected by this, but better to be thorough. Differential Revision: https://reviews.llvm.org/D139048
Diffstat (limited to 'llvm/lib/MC/MCWin64EH.cpp')
-rw-r--r--llvm/lib/MC/MCWin64EH.cpp17
1 files changed, 17 insertions, 0 deletions
diff --git a/llvm/lib/MC/MCWin64EH.cpp b/llvm/lib/MC/MCWin64EH.cpp
index 9972270..5102d48 100644
--- a/llvm/lib/MC/MCWin64EH.cpp
+++ b/llvm/lib/MC/MCWin64EH.cpp
@@ -999,6 +999,23 @@ static bool tryARM64PackedUnwind(WinEH::FrameInfo *info, uint32_t FuncLength,
// These are never canonical; they don't show up with the usual Arm64
// calling convention.
return false;
+ case Win64EH::UOP_AllocLarge:
+ // Allocations this large can't be represented in packed unwind (and
+ // usually don't fit the canonical form anyway because we need to use
+ // __chkstk to allocate the stack space).
+ return false;
+ case Win64EH::UOP_AddFP:
+ // "add x29, sp, #N" doesn't show up in the canonical pattern (except for
+ // N=0, which is UOP_SetFP).
+ return false;
+ case Win64EH::UOP_TrapFrame:
+ case Win64EH::UOP_Context:
+ case Win64EH::UOP_ClearUnwoundToCall:
+ case Win64EH::UOP_PushMachFrame:
+ // These are special opcodes that aren't normally generated.
+ return false;
+ default:
+ report_fatal_error("Unknown Arm64 unwind opcode");
}
}
if (RegI > 10 || RegF > 8)