Bug 152884

Summary: [mips] Max value of immediate arg of logical ops is 0xffff
Product: WebKit Reporter: Konstantin Tokarev <annulen>
Component: JavaScriptCoreAssignee: Nobody <webkit-unassigned>
Status: RESOLVED FIXED    
Severity: Normal CC: commit-queue, jbriance, keith_miller, mark.lam, msaboff, saam
Priority: P2    
Version: WebKit Local Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch
none
Patch none

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.