Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

C.2.3 Mixed GP / FP Extern Intrinsics

The AArch64 backend supports the same mixed extern intrinsic family as x86_64:

__call_extern_mixed_1__(fn type0 value0)
__call_extern_mixed_2__(fn type0 value0 type1 value1)
...
__call_extern_mixed_8__(fn type0 value0 ... type7 value7)

Rules:

  • 0 passes the value through the general-purpose argument registers x0-x7
  • 1 treats the low 32 bits as raw f32 bits and passes them in the next floating-point argument register
  • 2 treats all 64 bits as raw f64 bits and passes them in the next floating-point argument register

This backend also provides:

__i64_to_f32_bits__(value)
__i64_to_f64_bits__(value)
__f32_bits_to_i64__(value)
__f64_bits_to_i64__(value)

These convert signed integers to f32 / f64 bit patterns while keeping udewy's runtime representation as integers. __f32_bits_to_i64__ and __f64_bits_to_i64__ convert float bit patterns back to signed integers.