mirror of
https://github.com/odin-lang/Odin.git
synced 2026-10-12 11:09:25 -04:00
LLVM legalizes a 64-bit sdiv.fix or udiv.fix whose dividend does not fit by widening it to a 128-bit division with remainder, for which no target has a library call, so code such as fixed_point_div(x, y, 63) on i64 aborted with "unsupported library call operation". 64-bit fixed point division is now built from plain 128-bit division and remainder, which lower to __divti3 and friends, rounding down and saturating as LLVM's expansion does. Results for the scales LLVM could already handle are unchanged. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>