omega-bridge
Omega-first language interoperability: checked conversion backends and native language bindings
Brought by drakestapleton
omega-bridge / tests / native / x86 / trapcall.om
| 1 | note Nested calls use xsave, and trap recovery must not depend on unwinding RBP. |
| 2 | fn trleaf x ulong to ulong |
| 3 | if eq x 0 |
| 4 | trap 5 |
| 5 | end |
| 6 | ret x |
| 7 | end |
| 8 | fn trmid x ulong to ulong |
| 9 | ret trleaf x |
| 10 | end |
| 11 | fn trapcall x ulong to ulong |
| 12 | ret trmid x |
| 13 | end |