Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/corert.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorsergey ignatov <sergign60@mail.ru>2018-08-13 22:27:37 +0300
committerJan Kotas <jkotas@microsoft.com>2018-08-13 22:27:37 +0300
commitd55ebfd33d4d45afbdf1a3adedc32a839c5a4a69 (patch)
tree46147f33f981bb0ea8ae91f0d7f279ab9349475e /src
parent9b17c1edb9d8d826c666693ab1b8ee05f77bd0b7 (diff)
Fixed reverse ordering of unwind insts in the object file (#6220)
Diffstat (limited to 'src')
-rw-r--r--src/ILCompiler.Compiler/src/Compiler/DependencyAnalysis/ObjectWriter.cs17
1 files changed, 13 insertions, 4 deletions
diff --git a/src/ILCompiler.Compiler/src/Compiler/DependencyAnalysis/ObjectWriter.cs b/src/ILCompiler.Compiler/src/Compiler/DependencyAnalysis/ObjectWriter.cs
index 51b4d5468..4a85d860d 100644
--- a/src/ILCompiler.Compiler/src/Compiler/DependencyAnalysis/ObjectWriter.cs
+++ b/src/ILCompiler.Compiler/src/Compiler/DependencyAnalysis/ObjectWriter.cs
@@ -733,12 +733,21 @@ namespace ILCompiler.DependencyAnalysis
List<byte[]> cfis;
if (_offsetToCfis.TryGetValue(offset, out cfis))
{
- foreach (byte[] cfi in cfis)
+ if (forArm)
{
- if (forArm)
- EmitARMExIdxCode(offset, cfi);
- else
+ // Unwind insts are generated in the object file in the reversed order on arm,
+ // so we should reverse the cfi list
+ for (int index = cfis.Count - 1; index >= 0; index--)
+ {
+ EmitARMExIdxCode(offset, cfis[index]);
+ }
+ }
+ else
+ {
+ foreach (byte[] cfi in cfis)
+ {
EmitCFICode(offset, cfi);
+ }
}
}
}