Commit 1ca763b
authored
[llvm-readobj] [ARMWinEH] Fix printing of packed unwind with H=1, RegI=RegF=0, CR!=1 (#170294)
In these cases, there are no other GPRs or float registers that would
have been backed up before the register homing area, that would have
allocated space on the stack for the saved registers.
Normally, the register homing part of the prologue consists of 4 nop
unwind codes. However, if we haven't allocated stack space for those
arguments yet, there's no space to store them in. The previous printout,
printing "stp x0, x1, [sp, #-N]!" wouldn't work when interpreted as a
nop unwind code.
Based on "dumpbin -unwindinfo", and from empirical inspection with
RtlVirtualUnwind, it turns out that the homing of argument registers is
done outside of the prologue. In these cases, "dumpbin -unwindinfo"
prints an annotation "(argument registers homed post-prolog)".
Adjust the printout accordingly. In these cases, the later stack
allocation (either "stp x29, x30, [sp, #-LocSZ]! or "sub sp, sp,
#LocSZ") is adjusted to include the space the homed registers (i.e. be
the full size from FrameSize).1 parent 6822e3c commit 1ca763b
File tree
2 files changed
+46
-14
lines changed- llvm
- test/tools/llvm-readobj/COFF
- tools/llvm-readobj
2 files changed
+46
-14
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
105 | 105 | | |
106 | 106 | | |
107 | 107 | | |
108 | | - | |
109 | | - | |
110 | | - | |
111 | | - | |
112 | | - | |
| 108 | + | |
113 | 109 | | |
114 | 110 | | |
115 | 111 | | |
| |||
276 | 272 | | |
277 | 273 | | |
278 | 274 | | |
| 275 | + | |
| 276 | + | |
| 277 | + | |
| 278 | + | |
| 279 | + | |
| 280 | + | |
| 281 | + | |
| 282 | + | |
| 283 | + | |
| 284 | + | |
| 285 | + | |
| 286 | + | |
| 287 | + | |
| 288 | + | |
| 289 | + | |
| 290 | + | |
| 291 | + | |
| 292 | + | |
| 293 | + | |
| 294 | + | |
| 295 | + | |
| 296 | + | |
| 297 | + | |
| 298 | + | |
| 299 | + | |
| 300 | + | |
| 301 | + | |
| 302 | + | |
| 303 | + | |
| 304 | + | |
| 305 | + | |
279 | 306 | | |
280 | 307 | | |
281 | 308 | | |
| |||
296 | 323 | | |
297 | 324 | | |
298 | 325 | | |
| 326 | + | |
| 327 | + | |
299 | 328 | | |
300 | 329 | | |
301 | 330 | | |
| |||
331 | 360 | | |
332 | 361 | | |
333 | 362 | | |
| 363 | + | |
| 364 | + | |
| 365 | + | |
| 366 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1404 | 1404 | | |
1405 | 1405 | | |
1406 | 1406 | | |
| 1407 | + | |
| 1408 | + | |
| 1409 | + | |
| 1410 | + | |
| 1411 | + | |
| 1412 | + | |
1407 | 1413 | | |
1408 | 1414 | | |
1409 | 1415 | | |
| |||
1419 | 1425 | | |
1420 | 1426 | | |
1421 | 1427 | | |
1422 | | - | |
| 1428 | + | |
1423 | 1429 | | |
1424 | 1430 | | |
1425 | 1431 | | |
1426 | | - | |
1427 | | - | |
1428 | | - | |
1429 | | - | |
1430 | | - | |
1431 | | - | |
1432 | | - | |
1433 | | - | |
| 1432 | + | |
1434 | 1433 | | |
1435 | 1434 | | |
1436 | 1435 | | |
| |||
0 commit comments