Skip to content

Specify overflowing signed divisions as undefined

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.

We should document that such divisions are undefined in the primop documentation and update bgamari/test-primops> appropriately.

To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information