Bug 123799 - REGRESSION(r158315): register mixup in JIT::compileOpCall
Summary: REGRESSION(r158315): register mixup in JIT::compileOpCall
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: JavaScriptCore (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-11-05 04:49 PST by Julien Brianceau
Modified: 2013-11-05 09:09 PST (History)
6 users (show)

See Also:


Attachments
Use regT3 instead of GPRInfo::regT3 in JIT::compileOpCall (1.64 KB, patch)
2013-11-05 04:54 PST, Julien Brianceau
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Julien Brianceau 2013-11-05 04:49:41 PST
Changeset 158315 (http://trac.webkit.org/changeset/158315) is crashing architectures where JSInterfaceJIT::regT3 is different from GPRInfo::regT3, like in mips.
Comment 1 Julien Brianceau 2013-11-05 04:54:33 PST
Created attachment 216026 [details]
Use regT3 instead of GPRInfo::regT3 in JIT::compileOpCall
Comment 2 Mark Lam 2013-11-05 07:16:41 PST
Comment on attachment 216026 [details]
Use regT3 instead of GPRInfo::regT3 in JIT::compileOpCall

r=me
Comment 3 WebKit Commit Bot 2013-11-05 07:32:07 PST
Comment on attachment 216026 [details]
Use regT3 instead of GPRInfo::regT3 in JIT::compileOpCall

Clearing flags on attachment: 216026

Committed r158672: <http://trac.webkit.org/changeset/158672>
Comment 4 WebKit Commit Bot 2013-11-05 07:32:10 PST
All reviewed patches have been landed.  Closing bug.
Comment 5 Filip Pizlo 2013-11-05 08:23:11 PST
Why does MIPS use a different definition of regT3?

Why not fix that problem?
Comment 6 Mark Lam 2013-11-05 08:25:56 PST
(In reply to comment #5)
> Why does MIPS use a different definition of regT3?
> 
> Why not fix that problem?

I agree that we should make the register assignments consistent.  However, MIPS isn't the only CPU port that has this issue.  For now, I r+ the change to resolve the immediate action.  Longer term, we should look into unifying the register assignments in GPRInfo.h and JSInterfaceJIT.h.
Comment 7 Filip Pizlo 2013-11-05 08:27:25 PST
(In reply to comment #6)
> (In reply to comment #5)
> > Why does MIPS use a different definition of regT3?
> > 
> > Why not fix that problem?
> 
> I agree that we should make the register assignments consistent.  However, MIPS isn't the only CPU port that has this issue.  For now, I r+ the change to resolve the immediate action.  Longer term, we should look into unifying the register assignments in GPRInfo.h and JSInterfaceJIT.h.

Which others have this problem?
Comment 8 Julien Brianceau 2013-11-05 08:27:47 PST
(In reply to comment #5)
> Why does MIPS use a different definition of regT3?
Good question, I don't know why MIPS backend has been designed like this.
 
> Why not fix that problem?
I can try if you think it's worth to do so.
Comment 9 Mark Lam 2013-11-05 08:36:44 PST
(In reply to comment #7)
> Which others have this problem?

Apart from MIPS, at a glance ...

For this exact problem:

CPU(ARM64):  regT3:  x23    vs    x3

For other discrepancies between GPRInfo.h and JSInterfaceJIT.h:

CPU(X86_86): regT4:   r10     vs    edi
CPU(ARM):      regT4:   r7      vs    r8
CPU(ARM64):  regT4:   x24    vs    x4
Comment 10 Filip Pizlo 2013-11-05 08:59:15 PST
(In reply to comment #9)
> (In reply to comment #7)
> > Which others have this problem?
> 
> Apart from MIPS, at a glance ...
> 
> For this exact problem:
> 
> CPU(ARM64):  regT3:  x23    vs    x3
> 
> For other discrepancies between GPRInfo.h and JSInterfaceJIT.h:
> 
> CPU(X86_86): regT4:   r10     vs    edi
> CPU(ARM):      regT4:   r7      vs    r8
> CPU(ARM64):  regT4:   x24    vs    x4

We should fix that by getting rid of the regT* definitions in JSInterfaceJIT.h

If some backend can't handle it then that's a separate problem.
Comment 11 Mark Lam 2013-11-05 09:05:15 PST
(In reply to comment #10)
> We should fix that by getting rid of the regT* definitions in JSInterfaceJIT.h

I'll work on it in https://bugs.webkit.org/show_bug.cgi?id=123806.
Comment 12 Julien Brianceau 2013-11-05 09:09:26 PST
As discussed with Mark on IRC, I'll submit a patch soon to fix MIPS backend in https://bugs.webkit.org/show_bug.cgi?id=123807