Bug 164869 - Add support for rotate in B3 and the relevant assemblers
Summary: Add support for rotate in B3 and the relevant assemblers
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: Keith Miller
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-11-17 08:57 PST by Keith Miller
Modified: 2016-11-17 09:52 PST (History)
4 users (show)

See Also:


Attachments
Patch (34.48 KB, patch)
2016-11-17 09:07 PST, Keith Miller
ggaren: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Keith Miller 2016-11-17 08:57:42 PST
Add support for rotate in B3 and the relevant assemblers
Comment 1 Keith Miller 2016-11-17 09:07:25 PST
Created attachment 295051 [details]
Patch
Comment 2 Geoffrey Garen 2016-11-17 09:34:39 PST
Comment on attachment 295051 [details]
Patch

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

r=me

> Source/JavaScriptCore/assembler/MacroAssemblerARM64.h:670
> +    void rotateRight32(RegisterID src, TrustedImm32 imm, RegisterID dest)
> +    {
> +        m_assembler.ror<32>(dest, src, imm.m_value & 31);
> +    }

It looks like this would transform an identity rotation into a non-identity rotation. Is that desirable?
Comment 3 Mark Lam 2016-11-17 09:35:46 PST
Comment on attachment 295051 [details]
Patch

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

> Source/JavaScriptCore/ChangeLog:14
> +        ammount by the value. Additionally, this patch refactors some

/ammount/amount/
Comment 4 Keith Miller 2016-11-17 09:44:15 PST
Comment on attachment 295051 [details]
Patch

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

>> Source/JavaScriptCore/assembler/MacroAssemblerARM64.h:670
>> +    }
> 
> It looks like this would transform an identity rotation into a non-identity rotation. Is that desirable?

AFAIK, ARM doesn't specify what happens when the immediate is > 31. This matches the behavior if the immediate was put into a register.
Comment 5 Keith Miller 2016-11-17 09:44:28 PST
Comment on attachment 295051 [details]
Patch

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

>> Source/JavaScriptCore/ChangeLog:14
>> +        ammount by the value. Additionally, this patch refactors some
> 
> /ammount/amount/

fixed.
Comment 6 Keith Miller 2016-11-17 09:52:11 PST
Committed r208848: <http://trac.webkit.org/changeset/208848>