• chunyang.dai's avatar
    X87: fix the sqrt issue. · d43bbd06
    chunyang.dai authored
           The test mjsunit/regress/regress-sqrt compares the result of Math.sqrt function
           when using full-compiler and turbofan/crankshaft compiler seperately. But according
           to glibc bug fixing(https://sourceware.org/bugzilla/show_bug.cgi?id=14032). The
           glibc implementation of std::sqrt() (It is invoked in the generated code when
           full-compiler is used.) will change since glibc 2.19.
    
           In order to keep consistence of Math.sqrt translation in turbofan compiler
           and the pass of mjsunit/regress/regress-sqrt. we translate the Math.sqrt func
           according to the same fix in glibc change.  If the GLIBC version >=2.19, we will
           set the precision to Double. (the original is extended-double).
    
           This fix is to fix the same issue in https://codereview.chromium.org/606403002 for
           crankshaft. This fix may be ported for crankshaft too.
    
    BUG=
    
    Review URL: https://codereview.chromium.org/1425763002
    
    Cr-Commit-Position: refs/heads/master@{#31592}
    d43bbd06
code-generator-x87.cc 62.6 KB