[all-commits] [llvm/llvm-project] 0c52ab: [MC] [Win64EH] Fix the calculation of the end of e...
Martin Storsjö via All-commits
all-commits at lists.llvm.org
Mon Aug 8 13:05:02 PDT 2022
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 0c52ab39688e8e107487b8cee00f509fe092f40a
https://github.com/llvm/llvm-project/commit/0c52ab39688e8e107487b8cee00f509fe092f40a
Author: Martin Storsjö <martin at martin.st>
Date: 2022-08-08 (Mon, 08 Aug 2022)
Changed paths:
M llvm/lib/MC/MCWin64EH.cpp
A llvm/test/MC/AArch64/seh-multi-epilog.s
Log Message:
-----------
[MC] [Win64EH] Fix the calculation of the end of epilogs
Exclude the terminating end opcode from the epilog - it doesn't
correspond to an actual instruction that is included in the epilog
itself (within the .seh_startepilogue/.seh_endepilogue range).
In most (all?) cases, an epilog is followed by a matching terminating
instruction though (a ret or a branch to a tail call), but it's not
strictly within the .seh_startepilogue/.seh_endepilogue range.
This fixes a number of failed asserts in cases where the codegen
has incorrectly reoredered SEH opcodes so they don't match up
exactly with their instructions.
However this still just avoids failing the assertion; the root cause
of generating unexpected epilogs is still present (and fixing that is
a less obvious issue).
Differential Revision: https://reviews.llvm.org/D131393
More information about the All-commits
mailing list