Changeset 86999 in webkit
- Timestamp:
- May 20, 2011 4:20:48 PM (13 years ago)
- Location:
- trunk/Source/JavaScriptCore
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/JavaScriptCore/ChangeLog
r86974 r86999 1 2011-05-20 Oliver Hunt <oliver@apple.com> 2 3 Reviewed by Gavin Barraclough. 4 5 Reduce size of inline cache path of get_by_id on ARMv7 6 https://bugs.webkit.org/show_bug.cgi?id=61221 7 8 This reduces the code size of get_by_id by 20 bytes 9 10 * assembler/ARMv7Assembler.h: 11 (JSC::ARMv7Assembler::ldrCompact): 12 (JSC::ARMv7Assembler::repatchCompact): 13 (JSC::ARMv7Assembler::setUInt7ForLoad): 14 * assembler/MacroAssemblerARMv7.h: 15 (JSC::MacroAssemblerARMv7::load32WithCompactAddressOffsetPatch): 16 * jit/JIT.h: 17 1 18 2011-05-20 Zoltan Herczeg <zherczeg@inf.u-szeged.hu> 2 19 -
trunk/Source/JavaScriptCore/assembler/ARMv7Assembler.h
r86919 r86999 954 954 } 955 955 956 void ldrCompact(RegisterID rt, RegisterID rn, ARMThumbImmediate imm) 957 { 958 ASSERT(rn != ARMRegisters::pc); // LDR (literal) 959 ASSERT(imm.isUInt7()); 960 ASSERT(!((rt | rn) & 8)); 961 m_formatter.oneWordOp5Imm5Reg3Reg3(OP_LDR_imm_T1, imm.getUInt7() >> 2, rn, rt); 962 } 963 956 964 // If index is set, this is a regular offset or a pre-indexed load; 957 965 // if index is not set then is is a post-index load. … … 1757 1765 static void repatchCompact(void* where, int32_t value) 1758 1766 { 1759 repatchInt32(where, value); 1767 ASSERT(value >= 0); 1768 ASSERT(ARMThumbImmediate::makeUInt12(value).isUInt7()); 1769 setUInt7ForLoad(where, ARMThumbImmediate::makeUInt12(value)); 1760 1770 } 1761 1771 … … 1846 1856 1847 1857 ExecutableAllocator::cacheFlush(location - 4, 4 * sizeof(uint16_t)); 1858 } 1859 1860 static void setUInt7ForLoad(void* code, ARMThumbImmediate imm) 1861 { 1862 // Requires us to have planted a LDR_imm_T1 1863 ASSERT(imm.isValid()); 1864 ASSERT(imm.isUInt7()); 1865 uint16_t* location = reinterpret_cast<uint16_t*>(code); 1866 location[0] |= (imm.getUInt7() >> 2) << 6; 1867 ExecutableAllocator::cacheFlush(location, sizeof(uint16_t)); 1848 1868 } 1849 1869 -
trunk/Source/JavaScriptCore/assembler/MacroAssemblerARMv7.h
r86919 r86999 49 49 typedef ARMv7Assembler::JumpType JumpType; 50 50 typedef ARMv7Assembler::JumpLinkType JumpLinkType; 51 static const int MaximumCompactPtrAlignedAddressOffset = 0x7FFFFFFF; 51 // Magic number is the biggest useful offset we can get on ARMv7 with 52 // a LDR_imm_T2 encoding 53 static const int MaximumCompactPtrAlignedAddressOffset = 124; 52 54 53 55 MacroAssemblerARMv7() … … 486 488 DataLabelCompact load32WithCompactAddressOffsetPatch(Address address, RegisterID dest) 487 489 { 488 DataLabel32 label = load32WithAddressOffsetPatch(address, dest); 489 return DataLabelCompact(label.label()); 490 DataLabelCompact label(this); 491 ASSERT(address.offset >= 0); 492 ASSERT(address.offset <= MaximumCompactPtrAlignedAddressOffset); 493 ASSERT(ARMThumbImmediate::makeUInt12(address.offset).isUInt7()); 494 m_assembler.ldrCompact(dest, address.base, ARMThumbImmediate::makeUInt12(address.offset)); 495 return label; 490 496 } 491 497 -
trunk/Source/JavaScriptCore/jit/JIT.h
r86919 r86999 409 409 static const int patchOffsetGetByIdStructure = 10; 410 410 static const int patchOffsetGetByIdBranchToSlowCase = 26; 411 static const int patchOffsetGetByIdPropertyMapOffset1 = 36;412 static const int patchOffsetGetByIdPropertyMapOffset2 = 48;413 static const int patchOffsetGetByIdPutResult = 52;411 static const int patchOffsetGetByIdPropertyMapOffset1 = 28; 412 static const int patchOffsetGetByIdPropertyMapOffset2 = 30; 413 static const int patchOffsetGetByIdPutResult = 32; 414 414 #if ENABLE(OPCODE_SAMPLING) 415 415 #error "OPCODE_SAMPLING is not yet supported"
Note: See TracChangeset
for help on using the changeset viewer.