Commit ef5d3b9
committed
[AArch64] Fix the emission of WinCFI for pac-ret+leaf and SCS
This commit fixes WinCFI opcodes being incorrectly emitted for test
cases in sign-return-address.ll.
Emit SEH_Nop opcode in emitShadowCallStackEpilogue the same way it
is done in emitShadowCallStackPrologue function - this fixes
12 bytes of instructions in range, but .seh directives corresponding to 8 bytes
error being reported for the epilogue of non_leaf_scs function.
Emit SEH_PrologEnd on the code path in emitPrologue function that may be
taken when pac-ret protection is emitted for a leaf function - this
fixes errors like the following:
starting epilogue (.seh_startepilogue) before prologue has ended (.seh_endprologue) in leaf_sign_all_v83
Stray .seh_endepilogue in leaf_sign_all_v831 parent bedd7dd commit ef5d3b9
File tree
2 files changed
+28
-9
lines changed- llvm
- lib/Target/AArch64
- test/CodeGen/AArch64
2 files changed
+28
-9
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1673 | 1673 | | |
1674 | 1674 | | |
1675 | 1675 | | |
1676 | | - | |
| 1676 | + | |
1677 | 1677 | | |
1678 | 1678 | | |
1679 | 1679 | | |
| |||
1682 | 1682 | | |
1683 | 1683 | | |
1684 | 1684 | | |
| 1685 | + | |
| 1686 | + | |
| 1687 | + | |
| 1688 | + | |
1685 | 1689 | | |
1686 | 1690 | | |
1687 | 1691 | | |
| |||
1786 | 1790 | | |
1787 | 1791 | | |
1788 | 1792 | | |
1789 | | - | |
| 1793 | + | |
1790 | 1794 | | |
1791 | 1795 | | |
| 1796 | + | |
| 1797 | + | |
1792 | 1798 | | |
1793 | 1799 | | |
1794 | 1800 | | |
1795 | 1801 | | |
1796 | | - | |
1797 | | - | |
| 1802 | + | |
| 1803 | + | |
1798 | 1804 | | |
1799 | 1805 | | |
1800 | 1806 | | |
| |||
1880 | 1886 | | |
1881 | 1887 | | |
1882 | 1888 | | |
1883 | | - | |
| 1889 | + | |
| 1890 | + | |
| 1891 | + | |
| 1892 | + | |
| 1893 | + | |
1884 | 1894 | | |
| 1895 | + | |
1885 | 1896 | | |
1886 | 1897 | | |
1887 | 1898 | | |
| |||
2354 | 2365 | | |
2355 | 2366 | | |
2356 | 2367 | | |
2357 | | - | |
2358 | | - | |
| 2368 | + | |
| 2369 | + | |
| 2370 | + | |
| 2371 | + | |
| 2372 | + | |
| 2373 | + | |
| 2374 | + | |
2359 | 2375 | | |
2360 | | - | |
2361 | | - | |
2362 | 2376 | | |
2363 | 2377 | | |
2364 | 2378 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
8 | 13 | | |
9 | 14 | | |
10 | 15 | | |
| |||
0 commit comments