Bug 152838 - [mips] GPRInfo::toArgumentRegister missing
Summary: [mips] GPRInfo::toArgumentRegister missing
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-01-07 10:43 PST by Konstantin Tokarev
Modified: 2016-01-07 12:00 PST (History)
6 users (show)

See Also:


Attachments
Patch (1.39 KB, patch)
2016-01-07 10:46 PST, 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-01-07 10:43:27 PST
Added missing GPRInfo::toArgumentRegister implementation for MIPS
Comment 1 Konstantin Tokarev 2016-01-07 10:46:02 PST
Created attachment 268467 [details]
Patch
Comment 2 Michael Saboff 2016-01-07 10:51:49 PST
Comment on attachment 268467 [details]
Patch

We do not have plans to implement passing arguments in registers for 32 bit platforms.  Therefore this is not needed.
Comment 3 Konstantin Tokarev 2016-01-07 11:10:09 PST
GPRInfo::toArgumentRegister is used at Source/JavaScriptCore/jit/CCallHelpers.h:58 which currently breaks compilation on MIPS

BTW, MIPS32 has 32 GPRs so it would be the right thing to pass arguments via registers.
Comment 4 Michael Saboff 2016-01-07 11:17:47 PST
Comment on attachment 268467 [details]
Patch

r=me.  Forgot that this is used in other areas.
Comment 5 Michael Saboff 2016-01-07 11:21:10 PST
(In reply to comment #3)
> GPRInfo::toArgumentRegister is used at
> Source/JavaScriptCore/jit/CCallHelpers.h:58 which currently breaks
> compilation on MIPS
> 
> BTW, MIPS32 has 32 GPRs so it would be the right thing to pass arguments via
> registers.

With only 4 argument registers, it still doesn't make sense to pass arguments in registers.  Effectively this would only allow for "this" to be passed.  a0 would have the callee, a1 would have the arg count, and a2/a3 would have the tag and payload for this.  Even if we didn't pass the callee and arg count in registers, that would only give this and arg1.
Comment 6 WebKit Commit Bot 2016-01-07 12:00:25 PST
Comment on attachment 268467 [details]
Patch

Clearing flags on attachment: 268467

Committed r194709: <http://trac.webkit.org/changeset/194709>
Comment 7 WebKit Commit Bot 2016-01-07 12:00:30 PST
All reviewed patches have been landed.  Closing bug.