Changeset 46247 in webkit for trunk/JavaScriptCore/assembler/ARMv7Assembler.h
- Timestamp:
- Jul 22, 2009, 3:17:10 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/JavaScriptCore/assembler/ARMv7Assembler.h
r46202 r46247 1540 1540 static void relinkJump(void* from, void* to) 1541 1541 { 1542 ExecutableAllocator::MakeWritable unprotect(reinterpret_cast<uint16_t*>(from) - 2, 2 * sizeof(uint16_t));1543 1544 1542 ASSERT(!(reinterpret_cast<intptr_t>(from) & 1)); 1545 1543 ASSERT(!(reinterpret_cast<intptr_t>(to) & 1)); … … 1547 1545 intptr_t relative = reinterpret_cast<intptr_t>(to) - reinterpret_cast<intptr_t>(from); 1548 1546 linkWithOffset(reinterpret_cast<uint16_t*>(from), relative); 1547 1548 ExecutableAllocator::cacheFlush(reinterpret_cast<uint16_t*>(from) - 2, 2 * sizeof(uint16_t)); 1549 1549 } 1550 1550 1551 1551 static void relinkCall(void* from, void* to) 1552 1552 { 1553 ExecutableAllocator::MakeWritable unprotect(reinterpret_cast<uint16_t*>(from) - 5, 4 * sizeof(uint16_t));1554 1555 1553 ASSERT(!(reinterpret_cast<intptr_t>(from) & 1)); 1556 1554 ASSERT(reinterpret_cast<intptr_t>(to) & 1); 1557 1555 1558 1556 setPointer(reinterpret_cast<uint16_t*>(from) - 1, to); 1557 1558 ExecutableAllocator::cacheFlush(reinterpret_cast<uint16_t*>(from) - 5, 4 * sizeof(uint16_t)); 1559 1559 } 1560 1560 1561 1561 static void repatchInt32(void* where, int32_t value) 1562 1562 { 1563 ExecutableAllocator::MakeWritable unprotect(reinterpret_cast<uint16_t*>(where) - 4, 4 * sizeof(uint16_t));1564 1565 1563 ASSERT(!(reinterpret_cast<intptr_t>(where) & 1)); 1566 1564 1567 1565 setInt32(where, value); 1566 1567 ExecutableAllocator::cacheFlush(reinterpret_cast<uint16_t*>(where) - 4, 4 * sizeof(uint16_t)); 1568 1568 } 1569 1569 1570 1570 static void repatchPointer(void* where, void* value) 1571 1571 { 1572 ExecutableAllocator::MakeWritable unprotect(reinterpret_cast<uint16_t*>(where) - 4, 4 * sizeof(uint16_t));1573 1574 1572 ASSERT(!(reinterpret_cast<intptr_t>(where) & 1)); 1575 1573 1576 1574 setPointer(where, value); 1575 1576 ExecutableAllocator::cacheFlush(reinterpret_cast<uint16_t*>(where) - 4, 4 * sizeof(uint16_t)); 1577 1577 } 1578 1578 … … 1584 1584 ASSERT((*loadOp & 0xfff0) == OP_LDR_reg_T2); 1585 1585 1586 ExecutableAllocator::MakeWritable unprotect(loadOp, sizeof(uint16_t));1587 1586 *loadOp = OP_ADD_reg_T3 | (*loadOp & 0xf); 1587 ExecutableAllocator::cacheFlush(loadOp, sizeof(uint16_t)); 1588 1588 } 1589 1589 … … 1616 1616 uint16_t* location = reinterpret_cast<uint16_t*>(code); 1617 1617 1618 ExecutableAllocator::MakeWritable unprotect(location - 4, 4 * sizeof(uint16_t));1619 1620 1618 uint16_t lo16 = value; 1621 1619 uint16_t hi16 = value >> 16; … … 1625 1623 spliceHi5(location - 2, hi16); 1626 1624 spliceLo11(location - 1, hi16); 1625 1626 ExecutableAllocator::cacheFlush(location - 4, 4 * sizeof(uint16_t)); 1627 1627 } 1628 1628
Note:
See TracChangeset
for help on using the changeset viewer.