Skip to content
Snippets Groups Projects
Commit be8b4714 authored by Ben Gamari's avatar Ben Gamari 🐢
Browse files

Rule out overflowing signed divisions

Consider a signed division such as (-128::W8) / (-1::W8). GHC lowers
this to IDIV which will throw an FP exception since the 8-bit target
register is too small to accommodate the result, 128.

Therefore, we are going to specify the Quot primop as being undefined
in cases where the result overflows.

See test-primops#1.
parent 54823c8b
No related branches found
No related tags found
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment