Bug 155429 - [mips] Implemented moveZeroToDouble.
Summary: [mips] Implemented moveZeroToDouble.
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: JavaScriptCore (show other bugs)
Version: WebKit Local Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-03-14 03:37 PDT by Konstantin Tokarev
Modified: 2016-04-16 10:59 PDT (History)
7 users (show)

See Also:


Attachments
Patch (1.38 KB, patch)
2016-03-14 03:39 PDT, Konstantin Tokarev
no flags Details | Formatted Diff | Diff
Patch (1.37 KB, patch)
2016-04-16 07:37 PDT, Konstantin Tokarev
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Konstantin Tokarev 2016-03-14 03:37:48 PDT
This function is required to fix compilation after r197687.
Comment 1 Konstantin Tokarev 2016-03-14 03:39:37 PDT
Created attachment 273953 [details]
Patch
Comment 2 Julien Brianceau 2016-03-14 04:09:59 PDT
Comment on attachment 273953 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=273953&action=review

> Source/JavaScriptCore/assembler/MacroAssemblerMIPS.h:2504
> +        m_assembler.mtc1(MIPSRegisters::zero, reg);

This will set to 0 only one FP register, which is not enough for double precision.

I think it would be easier to put something like this:

    convertInt32ToDouble(MIPSRegisters::zero, reg);


I also thought of this, but I'm not sure it's a good idea:

    subDouble(reg, reg);
Comment 3 Guillaume Emont 2016-04-13 11:31:47 PDT
Konstantin, are you still planning to work on this?
Comment 4 Konstantin Tokarev 2016-04-13 11:44:40 PDT
Yes, starting now. Sorry for being late
Comment 5 Guillaume Emont 2016-04-13 14:03:26 PDT
(In reply to comment #4)
> Yes, starting now. Sorry for being late

No worries! It was just to know if I should take over on that. Thanks for taking care of it!
Comment 6 Konstantin Tokarev 2016-04-16 07:37:40 PDT
Created attachment 276554 [details]
Patch
Comment 7 Konstantin Tokarev 2016-04-16 07:39:04 PDT
I've checked subDouble(reg, reg) and found that it fails to zero reg with INFINITY or NAN. So the only remaining option is convertInt32ToDouble(MIPSRegisters::zero, reg).
Comment 8 WebKit Commit Bot 2016-04-16 10:59:42 PDT
Comment on attachment 276554 [details]
Patch

Clearing flags on attachment: 276554

Committed r199626: <http://trac.webkit.org/changeset/199626>
Comment 9 WebKit Commit Bot 2016-04-16 10:59:45 PDT
All reviewed patches have been landed.  Closing bug.