Changeset 59037 in webkit for trunk/JavaScriptCore/assembler
- Timestamp:
- May 8, 2010, 12:51:23 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/JavaScriptCore/assembler/ARMv7Assembler.h
r55834 r59037 1755 1755 1756 1756 intptr_t relative = reinterpret_cast<intptr_t>(target) - (reinterpret_cast<intptr_t>(instruction)); 1757 if (((relative << 7) >> 7) == relative) { 1757 1758 // From Cortex-A8 errata: 1759 // If the 32-bit Thumb-2 branch instruction spans two 4KiB regions and 1760 // the target of the branch falls within the first region it is 1761 // possible for the processor to incorrectly determine the branch 1762 // instruction, and it is also possible in some cases for the processor 1763 // to enter a deadlock state. 1764 // The instruction is spanning two pages if it ends at an address ending 0x002 1765 bool spansTwo4K = ((reinterpret_cast<intptr_t>(instruction) & 0xfff) == 0x002); 1766 // The target is in the first page if the jump branch back by [3..0x1002] bytes 1767 bool targetInFirstPage = (relative >= -0x1002) && (relative < -2); 1768 bool wouldTriggerA8Errata = spansTwo4K && targetInFirstPage; 1769 1770 if (((relative << 7) >> 7) == relative && !wouldTriggerA8Errata) { 1758 1771 // ARM encoding for the top two bits below the sign bit is 'peculiar'. 1759 1772 if (relative >= 0)
Note:
See TracChangeset
for help on using the changeset viewer.