#if defined(_TARGET_UNIX_)
int mapRegNumToDwarfReg(regNumber reg);
void createCfiCode(FuncInfoDsc* func, UCHAR codeOffset, UCHAR opcode, USHORT dwarfReg, INT offset = 0);
- void unwindPushCFI(regNumber reg);
+ void unwindPushPopCFI(regNumber reg);
void unwindBegPrologCFI();
- void unwindPushMaskCFI(regMaskTP regMask, bool isFloat);
+ void unwindPushPopMaskCFI(regMaskTP regMask, bool isFloat);
void unwindAllocStackCFI(unsigned size);
void unwindSetFrameRegCFI(regNumber reg, unsigned offset);
void unwindEmitFuncCFI(FuncInfoDsc* func, void* pHotCode, void* pColdCode);
func->cfiCodes->push_back(cfiEntry);
}
-void Compiler::unwindPushCFI(regNumber reg)
+void Compiler::unwindPushPopCFI(regNumber reg)
{
+#if defined(_TARGET_ARM_)
+ assert(compGeneratingEpilog);
+#else
assert(compGeneratingProlog);
+#endif
FuncInfoDsc* func = funCurrentFunc();
- unsigned int cbProlog = unwindGetCurrentOffset(func);
- noway_assert((BYTE)cbProlog == cbProlog);
+ unsigned int cbProlog = 0;
+ if (compGeneratingProlog)
+ {
+ cbProlog = unwindGetCurrentOffset(func);
+ noway_assert((BYTE)cbProlog == cbProlog);
+
+ createCfiCode(func, cbProlog, CFI_ADJUST_CFA_OFFSET, DWARF_REG_ILLEGAL, REGSIZE_BYTES == 8 ? 8 : 4);
+ }
- createCfiCode(func, cbProlog, CFI_ADJUST_CFA_OFFSET, DWARF_REG_ILLEGAL, REGSIZE_BYTES == 8 ? 8 : 4);
if ((RBM_CALLEE_SAVED & genRegMask(reg))
#if defined(UNIX_AMD64_ABI)
#if ETW_EBP_FRAMED
#endif // FEATURE_EH_FUNCLETS
}
-void Compiler::unwindPushMaskCFI(regMaskTP regMask, bool isFloat)
+void Compiler::unwindPushPopMaskCFI(regMaskTP regMask, bool isFloat)
{
regMaskTP regBit = isFloat ? genRegMask(REG_FP_FIRST) : 1;
if (regBit & regMask)
{
- unwindPushCFI(regNum);
+ unwindPushPopCFI(regNum);
}
}
}
#ifdef UNIX_AMD64_ABI
if (generateCFIUnwindCodes())
{
- unwindPushCFI(reg);
+ unwindPushPopCFI(reg);
}
else
#endif // UNIX_AMD64_ABI
#if defined(_TARGET_UNIX_)
if (generateCFIUnwindCodes())
{
- unwindPushMaskCFI(maskInt, false);
return;
}
#endif // _TARGET_UNIX_
#if defined(_TARGET_UNIX_)
if (generateCFIUnwindCodes())
{
- unwindPushMaskCFI(maskFloat, true);
return;
}
#endif // _TARGET_UNIX_
#if defined(_TARGET_UNIX_)
if (generateCFIUnwindCodes())
{
+ unwindPushPopMaskCFI(maskInt, false);
return;
}
#endif // _TARGET_UNIX_
#if defined(_TARGET_UNIX_)
if (generateCFIUnwindCodes())
{
+ unwindPushPopMaskCFI(maskFloat, true);
return;
}
#endif // _TARGET_UNIX_
#if defined(_TARGET_UNIX_)
if (generateCFIUnwindCodes())
{
- if (compGeneratingProlog)
+ if (compGeneratingEpilog)
{
unwindAllocStackCFI(size);
}
#if defined(_TARGET_UNIX_)
if (generateCFIUnwindCodes())
{
- if (compGeneratingProlog)
+ if (compGeneratingEpilog)
{
unwindSetFrameRegCFI(reg, offset);
}