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

bugzilla-daemon at libre-soc.org bugzilla-daemon at libre-soc.org
Fri Jun 19 15:26:42 BST 2020


--- Comment #20 from Jacob Lifshay <programmerjake at gmail.com> ---
(In reply to Jacob Lifshay from comment #18)
> (In reply to Luke Kenneth Casson Leighton from comment #17)
> > done:
> > 
> > [master 428ee14] add in really bad hack which calls trunc_div or trunc_mod
> > https://bugs.libre-soc.org/show_bug.cgi?id=324#c16
> I was thinking that the spec's / and % operators would always translate to
> trunc_div and trunc_rem unless they are the FP operators -- if all inputs
> are non-negative there is no difference between trunc_* and floor div/mod.
> I don't think the hack with detecting if the variable name is `dividend` is
> necessary.
> are there any other uses of the div and rem operators?

according to the spec, the integer div and rem operators are always truncating

รท Division, with result truncated to integer
% Remainder of integer division

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

More information about the libre-soc-bugs mailing list