DWORD cfiCodeBytes,
const CFI_CODE* const pCfiCode);
#endif
+#if defined(_TARGET_ARM_)
+ bool unwindCfiEpilogFormed; // Avoid duplicated unwind info for methods with multiple epilogs (we expect and require
+ // all the epilogs to be precisely the same)
+#endif
#endif // _TARGET_UNIX_
void Compiler::createCfiCode(FuncInfoDsc* func, UCHAR codeOffset, UCHAR cfiOpcode, USHORT dwarfReg, INT offset)
{
+#if defined(_TARGET_ARM_)
+ if (compGeneratingEpilog && unwindCfiEpilogFormed)
+ return;
+#endif
CFI_CODE cfiEntry(codeOffset, cfiOpcode, dwarfReg, offset);
func->cfiCodes->push_back(cfiEntry);
}
// since it is pushed as a frame register.
|| (reg == REG_FPBASE)
#endif // ETW_EBP_FRAMED
-#endif
+#endif // UNIX_AMD64_ABI
+#if defined(_TARGET_ARM_)
+ || (reg == REG_R11) || (reg == REG_LR) || (reg == REG_PC)
+#endif // _TARGET_ARM_
)
{
createCfiCode(func, cbProlog, CFI_REL_OFFSET, mapRegNumToDwarfReg(reg));
if (generateCFIUnwindCodes())
{
unwindBegPrologCFI();
+#if defined(_TARGET_ARM_)
+ unwindCfiEpilogFormed = false;
+#endif
return;
}
#endif // _TARGET_UNIX_
void Compiler::unwindEndEpilog()
{
assert(compGeneratingEpilog);
+#if defined(_TARGET_UNIX_)
+#if defined(_TARGET_ARM_)
+ unwindCfiEpilogFormed = true;
+#endif
+#endif // _TARGET_UNIX_
}
#if defined(_TARGET_ARM_)