Closed Bug 529846 Opened 10 years ago Closed 10 years ago
.js failed on Solaris x86
Expected ....[0,0.29329773299429385,0] .... Got ....[0,0.2932977329942938,0] .... It is fine on SPARC.
It is a rounding problem with sqrt(). On Solaris x86, when it does fsqrt, the control word is 0x137f. Means double extended precision (64bits) and rounding to nearest. On Linux x86, the control word was 0x037f at startup, but it changed to 0x027f at some point. Means double precision (53bits) and rounding to nearest. Add -fprecision=double to CXXFLAGS will solve the problem, but I don't understand what's the trick for gcc/Linux.
Ah, I found it, FIX_FPU().
Match the behavior of FIX_FPU() as on other x86 platforms. Do the same thing for js_DoubleToECMAInt32, StringMatch.
Assignee: general → ginn.chen
Status: NEW → ASSIGNED
Attachment #424756 - Flags: review?(brendan)
Attachment #424756 - Flags: review?(brendan) → review?(jim)
Hi, Ginn. Taking a look at this and the other two, now.
Status: ASSIGNED → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.