[Libre-soc-bugs] [Bug 324] create POWER9 DIV pipeline

bugzilla-daemon at libre-soc.org bugzilla-daemon at libre-soc.org
Fri Jun 19 14:23:34 BST 2020


https://bugs.libre-soc.org/show_bug.cgi?id=324

--- Comment #14 from Jacob Lifshay <programmerjake at gmail.com> ---
(In reply to Luke Kenneth Casson Leighton from comment #12)
> also this, from the spec for modsw:
> 
> If an attempt is made to perform any of the divisions
> 0x8000_0000 % -1
> <anything> % 0
> 
> and for modsd:
> 
> If an attempt is made to perform any of the divisions
> <anything> % 0 0x8000_0000_0000_0000 % -1

Those are just the conditions where the corresponding div* instruction would
overflow.

> 
> that's likely going to have to be special-cased as well, or at least tested
> and we work out what is supposed to be put into RT.

already done:
https://salsa.debian.org/Kazan-team/power-instruction-analyzer/-/blob/13dae100c6bc5685059195010ceb46ae68b9f306/src/instr_models.rs#L195

> interestingly these
> do *not* result in overflow flags being set.

To clarify my previous statement, the OV, OV32, and SO flags are only set when
the div*o variant of the instructions is selected but that doesn't exist for
the mod* instructions, that's because div* is XO-form and mod* is X-form. I'm
assuming ALUOutputStage will handle that wrinkle, though didn't yet check.

-- 
You are receiving this mail because:
You are on the CC list for the bug.


More information about the libre-soc-bugs mailing list