summaryrefslogtreecommitdiff
path: root/src/jit/unwindarm.cpp
diff options
context:
space:
mode:
authorAndrey Kvochko <kvochko@users.noreply.github.com>2018-12-18 08:28:32 +0300
committerJan Kotas <jkotas@microsoft.com>2018-12-17 21:28:32 -0800
commit33987e98a992e8843b109c90b22c16c85469051c (patch)
tree7c7f35688baafdb4007c4958650abc1c86e8f443 /src/jit/unwindarm.cpp
parent779c45746b7cb7a5ea2b83e686d7e9e8e8e98817 (diff)
downloadcoreclr-33987e98a992e8843b109c90b22c16c85469051c.tar.gz
coreclr-33987e98a992e8843b109c90b22c16c85469051c.tar.bz2
coreclr-33987e98a992e8843b109c90b22c16c85469051c.zip
Generate ARM CFIs in prolog (#21505)
Diffstat (limited to 'src/jit/unwindarm.cpp')
-rw-r--r--src/jit/unwindarm.cpp21
1 files changed, 9 insertions, 12 deletions
diff --git a/src/jit/unwindarm.cpp b/src/jit/unwindarm.cpp
index cfd729091b..4a2b838258 100644
--- a/src/jit/unwindarm.cpp
+++ b/src/jit/unwindarm.cpp
@@ -194,9 +194,6 @@ void Compiler::unwindBegProlog()
if (generateCFIUnwindCodes())
{
unwindBegPrologCFI();
-#if defined(_TARGET_ARM_)
- unwindCfiEpilogFormed = false;
-#endif
return;
}
#endif // _TARGET_UNIX_
@@ -238,11 +235,6 @@ void Compiler::unwindBegEpilog()
void Compiler::unwindEndEpilog()
{
assert(compGeneratingEpilog);
-#if defined(_TARGET_UNIX_)
-#if defined(_TARGET_ARM_)
- unwindCfiEpilogFormed = true;
-#endif
-#endif // _TARGET_UNIX_
}
#if defined(_TARGET_ARM_)
@@ -379,6 +371,12 @@ void Compiler::unwindPushMaskInt(regMaskTP maskInt)
#if defined(_TARGET_UNIX_)
if (generateCFIUnwindCodes())
{
+ // If we are pushing LR, we should give unwind codes in terms of caller's PC
+ if (maskInt & RBM_LR)
+ {
+ maskInt = (maskInt & ~RBM_LR) | RBM_PC;
+ }
+ unwindPushPopMaskCFI(maskInt, false);
return;
}
#endif // _TARGET_UNIX_
@@ -395,6 +393,7 @@ void Compiler::unwindPushMaskFloat(regMaskTP maskFloat)
#if defined(_TARGET_UNIX_)
if (generateCFIUnwindCodes())
{
+ unwindPushPopMaskCFI(maskFloat, true);
return;
}
#endif // _TARGET_UNIX_
@@ -407,7 +406,6 @@ void Compiler::unwindPopMaskInt(regMaskTP maskInt)
#if defined(_TARGET_UNIX_)
if (generateCFIUnwindCodes())
{
- unwindPushPopMaskCFI(maskInt, false);
return;
}
#endif // _TARGET_UNIX_
@@ -436,7 +434,6 @@ void Compiler::unwindPopMaskFloat(regMaskTP maskFloat)
#if defined(_TARGET_UNIX_)
if (generateCFIUnwindCodes())
{
- unwindPushPopMaskCFI(maskFloat, true);
return;
}
#endif // _TARGET_UNIX_
@@ -451,7 +448,7 @@ void Compiler::unwindAllocStack(unsigned size)
#if defined(_TARGET_UNIX_)
if (generateCFIUnwindCodes())
{
- if (compGeneratingEpilog)
+ if (compGeneratingProlog)
{
unwindAllocStackCFI(size);
}
@@ -505,7 +502,7 @@ void Compiler::unwindSetFrameReg(regNumber reg, unsigned offset)
#if defined(_TARGET_UNIX_)
if (generateCFIUnwindCodes())
{
- if (compGeneratingEpilog)
+ if (compGeneratingProlog)
{
unwindSetFrameRegCFI(reg, offset);
}