Bug 810

Summary: openpower-isa simulator improperly handles fp division by zero
Product: Libre-SOC's first SoC Reporter: Jacob Lifshay <programmerjake>
Component: Source CodeAssignee: Luke Kenneth Casson Leighton <lkcl>
Status: CONFIRMED ---    
Severity: normal CC: libre-soc-bugs
Priority: ---    
Version: unspecified   
Hardware: Other   
OS: Linux   
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:

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