Bug 163770 - Wasm should support floating point operations.
Summary: Wasm should support floating point operations.
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: JavaScriptCore (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Keith Miller
URL:
Keywords:
Depends on:
Blocks: 161728
  Show dependency treegraph
 
Reported: 2016-10-20 18:07 PDT by Keith Miller
Modified: 2016-10-24 14:47 PDT (History)
5 users (show)

See Also:


Attachments
Patch (30.10 KB, patch)
2016-10-24 10:57 PDT, Keith Miller
no flags Details | Formatted Diff | Diff
Patch for landing (30.52 KB, patch)
2016-10-24 12:12 PDT, Keith Miller
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Keith Miller 2016-10-20 18:07:20 PDT
When we do this we will need a way to get access a 32-bit FPR argument register.
Comment 1 Keith Miller 2016-10-24 10:57:12 PDT
Created attachment 292629 [details]
Patch
Comment 2 Keith Miller 2016-10-24 11:01:54 PDT
Comment on attachment 292629 [details]
Patch

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

> Source/JavaScriptCore/ChangeLog:7
> +

This should also say: This patch also fixes a bug in the call opcode where the arguments would be reversed.
Comment 3 Mark Lam 2016-10-24 11:10:39 PDT
Comment on attachment 292629 [details]
Patch

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

> Source/JavaScriptCore/wasm/WasmCallingConvention.h:137
> -        if (returnType == B3::Void)
> -            return nullptr;
> -
> -        patchpoint->resultConstraint = B3::ValueRep::reg(GPRInfo::returnValueGPR);
> +        switch (returnType) {
> +        case B3::Void:
> +            break;

This is a difference in behavior not related to floating point.  Previously, you return a nullptr for a Void returnType.  Now, you return a non-null patchpoint pointer.  Is this intentional?
Comment 4 Michael Saboff 2016-10-24 11:10:59 PDT
Comment on attachment 292629 [details]
Patch

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

r=me

>> Source/JavaScriptCore/ChangeLog:7
>> +
> 
> This should also say: This patch also fixes a bug in the call opcode where the arguments would be reversed.

Please add some text as to what you did to enable FP operations.
Comment 5 Yusuke Suzuki 2016-10-24 11:13:06 PDT
(In reply to comment #2)
> Comment on attachment 292629 [details]
> Patch
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=292629&action=review
> 
> > Source/JavaScriptCore/ChangeLog:7
> > +
> 
> This should also say: This patch also fixes a bug in the call opcode where
> the arguments would be reversed.

Oops, thanks. I was planning to comment "Is it ok changing the order of the args?" :)
Comment 6 Keith Miller 2016-10-24 12:12:20 PDT
Created attachment 292641 [details]
Patch for landing
Comment 7 WebKit Commit Bot 2016-10-24 14:47:23 PDT
Comment on attachment 292641 [details]
Patch for landing

Clearing flags on attachment: 292641

Committed r207781: <http://trac.webkit.org/changeset/207781>
Comment 8 WebKit Commit Bot 2016-10-24 14:47:27 PDT
All reviewed patches have been landed.  Closing bug.