interplane.Get Omega
Read in your language

omega-bridge

Omega-first language interoperability: checked conversion backends and native language bindings

Brought by drakestapleton

branch main Branches Tags History

omega-bridge / tests / native / x86 / trapcall.om

13 lines · 227 bytes Raw Blame History
1note Nested calls use xsave, and trap recovery must not depend on unwinding RBP.
2fn trleaf x ulong to ulong
3if eq x 0
4trap 5
5end
6ret x
7end
8fn trmid x ulong to ulong
9ret trleaf x
10end
11fn trapcall x ulong to ulong
12ret trmid x
13end