diff options
author | Simon Hausmann <simon.hausmann@digia.com> | 2012-11-07 11:22:47 +0100 |
---|---|---|
committer | Simon Hausmann <simon.hausmann@digia.com> | 2012-11-07 11:22:47 +0100 |
commit | cfd86b747d32ac22246a1aa908eaa720c63a88c1 (patch) | |
tree | 24d68c6f61c464ecba1e05670b80390ea3b0e50c /Source/JavaScriptCore/llint | |
parent | 69d7c744c9de19d152dbe2d8e46eb7dfd4511d1a (diff) | |
download | qtwebkit-cfd86b747d32ac22246a1aa908eaa720c63a88c1.tar.gz |
Imported WebKit commit 20271caf2e2c016d5cef40184cddeefeac4f1876 (http://svn.webkit.org/repository/webkit/trunk@133733)
New snapshot that contains all previous fixes as well as build fix for latest QtMultimedia API changes.
Diffstat (limited to 'Source/JavaScriptCore/llint')
-rw-r--r-- | Source/JavaScriptCore/llint/LLIntData.cpp | 2 | ||||
-rw-r--r-- | Source/JavaScriptCore/llint/LLIntOffsetsExtractor.cpp | 2 | ||||
-rw-r--r-- | Source/JavaScriptCore/llint/LLIntSlowPaths.cpp | 57 | ||||
-rw-r--r-- | Source/JavaScriptCore/llint/LLIntSlowPaths.h | 2 | ||||
-rw-r--r-- | Source/JavaScriptCore/llint/LowLevelInterpreter.asm | 82 | ||||
-rw-r--r-- | Source/JavaScriptCore/llint/LowLevelInterpreter.cpp | 118 | ||||
-rw-r--r-- | Source/JavaScriptCore/llint/LowLevelInterpreter32_64.asm | 6 | ||||
-rw-r--r-- | Source/JavaScriptCore/llint/LowLevelInterpreter64.asm | 675 |
8 files changed, 514 insertions, 430 deletions
diff --git a/Source/JavaScriptCore/llint/LLIntData.cpp b/Source/JavaScriptCore/llint/LLIntData.cpp index 8e2dacf4d..eec376b37 100644 --- a/Source/JavaScriptCore/llint/LLIntData.cpp +++ b/Source/JavaScriptCore/llint/LLIntData.cpp @@ -103,7 +103,7 @@ void Data::performAssertions(JSGlobalData& globalData) ASSERT(ValueNull == TagBitTypeOther); #endif ASSERT(StringType == 5); - ASSERT(ObjectType == 13); + ASSERT(ObjectType == 17); ASSERT(MasqueradesAsUndefined == 1); ASSERT(ImplementsHasInstance == 2); ASSERT(ImplementsDefaultHasInstance == 8); diff --git a/Source/JavaScriptCore/llint/LLIntOffsetsExtractor.cpp b/Source/JavaScriptCore/llint/LLIntOffsetsExtractor.cpp index cbfff29d6..0087fe5ff 100644 --- a/Source/JavaScriptCore/llint/LLIntOffsetsExtractor.cpp +++ b/Source/JavaScriptCore/llint/LLIntOffsetsExtractor.cpp @@ -53,7 +53,7 @@ namespace JSC { -#define OFFLINE_ASM_OFFSETOF(clazz, field) OBJECT_OFFSETOF(clazz, field) +#define OFFLINE_ASM_OFFSETOF(clazz, field) (static_cast<unsigned>(OBJECT_OFFSETOF(clazz, field))) class LLIntOffsetsExtractor { public: diff --git a/Source/JavaScriptCore/llint/LLIntSlowPaths.cpp b/Source/JavaScriptCore/llint/LLIntSlowPaths.cpp index 74beae98a..ba44bf404 100644 --- a/Source/JavaScriptCore/llint/LLIntSlowPaths.cpp +++ b/Source/JavaScriptCore/llint/LLIntSlowPaths.cpp @@ -460,7 +460,7 @@ LLINT_SLOW_PATH_DECL(slow_path_create_activation) #if LLINT_SLOW_PATH_TRACING dataLog("Creating an activation, exec = %p!\n", exec); #endif - JSActivation* activation = JSActivation::create(globalData, exec, static_cast<FunctionExecutable*>(exec->codeBlock()->ownerExecutable())); + JSActivation* activation = JSActivation::create(globalData, exec, exec->codeBlock()); exec->setScope(activation); LLINT_RETURN(JSValue(activation)); } @@ -1001,32 +1001,32 @@ LLINT_SLOW_PATH_DECL(slow_path_put_by_id) // below may GC. pc[0].u.opcode = LLInt::getOpcode(llint_op_put_by_id); - normalizePrototypeChain(exec, baseCell); - - ASSERT(structure->previousID()->isObject()); - pc[4].u.structure.set( - globalData, codeBlock->ownerExecutable(), structure->previousID()); - if (isInlineOffset(slot.cachedOffset())) - pc[5].u.operand = offsetInInlineStorage(slot.cachedOffset()) * sizeof(JSValue) + JSObject::offsetOfInlineStorage(); - else - pc[5].u.operand = offsetInButterfly(slot.cachedOffset()) * sizeof(JSValue); - pc[6].u.structure.set( - globalData, codeBlock->ownerExecutable(), structure); - StructureChain* chain = structure->prototypeChain(exec); - ASSERT(chain); - pc[7].u.structureChain.set( - globalData, codeBlock->ownerExecutable(), chain); - - if (pc[8].u.operand) { - if (isInlineOffset(slot.cachedOffset())) - pc[0].u.opcode = LLInt::getOpcode(llint_op_put_by_id_transition_direct); - else - pc[0].u.opcode = LLInt::getOpcode(llint_op_put_by_id_transition_direct_out_of_line); - } else { + if (normalizePrototypeChain(exec, baseCell) != InvalidPrototypeChain) { + ASSERT(structure->previousID()->isObject()); + pc[4].u.structure.set( + globalData, codeBlock->ownerExecutable(), structure->previousID()); if (isInlineOffset(slot.cachedOffset())) - pc[0].u.opcode = LLInt::getOpcode(llint_op_put_by_id_transition_normal); + pc[5].u.operand = offsetInInlineStorage(slot.cachedOffset()) * sizeof(JSValue) + JSObject::offsetOfInlineStorage(); else - pc[0].u.opcode = LLInt::getOpcode(llint_op_put_by_id_transition_normal_out_of_line); + pc[5].u.operand = offsetInButterfly(slot.cachedOffset()) * sizeof(JSValue); + pc[6].u.structure.set( + globalData, codeBlock->ownerExecutable(), structure); + StructureChain* chain = structure->prototypeChain(exec); + ASSERT(chain); + pc[7].u.structureChain.set( + globalData, codeBlock->ownerExecutable(), chain); + + if (pc[8].u.operand) { + if (isInlineOffset(slot.cachedOffset())) + pc[0].u.opcode = LLInt::getOpcode(llint_op_put_by_id_transition_direct); + else + pc[0].u.opcode = LLInt::getOpcode(llint_op_put_by_id_transition_direct_out_of_line); + } else { + if (isInlineOffset(slot.cachedOffset())) + pc[0].u.opcode = LLInt::getOpcode(llint_op_put_by_id_transition_normal); + else + pc[0].u.opcode = LLInt::getOpcode(llint_op_put_by_id_transition_normal_out_of_line); + } } } } else { @@ -1622,10 +1622,13 @@ LLINT_SLOW_PATH_DECL(slow_path_throw) LLINT_THROW(LLINT_OP_C(1).jsValue()); } -LLINT_SLOW_PATH_DECL(slow_path_throw_reference_error) +LLINT_SLOW_PATH_DECL(slow_path_throw_static_error) { LLINT_BEGIN(); - LLINT_THROW(createReferenceError(exec, LLINT_OP_C(1).jsValue().toString(exec)->value(exec))); + if (pc[2].u.operand) + LLINT_THROW(createReferenceError(exec, LLINT_OP_C(1).jsValue().toString(exec)->value(exec))); + else + LLINT_THROW(createTypeError(exec, LLINT_OP_C(1).jsValue().toString(exec)->value(exec))); } LLINT_SLOW_PATH_DECL(slow_path_debug) diff --git a/Source/JavaScriptCore/llint/LLIntSlowPaths.h b/Source/JavaScriptCore/llint/LLIntSlowPaths.h index f78476841..99fbaccfa 100644 --- a/Source/JavaScriptCore/llint/LLIntSlowPaths.h +++ b/Source/JavaScriptCore/llint/LLIntSlowPaths.h @@ -204,7 +204,7 @@ LLINT_SLOW_PATH_HIDDEN_DECL(slow_path_push_with_scope); LLINT_SLOW_PATH_HIDDEN_DECL(slow_path_pop_scope); LLINT_SLOW_PATH_HIDDEN_DECL(slow_path_push_name_scope); LLINT_SLOW_PATH_HIDDEN_DECL(slow_path_throw); -LLINT_SLOW_PATH_HIDDEN_DECL(slow_path_throw_reference_error); +LLINT_SLOW_PATH_HIDDEN_DECL(slow_path_throw_static_error); LLINT_SLOW_PATH_HIDDEN_DECL(slow_path_debug); LLINT_SLOW_PATH_HIDDEN_DECL(slow_path_profile_will_call); LLINT_SLOW_PATH_HIDDEN_DECL(slow_path_profile_did_call); diff --git a/Source/JavaScriptCore/llint/LowLevelInterpreter.asm b/Source/JavaScriptCore/llint/LowLevelInterpreter.asm index 409ec4158..ba5b67df4 100644 --- a/Source/JavaScriptCore/llint/LowLevelInterpreter.asm +++ b/Source/JavaScriptCore/llint/LowLevelInterpreter.asm @@ -96,7 +96,7 @@ const SlowPutArrayStorageShape = 30 # Type constants. const StringType = 5 -const ObjectType = 13 +const ObjectType = 17 # Type flags constants. const MasqueradesAsUndefined = 1 @@ -151,11 +151,10 @@ else end # This must match wtf/Vector.h +const VectorSizeOffset = 0 if JSVALUE64 - const VectorSizeOffset = 0 const VectorBufferOffset = 8 else - const VectorSizeOffset = 0 const VectorBufferOffset = 4 end @@ -344,9 +343,9 @@ macro functionInitialization(profileArgSkip) addp t2, t3 .argumentProfileLoop: if JSVALUE64 - loadp ThisArgumentOffset + 8 - profileArgSkip * 8[cfr, t0], t2 + loadq ThisArgumentOffset + 8 - profileArgSkip * 8[cfr, t0], t2 subp sizeof ValueProfile, t3 - storep t2, profileArgSkip * sizeof ValueProfile + ValueProfile::m_buckets[t3] + storeq t2, profileArgSkip * sizeof ValueProfile + ValueProfile::m_buckets[t3] else loadi ThisArgumentOffset + TagOffset + 8 - profileArgSkip * 8[cfr, t0], t2 subp sizeof ValueProfile, t3 @@ -546,13 +545,13 @@ macro getPutToBaseOperationField(scratch, scratch1, fieldOffset, fieldGetter) end macro moveJSValueFromRegisterWithoutProfiling(value, destBuffer, destOffsetReg) - storep value, [destBuffer, destOffsetReg, 8] + storeq value, [destBuffer, destOffsetReg, 8] end macro moveJSValueFromRegistersWithoutProfiling(tag, payload, destBuffer, destOffsetReg) - storep tag, TagOffset[destBuffer, destOffsetReg, 8] - storep payload, PayloadOffset[destBuffer, destOffsetReg, 8] + storei tag, TagOffset[destBuffer, destOffsetReg, 8] + storei payload, PayloadOffset[destBuffer, destOffsetReg, 8] end macro putToBaseVariableBody(variableOffset, scratch1, scratch2, scratch3) @@ -613,15 +612,15 @@ end macro moveJSValue(sourceBuffer, sourceOffsetReg, destBuffer, destOffsetReg, profileOffset, scratchRegister) if JSVALUE64 - loadp [sourceBuffer, sourceOffsetReg, 8], scratchRegister - storep scratchRegister, [destBuffer, destOffsetReg, 8] + loadq [sourceBuffer, sourceOffsetReg, 8], scratchRegister + storeq scratchRegister, [destBuffer, destOffsetReg, 8] loadpFromInstruction(profileOffset, destOffsetReg) valueProfile(scratchRegister, destOffsetReg) else - loadp PayloadOffset[sourceBuffer, sourceOffsetReg, 8], scratchRegister - storep scratchRegister, PayloadOffset[destBuffer, destOffsetReg, 8] - loadp TagOffset[sourceBuffer, sourceOffsetReg, 8], sourceOffsetReg - storep sourceOffsetReg, TagOffset[destBuffer, destOffsetReg, 8] + loadi PayloadOffset[sourceBuffer, sourceOffsetReg, 8], scratchRegister + storei scratchRegister, PayloadOffset[destBuffer, destOffsetReg, 8] + loadi TagOffset[sourceBuffer, sourceOffsetReg, 8], sourceOffsetReg + storei sourceOffsetReg, TagOffset[destBuffer, destOffsetReg, 8] loadpFromInstruction(profileOffset, destOffsetReg) valueProfile(sourceOffsetReg, scratchRegister, destOffsetReg) end @@ -629,29 +628,29 @@ end macro moveJSValueFromSlot(slot, destBuffer, destOffsetReg, profileOffset, scratchRegister) if JSVALUE64 - loadp [slot], scratchRegister - storep scratchRegister, [destBuffer, destOffsetReg, 8] + loadq [slot], scratchRegister + storeq scratchRegister, [destBuffer, destOffsetReg, 8] loadpFromInstruction(profileOffset, destOffsetReg) valueProfile(scratchRegister, destOffsetReg) else - loadp PayloadOffset[slot], scratchRegister - storep scratchRegister, PayloadOffset[destBuffer, destOffsetReg, 8] - loadp TagOffset[slot], slot - storep slot, TagOffset[destBuffer, destOffsetReg, 8] + loadi PayloadOffset[slot], scratchRegister + storei scratchRegister, PayloadOffset[destBuffer, destOffsetReg, 8] + loadi TagOffset[slot], slot + storei slot, TagOffset[destBuffer, destOffsetReg, 8] loadpFromInstruction(profileOffset, destOffsetReg) valueProfile(slot, scratchRegister, destOffsetReg) end end macro moveJSValueFromRegister(value, destBuffer, destOffsetReg, profileOffset) - storep value, [destBuffer, destOffsetReg, 8] + storeq value, [destBuffer, destOffsetReg, 8] loadpFromInstruction(profileOffset, destOffsetReg) valueProfile(value, destOffsetReg) end macro moveJSValueFromRegisters(tag, payload, destBuffer, destOffsetReg, profileOffset) - storep tag, TagOffset[destBuffer, destOffsetReg, 8] - storep payload, PayloadOffset[destBuffer, destOffsetReg, 8] + storei tag, TagOffset[destBuffer, destOffsetReg, 8] + storei payload, PayloadOffset[destBuffer, destOffsetReg, 8] loadpFromInstruction(profileOffset, destOffsetReg) valueProfile(tag, payload, destOffsetReg) end @@ -662,7 +661,7 @@ _llint_op_resolve_global_property: loadp CodeBlock[cfr], t1 loadp CodeBlock::m_globalObject[t1], t1 loadp ResolveOperation::m_structure[t0], t2 - bpneq JSCell::m_structure[t1], t2, ._llint_op_resolve + bpneq JSCell::m_structure[t1], t2, .llint_op_resolve_local loadis ResolveOperation::m_offset[t0], t0 if JSVALUE64 loadPropertyAtVariableOffsetKnownNotInline(t0, t1, t2) @@ -746,8 +745,8 @@ _llint_op_resolve_scoped_var_with_top_scope_check: moveJSValue(t1, t2, cfr, t3, 4, t0) dispatch(5) -._llint_op_resolve: _llint_op_resolve: +.llint_op_resolve_local: traceExecution() getResolveOperation(3, t0, t1) btpz t0, .noInstructions @@ -781,7 +780,7 @@ _llint_op_resolve_base_to_global: dispatch(7) _llint_op_resolve_base_to_global_dynamic: - jmp ._llint_resolve_base + jmp _llint_op_resolve_base _llint_op_resolve_base_to_scope: traceExecution() @@ -828,7 +827,6 @@ _llint_op_resolve_base_to_scope_with_top_scope_check: end dispatch(7) -._llint_resolve_base: _llint_op_resolve_base: traceExecution() callSlowPath(_llint_slow_path_resolve_base) @@ -888,10 +886,11 @@ macro interpretResolveWithBase(opcodeLength, slowPath) # t1 now contains the index for the base register bineq t2, ResolveOperationSetBaseToScope, .notSetBaseToScope - storep t3, PayloadOffset[cfr, t1, 8] if JSVALUE64 + storeq t3, [cfr, t1, 8] else - storep CellTag, TagOffset[cfr, t1, 8] + storei t3, PayloadOffset[cfr, t1, 8] + storei CellTag, TagOffset[cfr, t1, 8] end jmp .haveSetBase @@ -899,10 +898,10 @@ macro interpretResolveWithBase(opcodeLength, slowPath) bineq t2, ResolveOperationSetBaseToUndefined, .notSetBaseToUndefined if JSVALUE64 - storep ValueUndefined, PayloadOffset[cfr, t1, 8] + storeq ValueUndefined, [cfr, t1, 8] else - storep 0, PayloadOffset[cfr, t1, 8] - storep UndefinedTag, TagOffset[cfr, t1, 8] + storei 0, PayloadOffset[cfr, t1, 8] + storei UndefinedTag, TagOffset[cfr, t1, 8] end jmp .haveSetBase @@ -910,10 +909,11 @@ macro interpretResolveWithBase(opcodeLength, slowPath) bineq t2, ResolveOperationSetBaseToGlobal, .slowPath loadp JSCell::m_structure[t3], t2 loadp Structure::m_globalObject[t2], t2 - storep t2, PayloadOffset[cfr, t1, 8] if JSVALUE64 + storeq t2, [cfr, t1, 8] else - storep CellTag, TagOffset[cfr, t1, 8] + storei t2, PayloadOffset[cfr, t1, 8] + storei CellTag, TagOffset[cfr, t1, 8] end .haveSetBase: @@ -1204,12 +1204,6 @@ _llint_op_strcat: dispatch(4) -_llint_op_method_check: - traceExecution() - # We ignore method checks and use normal get_by_id optimizations. - dispatch(1) - - _llint_op_get_pnames: traceExecution() callSlowPath(_llint_slow_path_get_pnames) @@ -1240,10 +1234,10 @@ _llint_op_throw: dispatch(2) -_llint_op_throw_reference_error: +_llint_op_throw_static_error: traceExecution() - callSlowPath(_llint_slow_path_throw_reference_error) - dispatch(2) + callSlowPath(_llint_slow_path_throw_static_error) + dispatch(3) _llint_op_profile_will_call: @@ -1332,6 +1326,8 @@ _llint_op_put_by_id_replace: _llint_op_put_by_id_transition: notSupported() +_llint_op_init_global_const_nop: + dispatch(5) # Indicate the end of LLInt. _llint_end: diff --git a/Source/JavaScriptCore/llint/LowLevelInterpreter.cpp b/Source/JavaScriptCore/llint/LowLevelInterpreter.cpp index ebfdadfdb..a9cb393b0 100644 --- a/Source/JavaScriptCore/llint/LowLevelInterpreter.cpp +++ b/Source/JavaScriptCore/llint/LowLevelInterpreter.cpp @@ -122,6 +122,98 @@ static double Ints2Double(uint32_t lo, uint32_t hi) //============================================================================ +// CLoopRegister is the storage for an emulated CPU register. +// It defines the policy of how ints smaller than intptr_t are packed into the +// pseudo register, as well as hides endianness differences. + +struct CLoopRegister { + union { + intptr_t i; + uintptr_t u; +#if USE(JSVALUE64) +#if CPU(BIG_ENDIAN) + struct { + int32_t i32padding; + int32_t i32; + }; + struct { + uint32_t u32padding; + uint32_t u32; + }; + struct { + int8_t i8padding[7]; + int8_t i8; + }; + struct { + uint8_t u8padding[7]; + uint8_t u8; + }; +#else // !CPU(BIG_ENDIAN) + struct { + int32_t i32; + int32_t i32padding; + }; + struct { + uint32_t u32; + uint32_t u32padding; + }; + struct { + int8_t i8; + int8_t i8padding[7]; + }; + struct { + uint8_t u8; + uint8_t u8padding[7]; + }; +#endif // !CPU(BIG_ENDIAN) +#else // !USE(JSVALUE64) + int32_t i32; + uint32_t u32; + +#if CPU(BIG_ENDIAN) + struct { + int8_t i8padding[3]; + int8_t i8; + }; + struct { + uint8_t u8padding[3]; + uint8_t u8; + }; + +#else // !CPU(BIG_ENDIAN) + struct { + int8_t i8; + int8_t i8padding[3]; + }; + struct { + uint8_t u8; + uint8_t u8padding[3]; + }; +#endif // !CPU(BIG_ENDIAN) +#endif // !USE(JSVALUE64) + + int8_t* i8p; + void* vp; + ExecState* execState; + void* instruction; + NativeFunction nativeFunc; +#if USE(JSVALUE64) + int64_t i64; + uint64_t u64; + EncodedJSValue encodedJSValue; + double castToDouble; +#endif + Opcode opcode; + }; + +#if USE(JSVALUE64) + inline void clearHighWord() { i32padding = 0; } +#else + inline void clearHighWord() { } +#endif +}; + +//============================================================================ // The llint C++ interpreter loop: // @@ -164,29 +256,12 @@ JSValue CLoop::execute(CallFrame* callFrame, OpcodeID bootstrapOpcodeId, ASSERT(callFrame->globalData().topCallFrame == callFrame); // Define the pseudo registers used by the LLINT C Loop backend: - union CLoopRegister { - intptr_t i; - uintptr_t u; - int32_t i32; - uint32_t u32; - int8_t i8; - uint8_t u8; - int8_t* i8p; - void* vp; - ExecState* execState; - void* instruction; - NativeFunction nativeFunc; -#if USE(JSVALUE64) - int64_t i64; - EncodedJSValue encodedJSValue; - double castToDouble; -#endif - Opcode opcode; - }; + ASSERT(sizeof(CLoopRegister) == sizeof(intptr_t)); + union CLoopDoubleRegister { double d; #if USE(JSVALUE64) - void* castToVoidPtr; + int64_t castToInt64; #endif }; @@ -311,6 +386,7 @@ JSValue CLoop::execute(CallFrame* callFrame, OpcodeID bootstrapOpcodeId, #define DEFINE_OPCODE(__opcode) \ case __opcode: \ + __opcode: \ RECORD_OPCODE_STATS(__opcode); // Dispatch to the current PC's bytecode: @@ -417,7 +493,7 @@ JSValue CLoop::execute(CallFrame* callFrame, OpcodeID bootstrapOpcodeId, // compiler on all such labels: #define LLINT_OPCODE_ENTRY(__opcode, length) \ UNUSED_LABEL(__opcode); - FOR_EACH_LLINT_NATIVE_HELPER(LLINT_OPCODE_ENTRY) + FOR_EACH_OPCODE_ID(LLINT_OPCODE_ENTRY); #undef LLINT_OPCODE_ENTRY diff --git a/Source/JavaScriptCore/llint/LowLevelInterpreter32_64.asm b/Source/JavaScriptCore/llint/LowLevelInterpreter32_64.asm index d0072d714..ffb146247 100644 --- a/Source/JavaScriptCore/llint/LowLevelInterpreter32_64.asm +++ b/Source/JavaScriptCore/llint/LowLevelInterpreter32_64.asm @@ -984,7 +984,7 @@ _llint_op_init_global_const: writeBarrier(t2, t3) storei t2, TagOffset[t0] storei t3, PayloadOffset[t0] - dispatch(3) + dispatch(5) _llint_op_init_global_const_check: @@ -1320,8 +1320,8 @@ _llint_op_put_by_val: storeb 1, ArrayProfile::m_mayStoreToHole[t1] end addi 1, ArrayStorage::m_numValuesInVector[t0] - bib t2, -sizeof IndexingHeader + IndexingHeader::m_publicLength[t0], .opPutByValArrayStorageStoreResult - addi 1, t2, t1 + bib t3, -sizeof IndexingHeader + IndexingHeader::m_publicLength[t0], .opPutByValArrayStorageStoreResult + addi 1, t3, t1 storei t1, -sizeof IndexingHeader + IndexingHeader::m_publicLength[t0] jmp .opPutByValArrayStorageStoreResult diff --git a/Source/JavaScriptCore/llint/LowLevelInterpreter64.asm b/Source/JavaScriptCore/llint/LowLevelInterpreter64.asm index 59fa18ccf..c9900b343 100644 --- a/Source/JavaScriptCore/llint/LowLevelInterpreter64.asm +++ b/Source/JavaScriptCore/llint/LowLevelInterpreter64.asm @@ -33,21 +33,29 @@ const ValueUndefined = TagBitTypeOther | TagBitUndefined const ValueNull = TagBitTypeOther # Utilities. +macro jumpToInstruction() + jmp [PB, PC, 8] +end + macro dispatch(advance) addp advance, PC - jmp [PB, PC, 8] + jumpToInstruction() end macro dispatchInt(advance) addi advance, PC - jmp [PB, PC, 8] + jumpToInstruction() +end + +macro dispatchIntIndirect(offset) + dispatchInt(offset * 8[PB, PC, 8]) end macro dispatchAfterCall() loadi ArgumentCount + TagOffset[cfr], PC loadp CodeBlock[cfr], PB loadp CodeBlock::m_instructions[PB], PB - jmp [PB, PC, 8] + jumpToInstruction() end macro cCall2(function, arg1, arg2) @@ -87,7 +95,7 @@ macro restoreStateAfterCCall() move t1, cfr move t3, PB subp PB, PC - urshiftp 3, PC + rshiftp 3, PC end macro callSlowPath(slowPath) @@ -137,24 +145,24 @@ end # Index and value must be different registers. Index may be clobbered. macro loadConstantOrVariable(index, value) bpgteq index, FirstConstantRegisterIndex, .constant - loadp [cfr, index, 8], value + loadq [cfr, index, 8], value jmp .done .constant: loadp CodeBlock[cfr], value loadp CodeBlock::m_constantRegisters + VectorBufferOffset[value], value subp FirstConstantRegisterIndex, index - loadp [value, index, 8], value + loadq [value, index, 8], value .done: end macro loadConstantOrVariableInt32(index, value, slow) loadConstantOrVariable(index, value) - bpb value, tagTypeNumber, slow + bqb value, tagTypeNumber, slow end macro loadConstantOrVariableCell(index, value, slow) loadConstantOrVariable(index, value) - btpnz value, tagMask, slow + btqnz value, tagMask, slow end macro writeBarrier(value) @@ -163,7 +171,7 @@ end macro valueProfile(value, profile) if VALUE_PROFILER - storep value, ValueProfile::m_buckets[profile] + storeq value, ValueProfile::m_buckets[profile] end end @@ -200,7 +208,7 @@ _llint_op_enter: move ValueUndefined, t0 .opEnterLoop: subi 1, t2 - storep t0, [cfr, t2, 8] + storeq t0, [cfr, t2, 8] btinz t2, .opEnterLoop .opEnterDone: dispatch(1) @@ -208,8 +216,8 @@ _llint_op_enter: _llint_op_create_activation: traceExecution() - loadis 8[PB, PC, 8], t0 - bpneq [cfr, t0, 8], ValueEmpty, .opCreateActivationDone + loadisFromInstruction(1, t0) + bqneq [cfr, t0, 8], ValueEmpty, .opCreateActivationDone callSlowPath(_llint_slow_path_create_activation) .opCreateActivationDone: dispatch(2) @@ -217,15 +225,15 @@ _llint_op_create_activation: _llint_op_init_lazy_reg: traceExecution() - loadis 8[PB, PC, 8], t0 - storep ValueEmpty, [cfr, t0, 8] + loadisFromInstruction(1, t0) + storeq ValueEmpty, [cfr, t0, 8] dispatch(2) _llint_op_create_arguments: traceExecution() - loadis 8[PB, PC, 8], t0 - bpneq [cfr, t0, 8], ValueEmpty, .opCreateArgumentsDone + loadisFromInstruction(1, t0) + bqneq [cfr, t0, 8], ValueEmpty, .opCreateArgumentsDone callSlowPath(_llint_slow_path_create_arguments) .opCreateArgumentsDone: dispatch(2) @@ -237,8 +245,8 @@ _llint_op_create_this: loadp JSFunction::m_cachedInheritorID[t0], t2 btpz t2, .opCreateThisSlow allocateBasicJSObject(JSFinalObjectSizeClassIndex, t2, t0, t1, t3, .opCreateThisSlow) - loadis 8[PB, PC, 8], t1 - storep t0, [cfr, t1, 8] + loadisFromInstruction(1, t1) + storeq t0, [cfr, t1, 8] dispatch(2) .opCreateThisSlow: @@ -248,12 +256,12 @@ _llint_op_create_this: _llint_op_convert_this: traceExecution() - loadis 8[PB, PC, 8], t0 - loadp [cfr, t0, 8], t0 - btpnz t0, tagMask, .opConvertThisSlow + loadisFromInstruction(1, t0) + loadq [cfr, t0, 8], t0 + btqnz t0, tagMask, .opConvertThisSlow loadp JSCell::m_structure[t0], t0 bbb Structure::m_typeInfo + TypeInfo::m_type[t0], ObjectType, .opConvertThisSlow - loadp 16[PB, PC, 8], t1 + loadpFromInstruction(2, t1) valueProfile(t0, t1) dispatch(3) @@ -268,8 +276,8 @@ _llint_op_new_object: loadp CodeBlock::m_globalObject[t0], t0 loadp JSGlobalObject::m_emptyObjectStructure[t0], t1 allocateBasicJSObject(JSFinalObjectSizeClassIndex, t1, t0, t2, t3, .opNewObjectSlow) - loadis 8[PB, PC, 8], t1 - storep t0, [cfr, t1, 8] + loadisFromInstruction(1, t1) + storeq t0, [cfr, t1, 8] dispatch(2) .opNewObjectSlow: @@ -279,22 +287,22 @@ _llint_op_new_object: _llint_op_mov: traceExecution() - loadis 16[PB, PC, 8], t1 - loadis 8[PB, PC, 8], t0 + loadisFromInstruction(2, t1) + loadisFromInstruction(1, t0) loadConstantOrVariable(t1, t2) - storep t2, [cfr, t0, 8] + storeq t2, [cfr, t0, 8] dispatch(3) _llint_op_not: traceExecution() - loadis 16[PB, PC, 8], t0 - loadis 8[PB, PC, 8], t1 + loadisFromInstruction(2, t0) + loadisFromInstruction(1, t1) loadConstantOrVariable(t0, t2) - xorp ValueFalse, t2 - btpnz t2, ~1, .opNotSlow - xorp ValueTrue, t2 - storep t2, [cfr, t1, 8] + xorq ValueFalse, t2 + btqnz t2, ~1, .opNotSlow + xorq ValueTrue, t2 + storeq t2, [cfr, t1, 8] dispatch(3) .opNotSlow: @@ -304,14 +312,14 @@ _llint_op_not: macro equalityComparison(integerComparison, slowPath) traceExecution() - loadis 24[PB, PC, 8], t0 - loadis 16[PB, PC, 8], t2 - loadis 8[PB, PC, 8], t3 + loadisFromInstruction(3, t0) + loadisFromInstruction(2, t2) + loadisFromInstruction(1, t3) loadConstantOrVariableInt32(t0, t1, .slow) loadConstantOrVariableInt32(t2, t0, .slow) integerComparison(t0, t1, t0) - orp ValueFalse, t0 - storep t0, [cfr, t3, 8] + orq ValueFalse, t0 + storeq t0, [cfr, t3, 8] dispatch(4) .slow: @@ -332,9 +340,9 @@ _llint_op_neq: macro equalNullComparison() - loadis 16[PB, PC, 8], t0 - loadp [cfr, t0, 8], t0 - btpnz t0, tagMask, .immediate + loadisFromInstruction(2, t0) + loadq [cfr, t0, 8], t0 + btqnz t0, tagMask, .immediate loadp JSCell::m_structure[t0], t2 btbnz Structure::m_typeInfo + TypeInfo::m_flags[t2], MasqueradesAsUndefined, .masqueradesAsUndefined move 0, t0 @@ -345,48 +353,48 @@ macro equalNullComparison() cpeq Structure::m_globalObject[t2], t0, t0 jmp .done .immediate: - andp ~TagBitUndefined, t0 - cpeq t0, ValueNull, t0 + andq ~TagBitUndefined, t0 + cqeq t0, ValueNull, t0 .done: end _llint_op_eq_null: traceExecution() equalNullComparison() - loadis 8[PB, PC, 8], t1 - orp ValueFalse, t0 - storep t0, [cfr, t1, 8] + loadisFromInstruction(1, t1) + orq ValueFalse, t0 + storeq t0, [cfr, t1, 8] dispatch(3) _llint_op_neq_null: traceExecution() equalNullComparison() - loadis 8[PB, PC, 8], t1 - xorp ValueTrue, t0 - storep t0, [cfr, t1, 8] + loadisFromInstruction(1, t1) + xorq ValueTrue, t0 + storeq t0, [cfr, t1, 8] dispatch(3) macro strictEq(equalityOperation, slowPath) traceExecution() - loadis 24[PB, PC, 8], t0 - loadis 16[PB, PC, 8], t2 + loadisFromInstruction(3, t0) + loadisFromInstruction(2, t2) loadConstantOrVariable(t0, t1) loadConstantOrVariable(t2, t0) move t0, t2 - orp t1, t2 - btpz t2, tagMask, .slow - bpaeq t0, tagTypeNumber, .leftOK - btpnz t0, tagTypeNumber, .slow + orq t1, t2 + btqz t2, tagMask, .slow + bqaeq t0, tagTypeNumber, .leftOK + btqnz t0, tagTypeNumber, .slow .leftOK: - bpaeq t1, tagTypeNumber, .rightOK - btpnz t1, tagTypeNumber, .slow + bqaeq t1, tagTypeNumber, .rightOK + btqnz t1, tagTypeNumber, .slow .rightOK: equalityOperation(t0, t1, t0) - loadis 8[PB, PC, 8], t1 - orp ValueFalse, t0 - storep t0, [cfr, t1, 8] + loadisFromInstruction(1, t1) + orq ValueFalse, t0 + storeq t0, [cfr, t1, 8] dispatch(4) .slow: @@ -396,24 +404,24 @@ end _llint_op_stricteq: strictEq( - macro (left, right, result) cpeq left, right, result end, + macro (left, right, result) cqeq left, right, result end, _llint_slow_path_stricteq) _llint_op_nstricteq: strictEq( - macro (left, right, result) cpneq left, right, result end, + macro (left, right, result) cqneq left, right, result end, _llint_slow_path_nstricteq) macro preOp(arithmeticOperation, slowPath) traceExecution() - loadis 8[PB, PC, 8], t0 - loadp [cfr, t0, 8], t1 - bpb t1, tagTypeNumber, .slow + loadisFromInstruction(1, t0) + loadq [cfr, t0, 8], t1 + bqb t1, tagTypeNumber, .slow arithmeticOperation(t1, .slow) - orp tagTypeNumber, t1 - storep t1, [cfr, t0, 8] + orq tagTypeNumber, t1 + storeq t1, [cfr, t0, 8] dispatch(2) .slow: @@ -435,16 +443,16 @@ _llint_op_pre_dec: macro postOp(arithmeticOperation, slowPath) traceExecution() - loadis 16[PB, PC, 8], t0 - loadis 8[PB, PC, 8], t1 - loadp [cfr, t0, 8], t2 + loadisFromInstruction(2, t0) + loadisFromInstruction(1, t1) + loadq [cfr, t0, 8], t2 bieq t0, t1, .done - bpb t2, tagTypeNumber, .slow + bqb t2, tagTypeNumber, .slow move t2, t3 arithmeticOperation(t3, .slow) - orp tagTypeNumber, t3 - storep t2, [cfr, t1, 8] - storep t3, [cfr, t0, 8] + orq tagTypeNumber, t3 + storeq t2, [cfr, t1, 8] + storeq t3, [cfr, t0, 8] .done: dispatch(3) @@ -467,13 +475,13 @@ _llint_op_post_dec: _llint_op_to_jsnumber: traceExecution() - loadis 16[PB, PC, 8], t0 - loadis 8[PB, PC, 8], t1 + loadisFromInstruction(2, t0) + loadisFromInstruction(1, t1) loadConstantOrVariable(t0, t2) - bpaeq t2, tagTypeNumber, .opToJsnumberIsImmediate - btpz t2, tagTypeNumber, .opToJsnumberSlow + bqaeq t2, tagTypeNumber, .opToJsnumberIsImmediate + btqz t2, tagTypeNumber, .opToJsnumberSlow .opToJsnumberIsImmediate: - storep t2, [cfr, t1, 8] + storeq t2, [cfr, t1, 8] dispatch(3) .opToJsnumberSlow: @@ -483,19 +491,19 @@ _llint_op_to_jsnumber: _llint_op_negate: traceExecution() - loadis 16[PB, PC, 8], t0 - loadis 8[PB, PC, 8], t1 + loadisFromInstruction(2, t0) + loadisFromInstruction(1, t1) loadConstantOrVariable(t0, t2) - bpb t2, tagTypeNumber, .opNegateNotInt + bqb t2, tagTypeNumber, .opNegateNotInt btiz t2, 0x7fffffff, .opNegateSlow negi t2 - orp tagTypeNumber, t2 - storep t2, [cfr, t1, 8] + orq tagTypeNumber, t2 + storeq t2, [cfr, t1, 8] dispatch(3) .opNegateNotInt: - btpz t2, tagTypeNumber, .opNegateSlow - xorp 0x8000000000000000, t2 - storep t2, [cfr, t1, 8] + btqz t2, tagTypeNumber, .opNegateSlow + xorq 0x8000000000000000, t2 + storeq t2, [cfr, t1, 8] dispatch(3) .opNegateSlow: @@ -504,47 +512,47 @@ _llint_op_negate: macro binaryOpCustomStore(integerOperationAndStore, doubleOperation, slowPath) - loadis 24[PB, PC, 8], t0 - loadis 16[PB, PC, 8], t2 + loadisFromInstruction(3, t0) + loadisFromInstruction(2, t2) loadConstantOrVariable(t0, t1) loadConstantOrVariable(t2, t0) - bpb t0, tagTypeNumber, .op1NotInt - bpb t1, tagTypeNumber, .op2NotInt - loadis 8[PB, PC, 8], t2 + bqb t0, tagTypeNumber, .op1NotInt + bqb t1, tagTypeNumber, .op2NotInt + loadisFromInstruction(1, t2) integerOperationAndStore(t1, t0, .slow, t2) dispatch(5) .op1NotInt: # First operand is definitely not an int, the second operand could be anything. - btpz t0, tagTypeNumber, .slow - bpaeq t1, tagTypeNumber, .op1NotIntOp2Int - btpz t1, tagTypeNumber, .slow - addp tagTypeNumber, t1 - fp2d t1, ft1 + btqz t0, tagTypeNumber, .slow + bqaeq t1, tagTypeNumber, .op1NotIntOp2Int + btqz t1, tagTypeNumber, .slow + addq tagTypeNumber, t1 + fq2d t1, ft1 jmp .op1NotIntReady .op1NotIntOp2Int: ci2d t1, ft1 .op1NotIntReady: - loadis 8[PB, PC, 8], t2 - addp tagTypeNumber, t0 - fp2d t0, ft0 + loadisFromInstruction(1, t2) + addq tagTypeNumber, t0 + fq2d t0, ft0 doubleOperation(ft1, ft0) - fd2p ft0, t0 - subp tagTypeNumber, t0 - storep t0, [cfr, t2, 8] + fd2q ft0, t0 + subq tagTypeNumber, t0 + storeq t0, [cfr, t2, 8] dispatch(5) .op2NotInt: # First operand is definitely an int, the second is definitely not. - loadis 8[PB, PC, 8], t2 - btpz t1, tagTypeNumber, .slow + loadisFromInstruction(1, t2) + btqz t1, tagTypeNumber, .slow ci2d t0, ft0 - addp tagTypeNumber, t1 - fp2d t1, ft1 + addq tagTypeNumber, t1 + fq2d t1, ft1 doubleOperation(ft1, ft0) - fd2p ft0, t0 - subp tagTypeNumber, t0 - storep t0, [cfr, t2, 8] + fd2q ft0, t0 + subq tagTypeNumber, t0 + storeq t0, [cfr, t2, 8] dispatch(5) .slow: @@ -556,8 +564,8 @@ macro binaryOp(integerOperation, doubleOperation, slowPath) binaryOpCustomStore( macro (left, right, slow, index) integerOperation(left, right, slow) - orp tagTypeNumber, right - storep right, [cfr, index, 8] + orq tagTypeNumber, right + storeq right, [cfr, index, 8] end, doubleOperation, slowPath) end @@ -581,8 +589,8 @@ _llint_op_mul: bilt left, 0, slow bilt right, 0, slow .done: - orp tagTypeNumber, t3 - storep t3, [cfr, index, 8] + orq tagTypeNumber, t3 + storeq t3, [cfr, index, 8] end, macro (left, right) muld left, right end, _llint_slow_path_mul) @@ -613,24 +621,24 @@ _llint_op_div: cdqi idivi t3 btinz t1, slow - orp tagTypeNumber, t0 - storep t0, [cfr, index, 8] + orq tagTypeNumber, t0 + storeq t0, [cfr, index, 8] end, macro (left, right) divd left, right end, _llint_slow_path_div) macro bitOp(operation, slowPath, advance) - loadis 24[PB, PC, 8], t0 - loadis 16[PB, PC, 8], t2 - loadis 8[PB, PC, 8], t3 + loadisFromInstruction(3, t0) + loadisFromInstruction(2, t2) + loadisFromInstruction(1, t3) loadConstantOrVariable(t0, t1) loadConstantOrVariable(t2, t0) - bpb t0, tagTypeNumber, .slow - bpb t1, tagTypeNumber, .slow + bqb t0, tagTypeNumber, .slow + bqb t1, tagTypeNumber, .slow operation(t1, t0, .slow) - orp tagTypeNumber, t0 - storep t0, [cfr, t3, 8] + orq tagTypeNumber, t0 + storeq t0, [cfr, t3, 8] dispatch(advance) .slow: @@ -691,7 +699,7 @@ _llint_op_bitor: _llint_op_check_has_instance: traceExecution() - loadis 24[PB, PC, 8], t1 + loadisFromInstruction(3, t1) loadConstantOrVariableCell(t1, t0, .opCheckHasInstanceSlow) loadp JSCell::m_structure[t0], t0 btbz Structure::m_typeInfo + TypeInfo::m_flags[t0], ImplementsDefaultHasInstance, .opCheckHasInstanceSlow @@ -705,26 +713,26 @@ _llint_op_check_has_instance: _llint_op_instanceof: traceExecution() # Actually do the work. - loadis 24[PB, PC, 8], t0 - loadis 8[PB, PC, 8], t3 + loadisFromInstruction(3, t0) + loadisFromInstruction(1, t3) loadConstantOrVariableCell(t0, t1, .opInstanceofSlow) loadp JSCell::m_structure[t1], t2 bbb Structure::m_typeInfo + TypeInfo::m_type[t2], ObjectType, .opInstanceofSlow - loadis 16[PB, PC, 8], t0 + loadisFromInstruction(2, t0) loadConstantOrVariableCell(t0, t2, .opInstanceofSlow) # Register state: t1 = prototype, t2 = value move 1, t0 .opInstanceofLoop: loadp JSCell::m_structure[t2], t2 - loadp Structure::m_prototype[t2], t2 - bpeq t2, t1, .opInstanceofDone - btpz t2, tagMask, .opInstanceofLoop + loadq Structure::m_prototype[t2], t2 + bqeq t2, t1, .opInstanceofDone + btqz t2, tagMask, .opInstanceofLoop move 0, t0 .opInstanceofDone: - orp ValueFalse, t0 - storep t0, [cfr, t3, 8] + orq ValueFalse, t0 + storeq t0, [cfr, t3, 8] dispatch(4) .opInstanceofSlow: @@ -734,65 +742,65 @@ _llint_op_instanceof: _llint_op_is_undefined: traceExecution() - loadis 16[PB, PC, 8], t1 - loadis 8[PB, PC, 8], t2 + loadisFromInstruction(2, t1) + loadisFromInstruction(1, t2) loadConstantOrVariable(t1, t0) - btpz t0, tagMask, .opIsUndefinedCell - cpeq t0, ValueUndefined, t3 - orp ValueFalse, t3 - storep t3, [cfr, t2, 8] + btqz t0, tagMask, .opIsUndefinedCell + cqeq t0, ValueUndefined, t3 + orq ValueFalse, t3 + storeq t3, [cfr, t2, 8] dispatch(3) .opIsUndefinedCell: loadp JSCell::m_structure[t0], t0 btbnz Structure::m_typeInfo + TypeInfo::m_flags[t0], MasqueradesAsUndefined, .masqueradesAsUndefined move ValueFalse, t1 - storep t1, [cfr, t2, 8] + storeq t1, [cfr, t2, 8] dispatch(3) .masqueradesAsUndefined: loadp CodeBlock[cfr], t1 loadp CodeBlock::m_globalObject[t1], t1 cpeq Structure::m_globalObject[t0], t1, t3 - orp ValueFalse, t3 - storep t3, [cfr, t2, 8] + orq ValueFalse, t3 + storeq t3, [cfr, t2, 8] dispatch(3) _llint_op_is_boolean: traceExecution() - loadis 16[PB, PC, 8], t1 - loadis 8[PB, PC, 8], t2 + loadisFromInstruction(2, t1) + loadisFromInstruction(1, t2) loadConstantOrVariable(t1, t0) - xorp ValueFalse, t0 - tpz t0, ~1, t0 - orp ValueFalse, t0 - storep t0, [cfr, t2, 8] + xorq ValueFalse, t0 + tqz t0, ~1, t0 + orq ValueFalse, t0 + storeq t0, [cfr, t2, 8] dispatch(3) _llint_op_is_number: traceExecution() - loadis 16[PB, PC, 8], t1 - loadis 8[PB, PC, 8], t2 + loadisFromInstruction(2, t1) + loadisFromInstruction(1, t2) loadConstantOrVariable(t1, t0) - tpnz t0, tagTypeNumber, t1 - orp ValueFalse, t1 - storep t1, [cfr, t2, 8] + tqnz t0, tagTypeNumber, t1 + orq ValueFalse, t1 + storeq t1, [cfr, t2, 8] dispatch(3) _llint_op_is_string: traceExecution() - loadis 16[PB, PC, 8], t1 - loadis 8[PB, PC, 8], t2 + loadisFromInstruction(2, t1) + loadisFromInstruction(1, t2) loadConstantOrVariable(t1, t0) - btpnz t0, tagMask, .opIsStringNotCell + btqnz t0, tagMask, .opIsStringNotCell loadp JSCell::m_structure[t0], t0 cbeq Structure::m_typeInfo + TypeInfo::m_type[t0], StringType, t1 - orp ValueFalse, t1 - storep t1, [cfr, t2, 8] + orq ValueFalse, t1 + storeq t1, [cfr, t2, 8] dispatch(3) .opIsStringNotCell: - storep ValueFalse, [cfr, t2, 8] + storeq ValueFalse, [cfr, t2, 8] dispatch(3) @@ -800,40 +808,40 @@ macro loadPropertyAtVariableOffsetKnownNotInline(propertyOffsetAsPointer, object assert(macro (ok) bigteq propertyOffsetAsPointer, firstOutOfLineOffset, ok end) negp propertyOffsetAsPointer loadp JSObject::m_butterfly[objectAndStorage], objectAndStorage - loadp (firstOutOfLineOffset - 2) * 8[objectAndStorage, propertyOffsetAsPointer, 8], value + loadq (firstOutOfLineOffset - 2) * 8[objectAndStorage, propertyOffsetAsPointer, 8], value end macro loadPropertyAtVariableOffset(propertyOffsetAsInt, objectAndStorage, value) bilt propertyOffsetAsInt, firstOutOfLineOffset, .isInline loadp JSObject::m_butterfly[objectAndStorage], objectAndStorage negi propertyOffsetAsInt - sxi2p propertyOffsetAsInt, propertyOffsetAsInt + sxi2q propertyOffsetAsInt, propertyOffsetAsInt jmp .ready .isInline: addp sizeof JSObject - (firstOutOfLineOffset - 2) * 8, objectAndStorage .ready: - loadp (firstOutOfLineOffset - 2) * 8[objectAndStorage, propertyOffsetAsInt, 8], value + loadq (firstOutOfLineOffset - 2) * 8[objectAndStorage, propertyOffsetAsInt, 8], value end _llint_op_init_global_const: traceExecution() - loadis 16[PB, PC, 8], t1 - loadp 8[PB, PC, 8], t0 + loadisFromInstruction(2, t1) + loadpFromInstruction(1, t0) loadConstantOrVariable(t1, t2) writeBarrier(t2) - storep t2, [t0] - dispatch(3) + storeq t2, [t0] + dispatch(5) _llint_op_init_global_const_check: traceExecution() - loadp 24[PB, PC, 8], t2 - loadis 16[PB, PC, 8], t1 - loadp 8[PB, PC, 8], t0 + loadpFromInstruction(3, t2) + loadisFromInstruction(2, t1) + loadpFromInstruction(1, t0) btbnz [t2], .opInitGlobalConstCheckSlow loadConstantOrVariable(t1, t2) writeBarrier(t2) - storep t2, [t0] + storeq t2, [t0] dispatch(5) .opInitGlobalConstCheckSlow: callSlowPath(_llint_slow_path_init_global_const_check) @@ -846,19 +854,19 @@ macro getById(getPropertyStorage) # ping-ponging is free. At best we get lucky and the get_by_id will continue # to take fast path on the new cache. At worst we take slow path, which is what # we would have been doing anyway. - loadis 16[PB, PC, 8], t0 - loadp 32[PB, PC, 8], t1 + loadisFromInstruction(2, t0) + loadpFromInstruction(4, t1) loadConstantOrVariableCell(t0, t3, .opGetByIdSlow) - loadis 40[PB, PC, 8], t2 + loadisFromInstruction(5, t2) getPropertyStorage( t3, t0, macro (propertyStorage, scratch) bpneq JSCell::m_structure[t3], t1, .opGetByIdSlow - loadis 8[PB, PC, 8], t1 - loadp [propertyStorage, t2], scratch - storep scratch, [cfr, t1, 8] - loadp 64[PB, PC, 8], t1 + loadisFromInstruction(1, t1) + loadq [propertyStorage, t2], scratch + storeq scratch, [cfr, t1, 8] + loadpFromInstruction(8, t1) valueProfile(scratch, t1) dispatch(9) end) @@ -878,21 +886,21 @@ _llint_op_get_by_id_out_of_line: _llint_op_get_array_length: traceExecution() - loadis 16[PB, PC, 8], t0 - loadp 32[PB, PC, 8], t1 + loadisFromInstruction(2, t0) + loadpFromInstruction(4, t1) loadConstantOrVariableCell(t0, t3, .opGetArrayLengthSlow) loadp JSCell::m_structure[t3], t2 arrayProfile(t2, t1, t0) btiz t2, IsArray, .opGetArrayLengthSlow btiz t2, IndexingShapeMask, .opGetArrayLengthSlow - loadis 8[PB, PC, 8], t1 - loadp 64[PB, PC, 8], t2 + loadisFromInstruction(1, t1) + loadpFromInstruction(8, t2) loadp JSObject::m_butterfly[t3], t0 loadi -sizeof IndexingHeader + IndexingHeader::m_publicLength[t0], t0 bilt t0, 0, .opGetArrayLengthSlow - orp tagTypeNumber, t0 + orq tagTypeNumber, t0 valueProfile(t0, t2) - storep t0, [cfr, t1, 8] + storeq t0, [cfr, t1, 8] dispatch(9) .opGetArrayLengthSlow: @@ -902,13 +910,13 @@ _llint_op_get_array_length: _llint_op_get_arguments_length: traceExecution() - loadis 16[PB, PC, 8], t0 - loadis 8[PB, PC, 8], t1 - btpnz [cfr, t0, 8], .opGetArgumentsLengthSlow + loadisFromInstruction(2, t0) + loadisFromInstruction(1, t1) + btqnz [cfr, t0, 8], .opGetArgumentsLengthSlow loadi ArgumentCount + PayloadOffset[cfr], t2 subi 1, t2 - orp tagTypeNumber, t2 - storep t2, [cfr, t1, 8] + orq tagTypeNumber, t2 + storeq t2, [cfr, t1, 8] dispatch(4) .opGetArgumentsLengthSlow: @@ -918,19 +926,19 @@ _llint_op_get_arguments_length: macro putById(getPropertyStorage) traceExecution() - loadis 8[PB, PC, 8], t3 - loadp 32[PB, PC, 8], t1 + loadisFromInstruction(1, t3) + loadpFromInstruction(4, t1) loadConstantOrVariableCell(t3, t0, .opPutByIdSlow) - loadis 24[PB, PC, 8], t2 + loadisFromInstruction(3, t2) getPropertyStorage( t0, t3, macro (propertyStorage, scratch) bpneq JSCell::m_structure[t0], t1, .opPutByIdSlow - loadis 40[PB, PC, 8], t1 + loadisFromInstruction(5, t1) loadConstantOrVariable(t2, scratch) writeBarrier(t0) - storep scratch, [propertyStorage, t1] + storeq scratch, [propertyStorage, t1] dispatch(9) end) end @@ -949,13 +957,13 @@ _llint_op_put_by_id_out_of_line: macro putByIdTransition(additionalChecks, getPropertyStorage) traceExecution() - loadis 8[PB, PC, 8], t3 - loadp 32[PB, PC, 8], t1 + loadisFromInstruction(1, t3) + loadpFromInstruction(4, t1) loadConstantOrVariableCell(t3, t0, .opPutByIdSlow) - loadis 24[PB, PC, 8], t2 + loadisFromInstruction(3, t2) bpneq JSCell::m_structure[t0], t1, .opPutByIdSlow additionalChecks(t1, t3) - loadis 40[PB, PC, 8], t1 + loadisFromInstruction(5, t1) getPropertyStorage( t0, t3, @@ -963,8 +971,8 @@ macro putByIdTransition(additionalChecks, getPropertyStorage) addp t1, propertyStorage, t3 loadConstantOrVariable(t2, t1) writeBarrier(t1) - storep t1, [t3] - loadp 48[PB, PC, 8], t1 + storeq t1, [t3] + loadpFromInstruction(6, t1) storep t1, JSCell::m_structure[t0] dispatch(9) end) @@ -975,17 +983,17 @@ end macro structureChainChecks(oldStructure, scratch) const protoCell = oldStructure # Reusing the oldStructure register for the proto - loadp 56[PB, PC, 8], scratch + loadpFromInstruction(7, scratch) assert(macro (ok) btpnz scratch, ok end) loadp StructureChain::m_vector[scratch], scratch assert(macro (ok) btpnz scratch, ok end) - bpeq Structure::m_prototype[oldStructure], ValueNull, .done + bqeq Structure::m_prototype[oldStructure], ValueNull, .done .loop: - loadp Structure::m_prototype[oldStructure], protoCell + loadq Structure::m_prototype[oldStructure], protoCell loadp JSCell::m_structure[protoCell], oldStructure bpneq oldStructure, [scratch], .opPutByIdSlow addp 8, scratch - bpneq Structure::m_prototype[oldStructure], ValueNull, .loop + bqneq Structure::m_prototype[oldStructure], ValueNull, .loop .done: end @@ -1007,35 +1015,35 @@ _llint_op_put_by_id_transition_normal_out_of_line: _llint_op_get_by_val: traceExecution() - loadis 16[PB, PC, 8], t2 + loadisFromInstruction(2, t2) loadConstantOrVariableCell(t2, t0, .opGetByValSlow) loadp JSCell::m_structure[t0], t2 - loadp 32[PB, PC, 8], t3 + loadpFromInstruction(4, t3) arrayProfile(t2, t3, t1) - loadis 24[PB, PC, 8], t3 + loadisFromInstruction(3, t3) loadConstantOrVariableInt32(t3, t1, .opGetByValSlow) - sxi2p t1, t1 + sxi2q t1, t1 loadp JSObject::m_butterfly[t0], t3 andi IndexingShapeMask, t2 bineq t2, ContiguousShape, .opGetByValNotContiguous biaeq t1, -sizeof IndexingHeader + IndexingHeader::m_publicLength[t3], .opGetByValSlow - loadis 8[PB, PC, 8], t0 - loadp [t3, t1, 8], t2 - btpz t2, .opGetByValSlow + loadisFromInstruction(1, t0) + loadq [t3, t1, 8], t2 + btqz t2, .opGetByValSlow jmp .opGetByValDone .opGetByValNotContiguous: subi ArrayStorageShape, t2 bia t2, SlowPutArrayStorageShape - ArrayStorageShape, .opGetByValSlow biaeq t1, -sizeof IndexingHeader + IndexingHeader::m_vectorLength[t3], .opGetByValSlow - loadis 8[PB, PC, 8], t0 - loadp ArrayStorage::m_vector[t3, t1, 8], t2 - btpz t2, .opGetByValSlow + loadisFromInstruction(1, t0) + loadq ArrayStorage::m_vector[t3, t1, 8], t2 + btqz t2, .opGetByValSlow .opGetByValDone: - storep t2, [cfr, t0, 8] - loadp 40[PB, PC, 8], t0 + storeq t2, [cfr, t0, 8] + loadpFromInstruction(5, t0) valueProfile(t2, t0) dispatch(6) @@ -1048,19 +1056,19 @@ _llint_op_get_argument_by_val: # FIXME: At some point we should array profile this. Right now it isn't necessary # since the DFG will never turn a get_argument_by_val into a GetByVal. traceExecution() - loadis 16[PB, PC, 8], t0 - loadis 24[PB, PC, 8], t1 - btpnz [cfr, t0, 8], .opGetArgumentByValSlow + loadisFromInstruction(2, t0) + loadisFromInstruction(3, t1) + btqnz [cfr, t0, 8], .opGetArgumentByValSlow loadConstantOrVariableInt32(t1, t2, .opGetArgumentByValSlow) addi 1, t2 loadi ArgumentCount + PayloadOffset[cfr], t1 biaeq t2, t1, .opGetArgumentByValSlow negi t2 - sxi2p t2, t2 - loadis 8[PB, PC, 8], t3 - loadp 32[PB, PC, 8], t1 - loadp ThisArgumentOffset[cfr, t2, 8], t0 - storep t0, [cfr, t3, 8] + sxi2q t2, t2 + loadisFromInstruction(1, t3) + loadpFromInstruction(4, t1) + loadq ThisArgumentOffset[cfr, t2, 8], t0 + storeq t0, [cfr, t3, 8] valueProfile(t0, t1) dispatch(6) @@ -1071,19 +1079,19 @@ _llint_op_get_argument_by_val: _llint_op_get_by_pname: traceExecution() - loadis 24[PB, PC, 8], t1 + loadisFromInstruction(3, t1) loadConstantOrVariable(t1, t0) - loadis 32[PB, PC, 8], t1 + loadisFromInstruction(4, t1) assertNotConstant(t1) - bpneq t0, [cfr, t1, 8], .opGetByPnameSlow - loadis 16[PB, PC, 8], t2 - loadis 40[PB, PC, 8], t3 + bqneq t0, [cfr, t1, 8], .opGetByPnameSlow + loadisFromInstruction(2, t2) + loadisFromInstruction(5, t3) loadConstantOrVariableCell(t2, t0, .opGetByPnameSlow) assertNotConstant(t3) - loadp [cfr, t3, 8], t1 + loadq [cfr, t3, 8], t1 loadp JSCell::m_structure[t0], t2 bpneq t2, JSPropertyNameIterator::m_cachedStructure[t1], .opGetByPnameSlow - loadis 48[PB, PC, 8], t3 + loadisFromInstruction(6, t3) loadi PayloadOffset[cfr, t3, 8], t3 subi 1, t3 biaeq t3, JSPropertyNameIterator::m_numCacheableSlots[t1], .opGetByPnameSlow @@ -1092,8 +1100,8 @@ _llint_op_get_by_pname: subi JSPropertyNameIterator::m_cachedStructureInlineCapacity[t1], t3 .opGetByPnameInlineProperty: loadPropertyAtVariableOffset(t3, t0, t0) - loadis 8[PB, PC, 8], t1 - storep t0, [cfr, t1, 8] + loadisFromInstruction(1, t1) + storeq t0, [cfr, t1, 8] dispatch(7) .opGetByPnameSlow: @@ -1103,30 +1111,30 @@ _llint_op_get_by_pname: _llint_op_put_by_val: traceExecution() - loadis 8[PB, PC, 8], t0 + loadisFromInstruction(1, t0) loadConstantOrVariableCell(t0, t1, .opPutByValSlow) loadp JSCell::m_structure[t1], t2 - loadp 32[PB, PC, 8], t3 + loadpFromInstruction(4, t3) arrayProfile(t2, t3, t0) - loadis 16[PB, PC, 8], t0 + loadisFromInstruction(2, t0) loadConstantOrVariableInt32(t0, t3, .opPutByValSlow) - sxi2p t3, t3 + sxi2q t3, t3 loadp JSObject::m_butterfly[t1], t0 andi IndexingShapeMask, t2 bineq t2, ContiguousShape, .opPutByValNotContiguous biaeq t3, -sizeof IndexingHeader + IndexingHeader::m_publicLength[t0], .opPutByValContiguousOutOfBounds .opPutByValContiguousStoreResult: - loadis 24[PB, PC, 8], t2 + loadisFromInstruction(3, t2) loadConstantOrVariable(t2, t1) writeBarrier(t1) - storep t1, [t0, t3, 8] + storeq t1, [t0, t3, 8] dispatch(5) .opPutByValContiguousOutOfBounds: biaeq t3, -sizeof IndexingHeader + IndexingHeader::m_vectorLength[t0], .opPutByValSlow if VALUE_PROFILER - loadp 32[PB, PC, 8], t2 + loadpFromInstruction(4, t2) storeb 1, ArrayProfile::m_mayStoreToHole[t2] end addi 1, t3, t2 @@ -1136,17 +1144,17 @@ _llint_op_put_by_val: .opPutByValNotContiguous: bineq t2, ArrayStorageShape, .opPutByValSlow biaeq t3, -sizeof IndexingHeader + IndexingHeader::m_vectorLength[t0], .opPutByValSlow - btpz ArrayStorage::m_vector[t0, t3, 8], .opPutByValArrayStorageEmpty + btqz ArrayStorage::m_vector[t0, t3, 8], .opPutByValArrayStorageEmpty .opPutByValArrayStorageStoreResult: - loadis 24[PB, PC, 8], t2 + loadisFromInstruction(3, t2) loadConstantOrVariable(t2, t1) writeBarrier(t1) - storep t1, ArrayStorage::m_vector[t0, t3, 8] + storeq t1, ArrayStorage::m_vector[t0, t3, 8] dispatch(5) .opPutByValArrayStorageEmpty: if VALUE_PROFILER - loadp 32[PB, PC, 8], t1 + loadpFromInstruction(4, t1) storeb 1, ArrayProfile::m_mayStoreToHole[t1] end addi 1, ArrayStorage::m_numValuesInVector[t0] @@ -1162,24 +1170,24 @@ _llint_op_put_by_val: _llint_op_loop: traceExecution() - dispatchInt(8[PB, PC, 8]) + dispatchIntIndirect(1) _llint_op_jmp: traceExecution() - dispatchInt(8[PB, PC, 8]) + dispatchIntIndirect(1) macro jumpTrueOrFalse(conditionOp, slow) - loadis 8[PB, PC, 8], t1 + loadisFromInstruction(1, t1) loadConstantOrVariable(t1, t0) - xorp ValueFalse, t0 - btpnz t0, -1, .slow + xorq ValueFalse, t0 + btqnz t0, -1, .slow conditionOp(t0, .target) dispatch(3) .target: - dispatchInt(16[PB, PC, 8]) + dispatchIntIndirect(2) .slow: callSlowPath(slow) @@ -1188,19 +1196,19 @@ end macro equalNull(cellHandler, immediateHandler) - loadis 8[PB, PC, 8], t0 + loadisFromInstruction(1, t0) assertNotConstant(t0) - loadp [cfr, t0, 8], t0 - btpnz t0, tagMask, .immediate + loadq [cfr, t0, 8], t0 + btqnz t0, tagMask, .immediate loadp JSCell::m_structure[t0], t2 cellHandler(t2, Structure::m_typeInfo + TypeInfo::m_flags[t2], .target) dispatch(3) .target: - dispatch(16[PB, PC, 8]) + dispatchIntIndirect(2) .immediate: - andp ~TagBitUndefined, t0 + andq ~TagBitUndefined, t0 immediateHandler(t0, .target) dispatch(3) end @@ -1215,7 +1223,7 @@ _llint_op_jeq_null: bpeq Structure::m_globalObject[structure], t0, target .notMasqueradesAsUndefined: end, - macro (value, target) bpeq value, ValueNull, target end) + macro (value, target) bqeq value, ValueNull, target end) _llint_op_jneq_null: @@ -1227,13 +1235,13 @@ _llint_op_jneq_null: loadp CodeBlock::m_globalObject[t0], t0 bpneq Structure::m_globalObject[structure], t0, target end, - macro (value, target) bpneq value, ValueNull, target end) + macro (value, target) bqneq value, ValueNull, target end) _llint_op_jneq_ptr: traceExecution() - loadis 8[PB, PC, 8], t0 - loadi 16[PB, PC, 8], t1 + loadisFromInstruction(1, t0) + loadisFromInstruction(2, t1) loadp CodeBlock[cfr], t2 loadp CodeBlock::m_globalObject[t2], t2 loadp JSGlobalObject::m_specialPointers[t2, t1, 8], t1 @@ -1241,44 +1249,44 @@ _llint_op_jneq_ptr: dispatch(4) .opJneqPtrTarget: - dispatchInt(24[PB, PC, 8]) + dispatchIntIndirect(3) macro compare(integerCompare, doubleCompare, slowPath) - loadis 8[PB, PC, 8], t2 - loadis 16[PB, PC, 8], t3 + loadisFromInstruction(1, t2) + loadisFromInstruction(2, t3) loadConstantOrVariable(t2, t0) loadConstantOrVariable(t3, t1) - bpb t0, tagTypeNumber, .op1NotInt - bpb t1, tagTypeNumber, .op2NotInt + bqb t0, tagTypeNumber, .op1NotInt + bqb t1, tagTypeNumber, .op2NotInt integerCompare(t0, t1, .jumpTarget) dispatch(4) .op1NotInt: - btpz t0, tagTypeNumber, .slow - bpb t1, tagTypeNumber, .op1NotIntOp2NotInt + btqz t0, tagTypeNumber, .slow + bqb t1, tagTypeNumber, .op1NotIntOp2NotInt ci2d t1, ft1 jmp .op1NotIntReady .op1NotIntOp2NotInt: - btpz t1, tagTypeNumber, .slow - addp tagTypeNumber, t1 - fp2d t1, ft1 + btqz t1, tagTypeNumber, .slow + addq tagTypeNumber, t1 + fq2d t1, ft1 .op1NotIntReady: - addp tagTypeNumber, t0 - fp2d t0, ft0 + addq tagTypeNumber, t0 + fq2d t0, ft0 doubleCompare(ft0, ft1, .jumpTarget) dispatch(4) .op2NotInt: ci2d t0, ft0 - btpz t1, tagTypeNumber, .slow - addp tagTypeNumber, t1 - fp2d t1, ft1 + btqz t1, tagTypeNumber, .slow + addq tagTypeNumber, t1 + fq2d t1, ft1 doubleCompare(ft0, ft1, .jumpTarget) dispatch(4) .jumpTarget: - dispatchInt(24[PB, PC, 8]) + dispatchIntIndirect(3) .slow: callSlowPath(slowPath) @@ -1288,15 +1296,15 @@ end _llint_op_switch_imm: traceExecution() - loadis 24[PB, PC, 8], t2 - loadis 8[PB, PC, 8], t3 + loadisFromInstruction(3, t2) + loadisFromInstruction(1, t3) loadConstantOrVariable(t2, t1) loadp CodeBlock[cfr], t2 loadp CodeBlock::m_rareData[t2], t2 muli sizeof SimpleJumpTable, t3 # FIXME: would be nice to peephole this! loadp CodeBlock::RareData::m_immediateSwitchJumpTables + VectorBufferOffset[t2], t2 addp t3, t2 - bpb t1, tagTypeNumber, .opSwitchImmNotInt + bqb t1, tagTypeNumber, .opSwitchImmNotInt subi SimpleJumpTable::min[t2], t1 biaeq t1, SimpleJumpTable::branchOffsets + VectorSizeOffset[t2], .opSwitchImmFallThrough loadp SimpleJumpTable::branchOffsets + VectorBufferOffset[t2], t3 @@ -1305,9 +1313,9 @@ _llint_op_switch_imm: dispatch(t1) .opSwitchImmNotInt: - btpnz t1, tagTypeNumber, .opSwitchImmSlow # Go slow if it's a double. + btqnz t1, tagTypeNumber, .opSwitchImmSlow # Go slow if it's a double. .opSwitchImmFallThrough: - dispatchInt(16[PB, PC, 8]) + dispatchIntIndirect(2) .opSwitchImmSlow: callSlowPath(_llint_slow_path_switch_imm) @@ -1316,15 +1324,15 @@ _llint_op_switch_imm: _llint_op_switch_char: traceExecution() - loadis 24[PB, PC, 8], t2 - loadis 8[PB, PC, 8], t3 + loadisFromInstruction(3, t2) + loadisFromInstruction(1, t3) loadConstantOrVariable(t2, t1) loadp CodeBlock[cfr], t2 loadp CodeBlock::m_rareData[t2], t2 muli sizeof SimpleJumpTable, t3 loadp CodeBlock::RareData::m_characterSwitchJumpTables + VectorBufferOffset[t2], t2 addp t3, t2 - btpnz t1, tagMask, .opSwitchCharFallThrough + btqnz t1, tagMask, .opSwitchCharFallThrough loadp JSCell::m_structure[t1], t0 bbneq Structure::m_typeInfo + TypeInfo::m_type[t0], StringType, .opSwitchCharFallThrough bineq JSString::m_length[t1], 1, .opSwitchCharFallThrough @@ -1345,7 +1353,7 @@ _llint_op_switch_char: dispatch(t1) .opSwitchCharFallThrough: - dispatchInt(16[PB, PC, 8]) + dispatchIntIndirect(2) .opSwitchOnRope: callSlowPath(_llint_slow_path_switch_char) @@ -1354,9 +1362,10 @@ _llint_op_switch_char: _llint_op_new_func: traceExecution() - btiz 24[PB, PC, 8], .opNewFuncUnchecked - loadis 8[PB, PC, 8], t1 - btpnz [cfr, t1, 8], .opNewFuncDone + loadisFromInstruction(3, t2) + btiz t2, .opNewFuncUnchecked + loadisFromInstruction(1, t1) + btqnz [cfr, t1, 8], .opNewFuncDone .opNewFuncUnchecked: callSlowPath(_llint_slow_path_new_func) .opNewFuncDone: @@ -1365,32 +1374,32 @@ _llint_op_new_func: macro arrayProfileForCall() if VALUE_PROFILER - loadis 24[PB, PC, 8], t3 - loadp ThisArgumentOffset[cfr, t3, 8], t0 - btpnz t0, tagMask, .done + loadisFromInstruction(3, t3) + loadq ThisArgumentOffset[cfr, t3, 8], t0 + btqnz t0, tagMask, .done loadp JSCell::m_structure[t0], t0 - loadp 40[PB, PC, 8], t1 + loadpFromInstruction(5, t1) storep t0, ArrayProfile::m_lastSeenStructure[t1] .done: end end macro doCall(slowPath) - loadis 8[PB, PC, 8], t0 - loadp 32[PB, PC, 8], t1 + loadisFromInstruction(1, t0) + loadpFromInstruction(4, t1) loadp LLIntCallLinkInfo::callee[t1], t2 loadConstantOrVariable(t0, t3) - bpneq t3, t2, .opCallSlow - loadis 24[PB, PC, 8], t3 + bqneq t3, t2, .opCallSlow + loadisFromInstruction(3, t3) addi 6, PC lshifti 3, t3 addp cfr, t3 loadp JSFunction::m_scope[t2], t0 - storep t2, Callee[t3] - storep t0, ScopeChain[t3] - loadis 16 - 48[PB, PC, 8], t2 + storeq t2, Callee[t3] + storeq t0, ScopeChain[t3] + loadisFromInstruction(-4, t2) storei PC, ArgumentCount + TagOffset[cfr] - storep cfr, CallerFrame[t3] + storeq cfr, CallerFrame[t3] storei t2, ArgumentCount + PayloadOffset[t3] move t3, cfr callTargetFunction(t1) @@ -1402,8 +1411,8 @@ end _llint_op_tear_off_activation: traceExecution() - loadis 8[PB, PC, 8], t0 - btpz [cfr, t0, 8], .opTearOffActivationNotCreated + loadisFromInstruction(1, t0) + btqz [cfr, t0, 8], .opTearOffActivationNotCreated callSlowPath(_llint_slow_path_tear_off_activation) .opTearOffActivationNotCreated: dispatch(2) @@ -1411,9 +1420,9 @@ _llint_op_tear_off_activation: _llint_op_tear_off_arguments: traceExecution() - loadis 8[PB, PC, 8], t0 + loadisFromInstruction(1, t0) subi 1, t0 # Get the unmodifiedArgumentsRegister - btpz [cfr, t0, 8], .opTearOffArgumentsNotCreated + btqz [cfr, t0, 8], .opTearOffArgumentsNotCreated callSlowPath(_llint_slow_path_tear_off_arguments) .opTearOffArgumentsNotCreated: dispatch(3) @@ -1422,15 +1431,15 @@ _llint_op_tear_off_arguments: _llint_op_ret: traceExecution() checkSwitchToJITForEpilogue() - loadis 8[PB, PC, 8], t2 + loadisFromInstruction(1, t2) loadConstantOrVariable(t2, t0) doReturn() _llint_op_call_put_result: - loadis 8[PB, PC, 8], t2 - loadp 16[PB, PC, 8], t3 - storep t0, [cfr, t2, 8] + loadisFromInstruction(1, t2) + loadpFromInstruction(2, t3) + storeq t0, [cfr, t2, 8] valueProfile(t0, t3) traceExecution() dispatch(3) @@ -1439,29 +1448,29 @@ _llint_op_call_put_result: _llint_op_ret_object_or_this: traceExecution() checkSwitchToJITForEpilogue() - loadis 8[PB, PC, 8], t2 + loadisFromInstruction(1, t2) loadConstantOrVariable(t2, t0) - btpnz t0, tagMask, .opRetObjectOrThisNotObject + btqnz t0, tagMask, .opRetObjectOrThisNotObject loadp JSCell::m_structure[t0], t2 bbb Structure::m_typeInfo + TypeInfo::m_type[t2], ObjectType, .opRetObjectOrThisNotObject doReturn() .opRetObjectOrThisNotObject: - loadis 16[PB, PC, 8], t2 + loadisFromInstruction(2, t2) loadConstantOrVariable(t2, t0) doReturn() _llint_op_to_primitive: traceExecution() - loadis 16[PB, PC, 8], t2 - loadis 8[PB, PC, 8], t3 + loadisFromInstruction(2, t2) + loadisFromInstruction(1, t3) loadConstantOrVariable(t2, t0) - btpnz t0, tagMask, .opToPrimitiveIsImm + btqnz t0, tagMask, .opToPrimitiveIsImm loadp JSCell::m_structure[t0], t2 bbneq Structure::m_typeInfo + TypeInfo::m_type[t2], StringType, .opToPrimitiveSlowCase .opToPrimitiveIsImm: - storep t0, [cfr, t3, 8] + storeq t0, [cfr, t3, 8] dispatch(3) .opToPrimitiveSlowCase: @@ -1471,38 +1480,38 @@ _llint_op_to_primitive: _llint_op_next_pname: traceExecution() - loadis 24[PB, PC, 8], t1 - loadis 32[PB, PC, 8], t2 + loadisFromInstruction(3, t1) + loadisFromInstruction(4, t2) assertNotConstant(t1) assertNotConstant(t2) loadi PayloadOffset[cfr, t1, 8], t0 bieq t0, PayloadOffset[cfr, t2, 8], .opNextPnameEnd - loadis 40[PB, PC, 8], t2 + loadisFromInstruction(5, t2) assertNotConstant(t2) loadp [cfr, t2, 8], t2 loadp JSPropertyNameIterator::m_jsStrings[t2], t3 - loadp [t3, t0, 8], t3 + loadq [t3, t0, 8], t3 addi 1, t0 storei t0, PayloadOffset[cfr, t1, 8] - loadis 8[PB, PC, 8], t1 - storep t3, [cfr, t1, 8] - loadis 16[PB, PC, 8], t3 + loadisFromInstruction(1, t1) + storeq t3, [cfr, t1, 8] + loadisFromInstruction(2, t3) assertNotConstant(t3) - loadp [cfr, t3, 8], t3 + loadq [cfr, t3, 8], t3 loadp JSCell::m_structure[t3], t1 bpneq t1, JSPropertyNameIterator::m_cachedStructure[t2], .opNextPnameSlow loadp JSPropertyNameIterator::m_cachedPrototypeChain[t2], t0 loadp StructureChain::m_vector[t0], t0 btpz [t0], .opNextPnameTarget .opNextPnameCheckPrototypeLoop: - bpeq Structure::m_prototype[t1], ValueNull, .opNextPnameSlow - loadp Structure::m_prototype[t1], t2 + bqeq Structure::m_prototype[t1], ValueNull, .opNextPnameSlow + loadq Structure::m_prototype[t1], t2 loadp JSCell::m_structure[t2], t1 bpneq t1, [t0], .opNextPnameSlow addp 8, t0 btpnz [t0], .opNextPnameCheckPrototypeLoop .opNextPnameTarget: - dispatchInt(48[PB, PC, 8]) + dispatchIntIndirect(6) .opNextPnameEnd: dispatch(7) @@ -1525,11 +1534,11 @@ _llint_op_catch: loadp JITStackFrame::globalData[sp], t3 loadp JSGlobalData::targetInterpreterPCForThrow[t3], PC subp PB, PC - urshiftp 3, PC - loadp JSGlobalData::exception[t3], t0 - storep 0, JSGlobalData::exception[t3] - loadis 8[PB, PC, 8], t2 - storep t0, [cfr, t2, 8] + rshiftp 3, PC + loadq JSGlobalData::exception[t3], t0 + storeq 0, JSGlobalData::exception[t3] + loadisFromInstruction(1, t2) + storeq t0, [cfr, t2, 8] traceExecution() dispatch(2) @@ -1537,9 +1546,9 @@ _llint_op_catch: _llint_op_end: traceExecution() checkSwitchToJITForEpilogue() - loadis 8[PB, PC, 8], t0 + loadisFromInstruction(1, t0) assertNotConstant(t0) - loadp [cfr, t0, 8], t0 + loadq [cfr, t0, 8], t0 doReturn() @@ -1565,8 +1574,8 @@ macro nativeCallTrampoline(executableOffsetToFunction) loadp JITStackFrame::globalData + 8[sp], t0 storep cfr, JSGlobalData::topCallFrame[t0] loadp CallerFrame[cfr], t0 - loadp ScopeChain[t0], t1 - storep t1, ScopeChain[cfr] + loadq ScopeChain[t0], t1 + storeq t1, ScopeChain[cfr] peek 0, t1 storep t1, ReturnPC[cfr] move cfr, t5 # t5 = rdi @@ -1601,7 +1610,7 @@ macro nativeCallTrampoline(executableOffsetToFunction) error end - btpnz JSGlobalData::exception[t3], .exception + btqnz JSGlobalData::exception[t3], .exception ret .exception: preserveReturnAddressAfterCall(t1) |