Changeset 173205 in webkit


Ignore:
Timestamp:
Sep 3, 2014 7:15:09 AM (10 years ago)
Author:
commit-queue@webkit.org
Message:

Don't generate superfluous mov instructions for move immediate on ARM64.
https://bugs.webkit.org/show_bug.cgi?id=136435

Patch by Akos Kiss <akiss@inf.u-szeged.hu> on 2014-09-03
Reviewed by Michael Saboff.

On ARM64, the size of an immediate operand for a mov instruction is 16
bits. Thus, a move immediate offlineasm instruction may potentially be
split up to several machine level instructions. The current
implementation always emits a mov for the least significant 16 bits of
the value. However, if any of the bits 63:16 are significant then the
first emitted mov already filled bits 15:0 with zeroes (or ones, for
negative values). So, if bits 15:0 of the value are all zeroes (or ones)
then the last mov does not need to be emitted.

  • offlineasm/arm64.rb:
Location:
trunk/Source/JavaScriptCore
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/JavaScriptCore/ChangeLog

    r173199 r173205  
     12014-09-03  Akos Kiss  <akiss@inf.u-szeged.hu>
     2
     3        Don't generate superfluous mov instructions for move immediate on ARM64.
     4        https://bugs.webkit.org/show_bug.cgi?id=136435
     5
     6        Reviewed by Michael Saboff.
     7
     8        On ARM64, the size of an immediate operand for a mov instruction is 16
     9        bits. Thus, a move immediate offlineasm instruction may potentially be
     10        split up to several machine level instructions. The current
     11        implementation always emits a mov for the least significant 16 bits of
     12        the value. However, if any of the bits 63:16 are significant then the
     13        first emitted mov already filled bits 15:0 with zeroes (or ones, for
     14        negative values). So, if bits 15:0 of the value are all zeroes (or ones)
     15        then the last mov does not need to be emitted.
     16
     17        * offlineasm/arm64.rb:
     18
    1192014-09-02  Brian J. Burg  <burg@cs.washington.edu>
    220
  • trunk/Source/JavaScriptCore/offlineasm/arm64.rb

    r172429 r173205  
    370370        | shift |
    371371        currentValue = (value >> shift) & 0xffff
    372         next if currentValue == (isNegative ? 0xffff : 0) and shift != 0
     372        next if currentValue == (isNegative ? 0xffff : 0) and (shift != 0 or !first)
    373373        if first
    374374            if isNegative
Note: See TracChangeset for help on using the changeset viewer.