Ignore:
Timestamp:
Aug 17, 2011, 7:56:13 PM (14 years ago)
Author:
[email protected]
Message:

https://bugs.webkit.org/show_bug.cgi?id=66379
implements load32WithCompactAddressOffsetPatch function
and fixes store32 and moveWithPatch functions for SH4 platforms.

Patch by Thouraya ANDOLSI <[email protected]> on 2011-08-17
Reviewed by Gavin Barraclough.

  • assembler/MacroAssemblerSH4.h:

(JSC::MacroAssemblerSH4::rshift32):
(JSC::MacroAssemblerSH4::store32):
(JSC::MacroAssemblerSH4::load32WithCompactAddressOffsetPatch):
(JSC::MacroAssemblerSH4::moveWithPatch):

  • assembler/SH4Assembler.h:

(JSC::SH4Assembler::movlMemRegCompact):
(JSC::SH4Assembler::readPointer):
(JSC::SH4Assembler::repatchCompact):

  • jit/JIT.h:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/JavaScriptCore/assembler/SH4Assembler.h

    r89630 r93277  
    3434#include <stdarg.h>
    3535#include <stdint.h>
     36#include <stdio.h>
    3637#include <wtf/Assertions.h>
    3738#include <wtf/Vector.h>
     
    10641065    }
    10651066
     1067    void movlMemRegCompact(int offset, RegisterID base, RegisterID dst)
     1068    {
     1069        oneShortOp(getOpcodeGroup4(MOVL_READ_OFFRM_OPCODE, dst, base, offset));
     1070    }
     1071
    10661072    void movbMemReg(int offset, RegisterID base, RegisterID dst)
    10671073    {
     
    12331239        *reinterpret_cast<uint32_t*>(address) = newAddress;
    12341240    }
    1235    
     1241
    12361242    static uint32_t readPCrelativeAddress(int offset, uint16_t* instructionPtr)
    12371243    {
     
    13551361    static void* readPointer(void* code)
    13561362    {
    1357         return static_cast<void*>(readInt32(code));
     1363        return reinterpret_cast<void*>(readInt32(code));
    13581364    }
    13591365
     
    13661372    static void repatchCompact(void* where, int32_t value)
    13671373    {
    1368         repatchInt32(where, value);
     1374        ASSERT(value >= 0);
     1375        ASSERT(value <= 60);
     1376        *reinterpret_cast<uint16_t*>(where) = ((*reinterpret_cast<uint16_t*>(where) & 0xfff0) | (value >> 2));
     1377        ExecutableAllocator::cacheFlush(reinterpret_cast<uint16_t*>(where), sizeof(uint16_t));
    13691378    }
    13701379
Note: See TracChangeset for help on using the changeset viewer.