Changeset 259554 in webkit


Ignore:
Timestamp:
Apr 5, 2020 11:23:25 AM (4 years ago)
Author:
keith_miller@apple.com
Message:

ensureStillAliveHere can take the value in any location
https://bugs.webkit.org/show_bug.cgi?id=210028

Reviewed by Mark Lam.

It shouldn't matter if the value is on the stack or in a register
because we're not going to do anything with it. Also, there's no
reason to clobber memory.

  • runtime/EnsureStillAliveHere.h:

(JSC::ensureStillAliveHere):

Location:
trunk/Source/JavaScriptCore
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/JavaScriptCore/ChangeLog

    r259553 r259554  
     12020-04-05  Keith Miller  <keith_miller@apple.com>
     2
     3        ensureStillAliveHere can take the value in any location
     4        https://bugs.webkit.org/show_bug.cgi?id=210028
     5
     6        Reviewed by Mark Lam.
     7
     8        It shouldn't matter if the value is on the stack or in a register
     9        because we're not going to do anything with it. Also, there's no
     10        reason to clobber memory.
     11
     12        * runtime/EnsureStillAliveHere.h:
     13        (JSC::ensureStillAliveHere):
     14
    1152020-04-05  Zan Dobersek  <zdobersek@igalia.com>
    216
  • trunk/Source/JavaScriptCore/runtime/EnsureStillAliveHere.h

    r259547 r259554  
    3232ALWAYS_INLINE void ensureStillAliveHere(uint64_t value)
    3333{
    34     asm volatile ("" : : "r"(value) : "memory");
     34    asm volatile ("" : : "g"(value) : );
    3535}
    3636
    3737ALWAYS_INLINE void ensureStillAliveHere(const void* pointer)
    3838{
    39     asm volatile ("" : : "r"(pointer) : "memory");
     39    asm volatile ("" : : "g"(pointer) : );
    4040}
    4141
  • trunk/Source/JavaScriptCore/runtime/JSCJSValue.h

    r259021 r259554  
    643643{
    644644#if USE(JSVALUE64)
    645     asm volatile ("" : : "r"(bitwise_cast<uint64_t>(value)) : "memory");
     645    asm volatile ("" : : "g"(bitwise_cast<uint64_t>(value)) : );
    646646#else
    647     asm volatile ("" : : "r"(value.payload()) : "memory");
     647    asm volatile ("" : : "g"(value.payload()) : );
    648648#endif
    649649}
Note: See TracChangeset for help on using the changeset viewer.