Commit eabd9c4
[ARM][KCFI] Fix bundle sizes to reflect worst-case expansion (llvm#164917)
The KCFI_CHECK pseudo-instruction size for ARM got miscalculated. These
should represent worst-case expansion to ensure correct branch range
calculations and code layout.
Update the Size field for each ARM sub-architecture:
- ARM: 28 → 40 bytes (10 instructions @ 4 bytes when r3 spill needed)
- Thumb2: 32 → 34 bytes (mixed 16/32-bit instructions with r3 spill)
- Thumb1: 50 → 38 bytes (19 instructions @ 2 bytes with r2+r3 spills)
The ARM and Thumb2 sizes were underestimating the case where the target
register is r12, requiring r3 to be used as scratch and
spilled/restored. The Thumb1 size was overestimated and has been
corrected to the actual worst-case of 19 instructions.1 parent 17d98ce commit eabd9c4
1 file changed
+7
-5
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6546 | 6546 | | |
6547 | 6547 | | |
6548 | 6548 | | |
6549 | | - | |
| 6549 | + | |
| 6550 | + | |
6550 | 6551 | | |
6551 | 6552 | | |
6552 | 6553 | | |
6553 | 6554 | | |
6554 | 6555 | | |
6555 | 6556 | | |
6556 | | - | |
6557 | | - | |
| 6557 | + | |
| 6558 | + | |
6558 | 6559 | | |
6559 | 6560 | | |
6560 | 6561 | | |
6561 | 6562 | | |
6562 | 6563 | | |
6563 | 6564 | | |
6564 | | - | |
6565 | | - | |
| 6565 | + | |
| 6566 | + | |
| 6567 | + | |
6566 | 6568 | | |
6567 | 6569 | | |
6568 | 6570 | | |
| |||
0 commit comments