[Libre-soc-dev] All div pipe tests pass
Jacob Lifshay
programmerjake at gmail.com
Fri Oct 9 00:55:49 BST 2020
On Wed, Oct 7, 2020 at 2:57 PM Luke Kenneth Casson Leighton
<lkcl at lkcl.net> wrote:
>
> On 10/7/20, Jacob Lifshay <programmerjake at gmail.com> wrote:
>
> >> do you have / know of examples / cases / instructions where
> >> undefined==0 is not true?
> >>
> >
> > modsw has some: the top 32-bits of the result are undefined and power9
> > sign-extends the lower 32-bits
> >
> > there are a whole pile in the mul* instructions.
>
> ah. then we definitely need to list them and go over all of them
My method for finding them has been to go through the tests for the
instructions and find where they fail, compare the results of the
simulator to power-instruction-analyzer, then modify the spec
pseudo-code till that case passes, then go onto the next case. This
makes it difficult to just come up with the list of instructions you
wanted without fixing them as I go, otherwise you end up with tons of
false-positives due to eg. using DIVS instead of `//`.
So, I'm going to just go through the pseudo-code replacing uses of
`undefined` with `undef` and fixing the test failures. We can still
easily get the code for the "Fix the power spec without changing
undefined behavior" proposal by just converting all `undef` calls back
to `undefined` and deleting dead code.
Jacob
More information about the Libre-soc-dev
mailing list