Division by zero
Division by zero
Posted Jan 4, 2025 13:06 UTC (Sat) by pizza (subscriber, #46)In reply to: Division by zero by pm215
Parent article: Preventing data races with Pony
Historically, Arm processor didn't actually implement a hardware integer divider, so any faults/exceptions had to be triggered by the low-level software runtime library.
But starting with armv7-m and armv8, there are integer divide instructions, and they can generate divide by zero exceptions -- something I can personally attest to triggering numerous times. Here is the documentation on the UDIV/SDIV instructions on armv7-m:
https://developer.arm.com/documentation/ddi0403/d/Applica...
Meanwhile, IIRC the various Arm FPUs always supported faults/exceptions, including for divide-by-zero.
