Division by zero
Division by zero
Posted Jan 4, 2025 18:10 UTC (Sat) by dskoll (subscriber, #1630)In reply to: Division by zero by khim
Parent article: Preventing data races with Pony
Huh, you are right! Even though my Pi 4 is running an aarch64 kernel, userspace is 32-bit armhf and the test program raised SIGFPE. I tried the test program on a fully 64-bit Pi 4 with 64-bit userspace and it ran without complaint, assigning 0
to z
.
Posted Jan 4, 2025 20:34 UTC (Sat)
by pm215 (subscriber, #98099)
[Link]
You can probably pass the compiler some kind of -march or -mcpu options to tell it to generate code assuming the v8 CPU you have, and then it ought to emit the udiv or sdiv inline, if you want to look at the behaviour in that situation.
Division by zero