Bug 100589 - ASSERT problem on MIPS
Summary: ASSERT problem on MIPS
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: JavaScriptCore (show other bugs)
Version: 528+ (Nightly build)
Hardware: Other Linux
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-10-27 05:06 PDT by Balazs Kilvady
Modified: 2012-11-08 14:21 PST (History)
5 users (show)

See Also:


Attachments
ASSERT fix. (1.29 KB, patch)
2012-10-27 05:22 PDT, Balazs Kilvady
no flags Details | Formatted Diff | Diff
ASSERT fix. (1.28 KB, patch)
2012-11-08 12:32 PST, Balazs Kilvady
oliver: review-
oliver: commit-queue-
Details | Formatted Diff | Diff
ASSERT fix. (1.24 KB, patch)
2012-11-08 12:48 PST, Balazs Kilvady
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Balazs Kilvady 2012-10-27 05:06:44 PDT
There is an
ASSERT(!value);
line at Source/JavaScriptCore/jit/JITOpcodes.cpp:1627 which works on most of the platforms but fails on MIPS as value == regT0 and regT0 is not the first register (int(regT0) != 0) on MIPS.
Comment 1 Balazs Kilvady 2012-10-27 05:22:39 PDT
Created attachment 171088 [details]
ASSERT fix.

As value variable is const (const RegisterID value = regT0;) after quick look I would remove the ASSERT line but anyway I created a patch to make it work on MIPS in debug mode. Feel free to throw it out :)
Comment 2 Balazs Kilvady 2012-11-08 12:32:01 PST
Created attachment 173095 [details]
ASSERT fix.
Comment 3 Oliver Hunt 2012-11-08 12:35:46 PST
Comment on attachment 173095 [details]
ASSERT fix.

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

> Source/JavaScriptCore/jit/JITOpcodes.cpp:1631
>              ASSERT(!value);

Can't this just be ASSERT(value == regT0) ?
Comment 4 Balazs Kilvady 2012-11-08 12:48:14 PST
Created attachment 173099 [details]
ASSERT fix.

Simple fix :)
Comment 5 Balazs Kilvady 2012-11-08 12:53:00 PST
(In reply to comment #3)
> (From update of attachment 173095 [details])
> View in context: https://bugs.webkit.org/attachment.cgi?id=173095&action=review
> 
> > Source/JavaScriptCore/jit/JITOpcodes.cpp:1631
> >              ASSERT(!value);
> 
> Can't this just be ASSERT(value == regT0) ?
Yes, works, new patch added. Is this ASSERT useful for a const variable? Assembly code could hurt it?
Comment 6 Oliver Hunt 2012-11-08 13:32:39 PST
Comment on attachment 173099 [details]
ASSERT fix.

The assertion is intended to prevent anyone from trying to use a different register for value, as the profiling logic in the baseline jit always assumes regT0 contains the value and t1 the tag (if appropriate)
Comment 7 WebKit Review Bot 2012-11-08 14:21:01 PST
Comment on attachment 173099 [details]
ASSERT fix.

Clearing flags on attachment: 173099

Committed r133950: <http://trac.webkit.org/changeset/133950>
Comment 8 WebKit Review Bot 2012-11-08 14:21:04 PST
All reviewed patches have been landed.  Closing bug.