Bug 155104 - [JSC] Improve and64() and or64() with immediate on x86
Summary: [JSC] Improve and64() and or64() with immediate on x86
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Benjamin Poulain
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-03-07 00:28 PST by Benjamin Poulain
Modified: 2016-03-11 14:03 PST (History)
5 users (show)

See Also:


Attachments
Patch (2.54 KB, patch)
2016-03-07 00:31 PST, Benjamin Poulain
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Benjamin Poulain 2016-03-07 00:28:40 PST
[JSC] Improve and64() and or64() with immediate on x86
Comment 1 Benjamin Poulain 2016-03-07 00:31:41 PST
Created attachment 273165 [details]
Patch
Comment 2 Geoffrey Garen 2016-03-07 09:33:46 PST
Comment on attachment 273165 [details]
Patch

r=me
Comment 3 WebKit Commit Bot 2016-03-07 10:57:06 PST
Comment on attachment 273165 [details]
Patch

Clearing flags on attachment: 273165

Committed r197695: <http://trac.webkit.org/changeset/197695>
Comment 4 WebKit Commit Bot 2016-03-07 10:57:09 PST
All reviewed patches have been landed.  Closing bug.
Comment 5 Darin Adler 2016-03-11 09:37:05 PST
Comment on attachment 273165 [details]
Patch

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

> Source/JavaScriptCore/assembler/MacroAssemblerX86_64.h:350
> +        if (intValue <= std::numeric_limits<int32_t>::max()
> +            && intValue >= std::numeric_limits<int32_t>::min()) {

Isn’t it more obvious to write it like this?

    if (intValue == static_cast<int32_t>(intValue))
Comment 6 Benjamin Poulain 2016-03-11 14:03:17 PST
(In reply to comment #5)
> Comment on attachment 273165 [details]
> Patch
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=273165&action=review
> 
> > Source/JavaScriptCore/assembler/MacroAssemblerX86_64.h:350
> > +        if (intValue <= std::numeric_limits<int32_t>::max()
> > +            && intValue >= std::numeric_limits<int32_t>::min()) {
> 
> Isn’t it more obvious to write it like this?
> 
>     if (intValue == static_cast<int32_t>(intValue))

That's how I originally wrote it but I thought the more verbose version was making the intent more obvious.