You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add unwind rules for x0 (volatile) and x20 (non-voltile)
to trap() and break_to_debugger() for fun, and add
unwind instructions for the epilogue of trap().
When stopped in `break_to_debugger`,
```
* frame #0: 0x00000001000003e8 a.out`break_to_debugger + 4
frame swiftlang#1: 0x00000001000003d8 a.out`trap + 16
frame swiftlang#2: 0x00000001000003c0 a.out`to_be_interrupted + 20
frame swiftlang#3: 0x0000000100000398 a.out`main + 32
```
Normally we can't provide a volatile register (e.g. x0) up
the stack. And we can provide a non-volatile register (e.g. x20)
up the stack. I added an IsSame rule for trap() and break_to_debugger()
for x0, so it CAN be passed up the stack. And I added an Undefined
rule for x20 to trap() so it CAN'T be provided up the stack.
If a user selects `to_be_interrupted` and does `register read`,
they'll get x0 and they won't get x20. From `main`, they will not
get x0 or x20 (x0 because `to_be_interrupted` doesn't have an IsSame
rule).
0 commit comments