Changeset 145551 in webkit


Ignore:
Timestamp:
Mar 12, 2013 8:28:10 AM (11 years ago)
Author:
rgabor@webkit.org
Message:

https://bugs.webkit.org/show_bug.cgi?id=112141
LLInt CLoop backend misses Double2Ints() on 32bit architectures

Reviewed by Filip Pizlo.

Implement Double2Ints() in CLoop backend of LLInt on 32bit architectures.

  • llint/LowLevelInterpreter.cpp:

(LLInt):
(JSC::LLInt::Double2Ints):

  • offlineasm/cloop.rb:
Location:
trunk/Source/JavaScriptCore
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/JavaScriptCore/ChangeLog

    r145505 r145551  
     12013-03-12  Gabor Rapcsanyi  <rgabor@webkit.org>
     2
     3        https://bugs.webkit.org/show_bug.cgi?id=112141
     4        LLInt CLoop backend misses Double2Ints() on 32bit architectures
     5
     6        Reviewed by Filip Pizlo.
     7
     8        Implement Double2Ints() in CLoop backend of LLInt on 32bit architectures.
     9
     10        * llint/LowLevelInterpreter.cpp:
     11        (LLInt):
     12        (JSC::LLInt::Double2Ints):
     13        * offlineasm/cloop.rb:
     14
    1152013-03-12  Gabor Rapcsanyi  <rgabor@webkit.org>
    216
  • trunk/Source/JavaScriptCore/llint/LowLevelInterpreter.cpp

    r142489 r145551  
    118118    return u.dval;
    119119}
     120
     121static void Double2Ints(double val, uint32_t& lo, uint32_t& hi)
     122{
     123    union {
     124        double dval;
     125        uint64_t ival64;
     126    } u;
     127    u.dval = val;
     128    hi = static_cast<uint32_t>(u.ival64 >> 32);
     129    lo = static_cast<uint32_t>(u.ival64);
     130}
    120131#endif // USE(JSVALUE32_64)
    121132
  • trunk/Source/JavaScriptCore/offlineasm/cloop.rb

    r143232 r145551  
    10261026        # Encode a 64-bit double into 2 32-bit ints (low and high).
    10271027        when "fd2ii"
    1028             $asm.putc "Double2Ints(#{operands[0].clValue(:double)}, #{operands[1].clValue}, #{operands[2].clValue});"
     1028            $asm.putc "Double2Ints(#{operands[0].clValue(:double)}, #{operands[1].clValue(:uint32)}, #{operands[2].clValue(:uint32)});"
    10291029
    10301030        # 64-bit instruction: fq2d int64Op dblOp (based on X64)
Note: See TracChangeset for help on using the changeset viewer.