Skip to content
Snippets Groups Projects

Rule out overflowing signed divisions

Closed Ben Gamari requested to merge T1 into master

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.

Fixes #1 (closed).

Merge request reports

Loading
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
Please register or sign in to reply
Loading