[Webkit-unassigned] [Bug 179446] [JSC][MIPS] Use fcsr to check the validity of the result of trunc.w.d
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Wed Nov 8 14:24:44 PST 2017
https://bugs.webkit.org/show_bug.cgi?id=179446
--- Comment #2 from Guillaume Emont <guijemont at igalia.com> ---
Created attachment 326375
--> https://bugs.webkit.org/attachment.cgi?id=326375&action=review
Test program to check the behavior of trunc.w.d
To help me figure out what trunc.w.d does, other than using gdb on JIT'ed code, I created this little program.
On one MIPS device it outputs expected values:
trunc.w.d of 0(0): 0 invalid operation cause bit: 0 invalid operation flag: 0
trunc.w.d of 42(0x4045000000000000): 0x2a invalid operation cause bit: 0 invalid operation flag: 0
trunc.w.d of -1234(0xc093480000000000): 0xfffffb2e invalid operation cause bit: 0 invalid operation flag: 0
trunc.w.d of inf(0x7ff0000000000000): 0x7fffffff invalid operation cause bit: 1 invalid operation flag: 1
trunc.w.d of -inf(0xfff0000000000000): 0x7fffffff invalid operation cause bit: 1 invalid operation flag: 1
trunc.w.d of nan(0x7ff7ffffffffffff): 0x7fffffff invalid operation cause bit: 1 invalid operation flag: 1
trunc.w.d of nan(0x7fffffffffffffff): 0x7fffffff invalid operation cause bit: 1 invalid operation flag: 1
trunc.w.d of 1.79769e+308(0x7fefffffffffffff): 0x7fffffff invalid operation cause bit: 1 invalid operation flag: 1
trunc.w.d of -1.79769e+308(0xffefffffffffffff): 0x7fffffff invalid operation cause bit: 1 invalid operation flag: 1
trunc.w.d of 42(0x4045000000000000): 0x2a invalid operation cause bit: 0 invalid operation flag: 1
Though on the ci20, we get 0x80000000 for -inf and big negative values:
trunc.w.d of 0(0): 0 invalid operation cause bit: 0 invalid operation flag: 0
trunc.w.d of 42(0x4045000000000000): 0x2a invalid operation cause bit: 0 invalid operation flag: 0
trunc.w.d of -1234(0xc093480000000000): 0xfffffb2e invalid operation cause bit: 0 invalid operation flag: 0
trunc.w.d of inf(0x7ff0000000000000): 0x7fffffff invalid operation cause bit: 1 invalid operation flag: 1
trunc.w.d of -inf(0xfff0000000000000): 0x80000000 invalid operation cause bit: 1 invalid operation flag: 1
trunc.w.d of nan(0x7ff7ffffffffffff): 0x7fffffff invalid operation cause bit: 1 invalid operation flag: 1
trunc.w.d of nan(0x7fffffffffffffff): 0x7fffffff invalid operation cause bit: 1 invalid operation flag: 1
trunc.w.d of 1.79769e+308(0x7fefffffffffffff): 0x7fffffff invalid operation cause bit: 1 invalid operation flag: 1
trunc.w.d of -1.79769e+308(0xffefffffffffffff): 0x80000000 invalid operation cause bit: 1 invalid operation flag: 1
trunc.w.d of 42(0x4045000000000000): 0x2a invalid operation cause bit: 0 invalid operation flag: 1
--
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20171108/c358645e/attachment.html>
More information about the webkit-unassigned
mailing list