Changeset 89630 in webkit for trunk/Source/JavaScriptCore/assembler/SH4Assembler.h
- Timestamp:
- Jun 23, 2011, 3:47:04 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/JavaScriptCore/assembler/SH4Assembler.h
r87527 r89630 1233 1233 *reinterpret_cast<uint32_t*>(address) = newAddress; 1234 1234 } 1235 1236 static uint32_t readPCrelativeAddress(int offset, uint16_t* instructionPtr) 1237 { 1238 uint32_t address = (offset << 2) + ((reinterpret_cast<uint32_t>(instructionPtr) + 4) &(~0x3)); 1239 return *reinterpret_cast<uint32_t*>(address); 1240 } 1235 1241 1236 1242 static uint16_t* getInstructionPtr(void* code, int offset) … … 1345 1351 { 1346 1352 patchPointer(where, value); 1353 } 1354 1355 static void* readPointer(void* code) 1356 { 1357 return static_cast<void*>(readInt32(code)); 1347 1358 } 1348 1359 … … 1475 1486 } 1476 1487 1488 static uint32_t readInt32(void* code) 1489 { 1490 return readPCrelativeAddress((*(reinterpret_cast<uint16_t*>(code)) & 0xff), reinterpret_cast<uint16_t*>(code)); 1491 } 1492 1477 1493 void* executableCopy(JSGlobalData& globalData, ExecutablePool* allocator) 1478 1494 {
Note:
See TracChangeset
for help on using the changeset viewer.