omega-mv
Omega: a language for verified programs, semantic identity and machine realization. Seed-born work and existing implementations have distinct provenance.
Brought by drakestapleton
omega-mv / bridge / 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 |