Bug 133764 - make sdiv a template on armv7s to remove duplicate code in dfg
Summary: make sdiv a template on armv7s to remove duplicate code in dfg
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: JavaScriptCore (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Alex Christensen
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-06-11 14:07 PDT by Alex Christensen
Modified: 2014-06-18 11:06 PDT (History)
4 users (show)

See Also:


Attachments
Patch (5.67 KB, patch)
2014-06-11 14:08 PDT, Alex Christensen
no flags Details | Formatted Diff | Diff
Patch (7.13 KB, patch)
2014-06-13 14:02 PDT, Alex Christensen
dbates: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Alex Christensen 2014-06-11 14:07:44 PDT
While playing with the css jit I noticed that sdiv is very similar on APPLE_ARMV7S and ARM64.  Why not unite this code?
Comment 1 Alex Christensen 2014-06-11 14:08:53 PDT
Created attachment 232902 [details]
Patch
Comment 2 Alex Christensen 2014-06-13 14:02:39 PDT
Created attachment 233074 [details]
Patch
Comment 3 Daniel Bates 2014-06-18 09:27:52 PDT
Comment on attachment 233074 [details]
Patch

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

> Source/JavaScriptCore/assembler/ARMv7Assembler.h:1520
> +        COMPILE_ASSERT(datasize == 32);        

Does this compile? I mean, COMPILE_ASSERT() takes two arguments: a predicate and a error message to be shown if the predicate evaluates to false. Moreover, the blog post <https://www.webkit.org/blog/3172/webkit-and-cxx11/> implies that we should explicitly use static_assert() in new C++ code instead of the COMPILE_ASSERT() macro function (even though it calls through to static_assert()) since we require ports to build WebKit with compilers that supports the C++11 static_assert feature.
Comment 4 Alex Christensen 2014-06-18 10:36:51 PDT
(In reply to comment #3)
I'll use static_assert and double check that it compiles.
Comment 5 Alex Christensen 2014-06-18 11:06:51 PDT
http://trac.webkit.org/changeset/170107