[pypy-dev] PyPy Assembler SQRT Patch

Armin Rigo arigo at tunes.org
Tue May 3 18:28:58 CEST 2011


Hi Alex,

On Tue, May 3, 2011 at 6:23 PM, Alex Gaynor <alex.gaynor at gmail.com> wrote:
> Another thing is it would be useful to test that the SQRTSD is generated, I
> don't know a good way to do that though.

In the test, you can hack genop_math_sqrt() in-place to set a flag,
and test that the flag is set...

And another place it should also be tested is in test_pypy_c_new.py
(pypy.module.pypyjit.test_pypy_c), i.e. you should write a test that
checks that in a full translated pypy-c, the code corresponding to the
Python source "math.sqrt(x)" indeed ends up being a CALL(sqrt_wrapper)
and not a CALL(ll_math_sqrt).


A bientôt,

Armin.



More information about the pypy-dev mailing list