| 14 | } |
| 15 | |
| 16 | static handle from_cpp(LIEF::assembly::aarch64::operands::Memory::offset_t val, |
| 17 | rv_policy, cleanup_list *) noexcept |
| 18 | { |
| 19 | using namespace LIEF::assembly::aarch64; |
| 20 | using namespace LIEF::assembly::aarch64::operands; |
| 21 | switch (val.type) { |
| 22 | case Memory::offset_t::TYPE::REG: |
| 23 | return make_caster<REG>::from_cpp(val.reg, rv_policy::copy, |
| 24 | /*cleanup_list*/nullptr); |
| 25 | |
| 26 | case Memory::offset_t::TYPE::DISP: |
| 27 | return make_caster<int64_t>::from_cpp(val.displacement, rv_policy::copy, |
| 28 | /*cleanup_list*/nullptr); |
| 29 | case Memory::offset_t::TYPE::NONE: |
| 30 | return nb::none(); |
| 31 | } |
| 32 | return nb::none(); |
| 33 | } |
| 34 | }; |
| 35 | } |
| 36 | |