[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:23:10 BST 2020
https://bugs.libre-soc.org/show_bug.cgi?id=324
--- Comment #18 from Jacob Lifshay <programmerjake at gmail.com> ---
(In reply to Luke Kenneth Casson Leighton from comment #17)
> (In reply to Luke Kenneth Casson Leighton from comment #16)
> > (In reply to Jacob Lifshay from comment #13)
> > > All divisions are truncating division, not floor division, so we should
> > > translate them to function calls to custom trunc_div and trunc_rem functions
> > > rather than python's // and % operators (since the mod* instructions
> > > implement the mathematical remainder of truncating division operation rather
> > > than the mathematical modulo operation).
> >
> > urk. yuk. that's going to be a bad hack (based on the name of the variables
> > involved - what is being assigned to). it's doable - just not pretty.
>
> 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?
--
You are receiving this mail because:
You are on the CC list for the bug.
More information about the libre-soc-bugs
mailing list