Bug 142725

Summary: [ARM] Enable generating idiv instructions if it is supported
Product: WebKit Reporter: Csaba Osztrogonác <ossy>
Component: JavaScriptCoreAssignee: Csaba Osztrogonác <ossy>
Status: RESOLVED FIXED    
Severity: Normal CC: benjamin, cmarcelo, commit-queue, zherczeg
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Bug Depends on:    
Bug Blocks: 108645    
Attachments:
Description Flags
Patch none

Description Csaba Osztrogonác 2015-03-16 07:14:38 PDT
Integer division instructions (sdiv/usdiv) is supported from Cortex-A15,
we should use these instructions on Linux too, not for only Apple ARMv7S.
Comment 1 Csaba Osztrogonác 2015-03-16 07:23:50 PDT
Created attachment 248727 [details]
Patch

The ARM traditional implementation is based on ARM ® Architecture Reference Manual - DDI0406C_C_arm_architecture_reference_manual.pdf: A8.8.165 and A8.8.248.
Comment 2 WebKit Commit Bot 2015-03-16 07:27:02 PDT
Attachment 248727 [details] did not pass style-queue:


ERROR: Source/JavaScriptCore/assembler/ARMAssembler.h:220:  enum members should use InterCaps with an initial capital letter.  [readability/enum_casing] [4]
ERROR: Source/JavaScriptCore/assembler/ARMAssembler.h:221:  enum members should use InterCaps with an initial capital letter.  [readability/enum_casing] [4]
Total errors found: 2 in 8 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 3 Csaba Osztrogonác 2015-03-16 07:27:57 PDT
(In reply to comment #1)
> Created attachment 248727 [details]
> Patch

note: all jsc stress tests pass, these instructions are covered by SunSpider.

Performance results:
- ARM traditional: 3.9% on SunSpider
- ARM Thumb2: 4.1% on SunSpider
(no change on V8 test suite)

detailed results on ARM:

TEST                   COMPARISON               FROM                 TO             DETAILS

===============================================================================

** TOTAL **:           1.039x as fast    1838.1ms +/- 0.1%    1769.4ms +/- 0.1%      significant

===============================================================================

  3d:                  1.010x as fast     414.7ms +/- 0.1%     410.7ms +/- 0.1%      significant
    cube:              ??                 123.3ms +/- 0.3%     123.6ms +/- 0.3%      not conclusive: might be *1.002x as slow*
    morph:             -                  182.0ms +/- 0.0%     182.1ms +/- 0.1%
    raytrace:          1.042x as fast     109.4ms +/- 0.3%     105.0ms +/- 0.5%      significant

  access:              ??                 164.9ms +/- 0.1%     165.1ms +/- 0.1%      not conclusive: might be *1.001x as slow*
    binary-trees:      ??                  19.0ms +/- 0.0%      19.1ms +/- 1.2%      not conclusive: might be *1.005x as slow*
    fannkuch:          ??                  56.9ms +/- 0.4%      57.0ms +/- 0.0%      not conclusive: might be *1.002x as slow*
    nbody:             -                   70.0ms +/- 0.0%      70.0ms +/- 0.0%
    nsieve:            -                   19.0ms +/- 0.0%      19.0ms +/- 0.0%

  bitops:              ??                  82.5ms +/- 0.5%      82.9ms +/- 0.8%      not conclusive: might be *1.005x as slow*
    3bit-bits-in-byte: -                    7.0ms +/- 0.0%       7.0ms +/- 0.0%
    bits-in-byte:      -                   25.0ms +/- 0.0%      25.0ms +/- 0.0%
    bitwise-and:       -                   16.0ms +/- 0.0%      16.0ms +/- 0.0%
    nsieve-bits:       ??                  34.5ms +/- 1.1%      34.9ms +/- 1.8%      not conclusive: might be *1.012x as slow*

  controlflow:         -                   18.0ms +/- 0.0%      18.0ms +/- 0.0%
    recursive:         -                   18.0ms +/- 0.0%      18.0ms +/- 0.0%

  crypto:              1.055x as fast     154.3ms +/- 0.2%     146.3ms +/- 0.3%      significant
    aes:               1.036x as fast      69.1ms +/- 0.3%      66.7ms +/- 0.5%      significant
    md5:               1.077x as fast      50.2ms +/- 0.6%      46.6ms +/- 0.8%      significant
    sha1:              1.061x as fast      35.0ms +/- 0.0%      33.0ms +/- 0.0%      significant

  date:                1.080x as fast     209.6ms +/- 0.4%     194.1ms +/- 0.8%      significant
    format-tofte:      ??                 106.0ms +/- 0.4%     106.3ms +/- 0.3%      not conclusive: might be *1.003x as slow*
    format-xparb:      1.180x as fast     103.6ms +/- 0.9%      87.8ms +/- 1.6%      significant

  math:                1.020x as fast     172.9ms +/- 0.1%     169.5ms +/- 0.2%      significant
    cordic:            -                   25.8ms +/- 1.2%      25.5ms +/- 1.5%
    partial-sums:      -                  131.1ms +/- 0.2%     131.0ms +/- 0.0%
    spectral-norm:     1.23x as fast       16.0ms +/- 0.0%      13.0ms +/- 0.0%      significant

  regexp:              -                   65.8ms +/- 0.5%      65.7ms +/- 0.5%
    dna:               -                   65.8ms +/- 0.5%      65.7ms +/- 0.5%

  string:              1.074x as fast     555.4ms +/- 0.3%     517.1ms +/- 0.3%      significant
    base64:            1.018x as fast      34.7ms +/- 1.0%      34.1ms +/- 0.7%      significant
    fasta:             1.26x as fast       78.7ms +/- 0.4%      62.6ms +/- 1.2%      significant
    tagcloud:          1.036x as fast     113.7ms +/- 2.0%     109.7ms +/- 0.9%      significant
    unpack-code:       1.020x as fast     260.9ms +/- 0.6%     255.7ms +/- 0.8%      significant
    validate-input:    1.23x as fast       67.4ms +/- 1.0%      55.0ms +/- 1.1%      significant


detailed results on Thumb2:

TEST                   COMPARISON               FROM                 TO             DETAILS

===============================================================================

** TOTAL **:           1.041x as fast    1733.0ms +/- 0.2%    1664.8ms +/- 0.2%      significant

===============================================================================

  3d:                  1.011x as fast     399.4ms +/- 0.2%     395.1ms +/- 0.2%      significant
    cube:              -                  120.6ms +/- 0.4%     120.6ms +/- 0.4%
    morph:             ??                 181.1ms +/- 0.1%     181.5ms +/- 0.2%      not conclusive: might be *1.002x as slow*
    raytrace:          1.051x as fast      97.7ms +/- 0.4%      93.0ms +/- 0.4%      significant

  access:              -                  131.9ms +/- 0.3%     132.0ms +/- 0.4%
    binary-trees:      ??                  18.6ms +/- 2.0%      18.8ms +/- 1.6%      not conclusive: might be *1.011x as slow*
    fannkuch:          -                   57.3ms +/- 0.6%      57.2ms +/- 0.5%
    nbody:             -                   38.0ms +/- 0.0%      38.0ms +/- 0.0%
    nsieve:            -                   18.0ms +/- 0.0%      18.0ms +/- 0.0%

  bitops:              ??                  80.3ms +/- 0.6%      80.6ms +/- 0.5%      not conclusive: might be *1.004x as slow*
    3bit-bits-in-byte: -                    6.0ms +/- 0.0%       6.0ms +/- 0.0%
    bits-in-byte:      -                   25.0ms +/- 0.0%      25.0ms +/- 0.0%
    bitwise-and:       -                   16.8ms +/- 1.8%      16.8ms +/- 1.8%
    nsieve-bits:       ??                  32.5ms +/- 1.2%      32.8ms +/- 0.9%      not conclusive: might be *1.009x as slow*

  controlflow:         -                   18.0ms +/- 0.0%      18.0ms +/- 0.0%
    recursive:         -                   18.0ms +/- 0.0%      18.0ms +/- 0.0%

  crypto:              1.057x as fast     151.2ms +/- 0.4%     143.0ms +/- 0.3%      significant
    aes:               1.041x as fast      68.8ms +/- 0.4%      66.1ms +/- 0.3%      significant
    md5:               1.076x as fast      48.4ms +/- 0.8%      45.0ms +/- 0.7%      significant
    sha1:              1.066x as fast      34.0ms +/- 0.0%      31.9ms +/- 0.7%      significant

  date:                1.082x as fast     202.8ms +/- 0.3%     187.4ms +/- 0.7%      significant
    format-tofte:      ??                 103.1ms +/- 0.2%     103.6ms +/- 0.7%      not conclusive: might be *1.005x as slow*
    format-xparb:      1.190x as fast      99.7ms +/- 0.6%      83.8ms +/- 1.4%      significant

  math:                1.019x as fast     148.8ms +/- 0.2%     146.0ms +/- 0.0%      significant
    cordic:            ??                  21.8ms +/- 1.4%      22.0ms +/- 0.0%      not conclusive: might be *1.009x as slow*
    partial-sums:      -                  111.0ms +/- 0.0%     111.0ms +/- 0.0%
    spectral-norm:     1.23x as fast       16.0ms +/- 0.0%      13.0ms +/- 0.0%      significant

  regexp:              ??                  61.3ms +/- 0.6%      61.6ms +/- 0.6%      not conclusive: might be *1.005x as slow*
    dna:               ??                  61.3ms +/- 0.6%      61.6ms +/- 0.6%      not conclusive: might be *1.005x as slow*

  string:              1.076x as fast     539.3ms +/- 0.4%     501.1ms +/- 0.5%      significant
    base64:            -                   33.0ms +/- 0.0%      33.0ms +/- 0.0%
    fasta:             1.31x as fast       70.0ms +/- 0.0%      53.6ms +/- 1.7%      significant
    tagcloud:          *1.028x as slow*   106.9ms +/- 0.6%     109.9ms +/- 0.8%      significant
    unpack-code:       1.042x as fast     263.7ms +/- 0.9%     253.1ms +/- 0.9%      significant
    validate-input:    1.28x as fast       65.7ms +/- 0.9%      51.5ms +/- 1.0%      significant
Comment 4 WebKit Commit Bot 2015-03-16 11:45:20 PDT
Comment on attachment 248727 [details]
Patch

Clearing flags on attachment: 248727

Committed r181570: <http://trac.webkit.org/changeset/181570>
Comment 5 WebKit Commit Bot 2015-03-16 11:45:24 PDT
All reviewed patches have been landed.  Closing bug.