Changeset 44886 in webkit for trunk/JavaScriptCore
- Timestamp:
- Jun 19, 2009, 6:07:06 PM (16 years ago)
- Location:
- trunk/JavaScriptCore
- Files:
-
- 12 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/JavaScriptCore/ChangeLog
r44884 r44886 1 2009-06-19 Gabor Loki <[email protected]> 2 3 Reviewed by Gavin Barraclough. 4 5 Reorganize ARM architecture specific macros. 6 Use PLATFORM_ARM_ARCH(7) instead of PLATFORM(ARM_V7). 7 8 Bug 24986: ARM JIT port 9 <https://bugs.webkit.org/show_bug.cgi?id=24986> 10 11 * assembler/ARMv7Assembler.h: 12 * assembler/AbstractMacroAssembler.h: 13 (JSC::AbstractMacroAssembler::Imm32::Imm32): 14 * assembler/MacroAssembler.h: 15 * assembler/MacroAssemblerCodeRef.h: 16 (JSC::MacroAssemblerCodePtr::MacroAssemblerCodePtr): 17 * jit/ExecutableAllocator.h: 18 (JSC::ExecutableAllocator::cacheFlush): 19 * jit/JIT.h: 20 * jit/JITInlineMethods.h: 21 (JSC::JIT::restoreArgumentReferenceForTrampoline): 22 * jit/JITStubs.cpp: 23 * jit/JITStubs.h: 24 * wtf/Platform.h: 25 * yarr/RegexJIT.cpp: 26 (JSC::Yarr::RegexGenerator::generateEnter): 27 (JSC::Yarr::RegexGenerator::generateReturn): 28 1 29 2009-06-19 Gavin Barraclough <[email protected]> 2 30 -
trunk/JavaScriptCore/assembler/ARMv7Assembler.h
r44713 r44886 29 29 #include <wtf/Platform.h> 30 30 31 #if ENABLE(ASSEMBLER) && PLATFORM (ARM_V7)31 #if ENABLE(ASSEMBLER) && PLATFORM_ARM_ARCH(7) 32 32 33 33 #include "AssemblerBuffer.h" … … 1754 1754 } // namespace JSC 1755 1755 1756 #endif // ENABLE(ASSEMBLER) && PLATFORM (ARM_V7)1756 #endif // ENABLE(ASSEMBLER) && PLATFORM_ARM_ARCH(7) 1757 1757 1758 1758 #endif // ARMAssembler_h -
trunk/JavaScriptCore/assembler/AbstractMacroAssembler.h
r44713 r44886 176 176 explicit Imm32(int32_t value) 177 177 : m_value(value) 178 #if PLATFORM (ARM_V7)178 #if PLATFORM_ARM_ARCH(7) 179 179 , m_isPointer(false) 180 180 #endif … … 185 185 explicit Imm32(ImmPtr ptr) 186 186 : m_value(ptr.asIntptr()) 187 #if PLATFORM (ARM_V7)187 #if PLATFORM_ARM_ARCH(7) 188 188 , m_isPointer(true) 189 189 #endif … … 193 193 194 194 int32_t m_value; 195 #if PLATFORM (ARM_V7)195 #if PLATFORM_ARM_ARCH(7) 196 196 // We rely on being able to regenerate code to recover exception handling 197 197 // information. Since ARMv7 supports 16-bit immediates there is a danger -
trunk/JavaScriptCore/assembler/MacroAssembler.h
r44514 r44886 31 31 #if ENABLE(ASSEMBLER) 32 32 33 #if PLATFORM (ARM_V7)33 #if PLATFORM_ARM_ARCH(7) 34 34 #include "MacroAssemblerARMv7.h" 35 35 namespace JSC { typedef MacroAssemblerARMv7 MacroAssemblerBase; }; -
trunk/JavaScriptCore/assembler/MacroAssemblerCodeRef.h
r44711 r44886 38 38 // ASSERT_VALID_CODE_POINTER checks that ptr is a non-null pointer, and that it is a valid 39 39 // instruction address on the platform (for example, check any alignment requirements). 40 #if PLATFORM (ARM_V7)40 #if PLATFORM_ARM_ARCH(7) 41 41 // ARM/thumb instructions must be 16-bit aligned, but all code pointers to be loaded 42 42 // into the processor are decorated with the bottom bit set, indicating that this is … … 125 125 126 126 explicit MacroAssemblerCodePtr(void* value) 127 #if PLATFORM (ARM_V7)127 #if PLATFORM_ARM_ARCH(7) 128 128 // Decorate the pointer as a thumb code pointer. 129 129 : m_value(reinterpret_cast<char*>(value) + 1) … … 142 142 143 143 void* executableAddress() const { return m_value; } 144 #if PLATFORM (ARM_V7)144 #if PLATFORM_ARM_ARCH(7) 145 145 // To use this pointer as a data address remove the decoration. 146 146 void* dataLocation() const { ASSERT_VALID_CODE_POINTER(m_value); return reinterpret_cast<char*>(m_value) - 1; } -
trunk/JavaScriptCore/jit/ExecutableAllocator.h
r44517 r44886 211 211 UNUSED_PARAM(code); 212 212 UNUSED_PARAM(size); 213 #elif PLATFORM (ARM_V7) && PLATFORM(IPHONE)213 #elif PLATFORM_ARM_ARCH(7) && PLATFORM(IPHONE) 214 214 sys_dcache_flush(code, size); 215 215 sys_icache_invalidate(code, size); -
trunk/JavaScriptCore/jit/JIT.h
r44884 r44886 233 233 static const FPRegisterID fpRegT1 = X86::xmm1; 234 234 static const FPRegisterID fpRegT2 = X86::xmm2; 235 #elif PLATFORM (ARM_V7)235 #elif PLATFORM_ARM_ARCH(7) 236 236 static const RegisterID returnValueRegister = ARM::r0; 237 237 static const RegisterID cachedResultRegister = ARM::r0; … … 308 308 static const int patchOffsetMethodCheckProtoStruct = 18; 309 309 static const int patchOffsetMethodCheckPutFunction = 29; 310 #elif PLATFORM (ARM_V7)310 #elif PLATFORM_ARM_ARCH(7) 311 311 // These architecture specific value are used to enable patching - see comment on op_put_by_id. 312 312 static const int patchOffsetPutByIdStructure = 10; -
trunk/JavaScriptCore/jit/JITInlineMethods.h
r44884 r44886 199 199 } 200 200 201 #elif PLATFORM (ARM_V7)201 #elif PLATFORM_ARM_ARCH(7) 202 202 203 203 ALWAYS_INLINE void JIT::preverveReturnAddressAfterCall(RegisterID reg) … … 235 235 // Within a trampoline the return address will be on the stack at this point. 236 236 addPtr(Imm32(sizeof(void*)), stackPointerRegister, firstArgumentRegister); 237 #elif PLATFORM (ARM_V7)237 #elif PLATFORM_ARM_ARCH(7) 238 238 move(stackPointerRegister, firstArgumentRegister); 239 239 #endif -
trunk/JavaScriptCore/jit/JITStubs.cpp
r44884 r44886 190 190 ); 191 191 192 #elif COMPILER(GCC) && PLATFORM (ARM_V7)192 #elif COMPILER(GCC) && PLATFORM_ARM_ARCH(7) 193 193 194 194 #if USE(JIT_STUB_ARGUMENT_VA_LIST) … … 329 329 JIT::compileCTIMachineTrampolines(globalData, &m_executablePool, &m_ctiArrayLengthTrampoline, &m_ctiStringLengthTrampoline, &m_ctiVirtualCallPreLink, &m_ctiVirtualCallLink, &m_ctiVirtualCall, &m_ctiNativeCallThunk); 330 330 331 #if PLATFORM (ARM_V7)331 #if PLATFORM_ARM_ARCH(7) 332 332 // Unfortunate the arm compiler does not like the use of offsetof on JITStackFrame (since it contains non POD types), 333 333 // and the FIELD_OFFSET macro does not appear constantish enough for it to be happy with its use in COMPILE_ASSERT … … 570 570 namespace JITStubs { 571 571 572 #if PLATFORM (ARM_V7)572 #if PLATFORM_ARM_ARCH(7) 573 573 574 574 #define DEFINE_STUB_FUNCTION(rtype, op) \ -
trunk/JavaScriptCore/jit/JITStubs.h
r44838 r44886 116 116 ReturnAddressPtr* returnAddressSlot() { return reinterpret_cast<ReturnAddressPtr*>(this) - 1; } 117 117 }; 118 #elif PLATFORM (ARM_V7)118 #elif PLATFORM_ARM_ARCH(7) 119 119 struct JITStackFrame { 120 120 JITStubArg padding; // Unused -
trunk/JavaScriptCore/wtf/Platform.h
r44765 r44886 228 228 #define WTF_PLATFORM_FORCE_PACK 1 229 229 #endif 230 #define ARM_ARCH_VERSION 3 231 #if defined(__ARM_ARCH_4__) || defined(__ARM_ARCH_4T__) 232 #undef ARM_ARCH_VERSION 233 #define ARM_ARCH_VERSION 4 234 #endif 235 #if defined(__ARM_ARCH_5__) || defined(__ARM_ARCH_5T__) \ 236 || defined(__ARM_ARCH_5E__) || defined(__ARM_ARCH_5TE__) \ 237 || defined(__ARM_ARCH_5TEJ__) 238 #undef ARM_ARCH_VERSION 239 #define ARM_ARCH_VERSION 5 240 #endif 241 #if defined(__ARM_ARCH_6__) || defined(__ARM_ARCH_6J__) \ 242 || defined(__ARM_ARCH_6K__) || defined(__ARM_ARCH_6Z__) \ 243 || defined(__ARM_ARCH_6ZK__) 244 #undef ARM_ARCH_VERSION 245 #define ARM_ARCH_VERSION 6 230 246 #endif 231 247 #if defined(__ARM_ARCH_7A__) 232 #define WTF_PLATFORM_ARM_V7 1 233 #endif 248 #undef ARM_ARCH_VERSION 249 #define ARM_ARCH_VERSION 7 250 #endif 251 #endif /* ARM */ 252 #define PLATFORM_ARM_ARCH(N) (PLATFORM(ARM) && ARM_ARCH_VERSION >= N) 234 253 235 254 /* PLATFORM(X86) */ … … 520 539 #define ENABLE_JIT 1 521 540 #define WTF_USE_JIT_STUB_ARGUMENT_VA_LIST 1 522 #elif PLATFORM (ARM_V7) && PLATFORM(IPHONE)541 #elif PLATFORM_ARM_ARCH(7) && PLATFORM(IPHONE) 523 542 /* Under development, temporarily disabled until 16Mb link range limit in assembler is fixed. */ 524 543 #define ENABLE_JIT 0 … … 569 588 || (!defined(ENABLE_YARR_JIT) && PLATFORM(X86_64) && PLATFORM(MAC)) \ 570 589 /* Under development, temporarily disabled until 16Mb link range limit in assembler is fixed. */ \ 571 || (!defined(ENABLE_YARR_JIT) && PLATFORM (ARM_V7) && PLATFORM(IPHONE) && 0) \590 || (!defined(ENABLE_YARR_JIT) && PLATFORM_ARM_ARCH(7) && PLATFORM(IPHONE) && 0) \ 572 591 || (!defined(ENABLE_YARR_JIT) && PLATFORM(X86) && PLATFORM(WIN)) 573 592 #define ENABLE_YARR 1 … … 584 603 /* Setting this flag prevents the assembler from using RWX memory; this may improve 585 604 security but currectly comes at a significant performance cost. */ 586 #if PLATFORM (ARM_V7) && PLATFORM(IPHONE)605 #if PLATFORM_ARM_ARCH(7) && PLATFORM(IPHONE) 587 606 #define ENABLE_ASSEMBLER_WX_EXCLUSIVE 1 588 607 #else -
trunk/JavaScriptCore/yarr/RegexJIT.cpp
r44713 r44886 44 44 friend void jitCompileRegex(JSGlobalData* globalData, RegexCodeBlock& jitObject, const UString& pattern, unsigned& numSubpatterns, const char*& error, bool ignoreCase, bool multiline); 45 45 46 #if PLATFORM (ARM_V7)46 #if PLATFORM_ARM_ARCH(7) 47 47 static const RegisterID input = ARM::r0; 48 48 static const RegisterID index = ARM::r1; … … 1309 1309 loadPtr(Address(X86::ebp, 2 * sizeof(void*)), output); 1310 1310 #endif 1311 #elif PLATFORM (ARM_V7)1311 #elif PLATFORM_ARM_ARCH(7) 1312 1312 push(ARM::r4); 1313 1313 push(ARM::r5); … … 1326 1326 pop(X86::ebx); 1327 1327 pop(X86::ebp); 1328 #elif PLATFORM (ARM_V7)1328 #elif PLATFORM_ARM_ARCH(7) 1329 1329 pop(ARM::r6); 1330 1330 pop(ARM::r5);
Note:
See TracChangeset
for help on using the changeset viewer.