Bug 152884 - [mips] Max value of immediate arg of logical ops is 0xffff
Summary: [mips] Max value of immediate arg of logical ops is 0xffff
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-08 03:37 PST by Konstantin Tokarev
Modified: 2016-01-08 08:37 PST (History)
6 users (show)

See Also:


Attachments
Patch (2.38 KB, patch)
2016-01-08 03:39 PST, Konstantin Tokarev
no flags Details | Formatted Diff | Diff
Patch (2.45 KB, patch)
2016-01-08 03:50 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-08 03:37:49 PST
Replaced imm.m_value < 65535 checks with imm.m_value <= 65535
Comment 1 Konstantin Tokarev 2016-01-08 03:39:48 PST
Created attachment 268534 [details]
Patch
Comment 2 Konstantin Tokarev 2016-01-08 03:50:27 PST
Created attachment 268536 [details]
Patch
Comment 3 Julien Brianceau 2016-01-08 04:29:49 PST
LGTM
Comment 4 Michael Saboff 2016-01-08 07:48:49 PST
Comment on attachment 268536 [details]
Patch

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

r=me

> Source/JavaScriptCore/assembler/MacroAssemblerMIPS.h:292
> -        else if (imm.m_value > 0 && imm.m_value < 65535 && !m_fixedWidth)
> +        else if (imm.m_value > 0 && imm.m_value <= 65535 && !m_fixedWidth)

This is fine, but you could also write:
    else if ((imm.m_value & 0xffff) == imm.m_value) && !m_fixedWidth)
Comment 5 WebKit Commit Bot 2016-01-08 08:37:53 PST
Comment on attachment 268536 [details]
Patch

Clearing flags on attachment: 268536

Committed r194764: <http://trac.webkit.org/changeset/194764>
Comment 6 WebKit Commit Bot 2016-01-08 08:37:58 PST
All reviewed patches have been landed.  Closing bug.