Bug 810 - openpower-isa simulator improperly handles fp division by zero
Summary: openpower-isa simulator improperly handles fp division by zero
Status: CONFIRMED
Alias: None
Product: Libre-SOC's first SoC
Classification: Unclassified
Component: Source Code (show other bugs)
Version: unspecified
Hardware: Other Linux
: --- normal
Assignee: Luke Kenneth Casson Leighton
URL:
Depends on:
Blocks:
 
Reported: 2022-04-15 21:32 BST by Jacob Lifshay
Modified: 2022-04-15 21:32 BST (History)
1 user (show)

See Also:
NLnet milestone: ---
total budget (EUR) for completion of task and all subtasks: 0
budget (EUR) for this task, excluding subtasks' budget: 0
parent task for budget allocation:
child tasks for budget allocation:
The table of payments (in EUR) for this task; TOML format:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jacob Lifshay 2022-04-15 21:32:47 BST
openpower-isa simulator improperly handles fp division by zero, raising ZeroDivisionError instead of following ieee754 and returning inf/nan.

ieee754 specifies:
nan/0 -> nan
0/0 -> nan
+x/+0 -> +inf
-x/+0 -> -inf
+x/-0 -> -inf
-x/-0 -> +inf

see https://salsa.debian.org/Kazan-team/simple-soft-float/-/blob/04506f1f0196dbbf5cfede98b72d7d9702c5f156/src/lib.rs#L3086