Lines Matching defs:eax
49 static Register registers[] = { eax };
59 static Register registers[] = { eax, ebx, ecx };
70 static Register registers[] = { eax, ebx, ecx, edx };
122 static Register registers[] = { edx, ecx, eax };
133 static Register registers[] = { eax, ebx };
146 // eax -- number of arguments
154 descriptor->stack_parameter_count_ = &eax;
169 // eax -- number of arguments
176 descriptor->stack_parameter_count_ = &eax;
231 static Register registers[] = { eax };
243 static Register registers[] = { eax };
256 static Register registers[] = { edx, ecx, eax };
267 static Register registers[] = { eax, ebx, ecx, edx };
289 eax.is(descriptor->register_params_[param_count - 1]));
308 __ Allocate(JSFunction::kSize, eax, ebx, ecx, &gc, TAG_OBJECT);
322 __ mov(FieldOperand(eax, JSObject::kMapOffset), ebx);
328 __ mov(FieldOperand(eax, JSObject::kPropertiesOffset), ebx);
329 __ mov(FieldOperand(eax, JSObject::kElementsOffset), ebx);
330 __ mov(FieldOperand(eax, JSFunction::kPrototypeOrInitialMapOffset),
332 __ mov(FieldOperand(eax, JSFunction::kSharedFunctionInfoOffset), edx);
333 __ mov(FieldOperand(eax, JSFunction::kContextOffset), esi);
334 __ mov(FieldOperand(eax, JSFunction::kLiteralsOffset), ebx);
347 __ mov(FieldOperand(eax, JSFunction::kNextFunctionLinkOffset),
351 __ mov(FieldOperand(eax, JSFunction::kCodeEntryOffset), edx);
390 __ mov(FieldOperand(eax, JSFunction::kCodeEntryOffset), edx);
395 __ mov(FieldOperand(eax, JSFunction::kNextFunctionLinkOffset), edx);
396 // No need for write barrier as JSFunction (eax) is in the new space.
398 __ mov(ContextOperand(ecx, Context::OPTIMIZED_FUNCTIONS_LIST), eax);
399 // Store JSFunction (eax) into edx before issuing write barrier as
401 __ mov(edx, eax);
434 eax, ebx, ecx, &gc, TAG_OBJECT);
441 __ mov(FieldOperand(eax, HeapObject::kMapOffset),
443 __ mov(FieldOperand(eax, Context::kLengthOffset),
448 __ mov(Operand(eax, Context::SlotOffset(Context::CLOSURE_INDEX)), ecx);
449 __ mov(Operand(eax
450 __ mov(Operand(eax, Context::SlotOffset(Context::EXTENSION_INDEX)), ebx);
454 __ mov(Operand(eax, Context::SlotOffset(Context::GLOBAL_OBJECT_INDEX)), ebx);
459 __ mov(Operand(eax, Context::SlotOffset(i)), ebx);
463 __ mov(esi, eax);
481 __ Allocate(FixedArray::SizeFor(length), eax, ebx, ecx, &gc, TAG_OBJECT);
491 __ mov(FieldOperand(eax, HeapObject::kMapOffset),
493 __ mov(FieldOperand(eax, Context::kLengthOffset),
512 __ mov(ContextOperand(eax, Context::CLOSURE_INDEX), ecx);
513 __ mov(ContextOperand(eax, Context::PREVIOUS_INDEX), esi);
514 __ mov(ContextOperand(eax, Context::EXTENSION_INDEX), ebx);
518 __ mov(ContextOperand(eax, Context::GLOBAL_OBJECT_INDEX), ebx);
522 __ mov(ContextOperand(eax, Context::MIN_CONTEXT_SLOTS),
527 __ mov(ContextOperand(eax, i + Context::MIN_CONTEXT_SLOTS), ebx);
532 __ mov(esi, eax);
591 // operand_1 on TOS+1 or in edx, operand_2 on TOS+2 or in eax.
598 // Expects operands in edx, eax.
602 // operand_1 in eax, operand_2 in edx; falls through on float
608 // Takes the operands in edx and eax and loads them as integers in eax
617 // into xmm0 and xmm1. Operands are in edx and eax.
623 // either operand is not a number. Operands are in edx and eax.
628 // Expects operands in edx, eax.
666 // Since we must use ecx for shifts below, use some other register (eax)
668 Register result_reg = final_result_reg.is(ecx) ? eax : final_result_reg;
672 Register save_reg = final_result_reg.is(ecx) ? eax : ecx;
802 __ push(eax);
839 __ pop(eax);
850 // 1. Move arguments into edx, eax except for DIV and MOD, which need the
851 // dividend in eax and edx free for the division. Use eax, ebx for those.
854 Register right = eax;
856 left = eax;
858 __ mov(ebx, eax);
859 __ mov(eax, edx);
870 // Perform the operation into eax and smi check the result. Preserve
871 // eax in case the result is not a smi.
892 // Move the right operand into ecx for the shift operation, use eax
909 // eax and check the result if necessary.
918 ASSERT(right.is(eax));
923 ASSERT(right.is(eax));
936 // Tag the result and store it in register eax.
938 __ mov(eax, left);
947 // Tag the result and store it in register eax.
949 __ mov(eax, left);
966 // Tag the result and store it in register eax.
968 __ mov(eax, left);
972 ASSERT(right.is(eax));
980 __ mov(eax, left);
1005 // Sign extend left into edx:eax.
1006 ASSERT(left.is(eax));
1008 // Divide edx:eax by right.
1014 __ cmp(eax, 0x40000000);
1017 __ NegativeZeroTest(eax, combined, &use_fp_on_smis);
1021 // Tag the result and store it in register eax.
1022 __ SmiTag(eax);
1030 // Sign extend left into edx:eax.
1031 ASSERT(left.is(eax));
1033 // Divide edx:eax by right.
1037 // Move remainder to register eax.
1038 __ mov(eax, edx);
1045 // 5. Emit return of result in eax. Some operations have registers pushed.
1090 // division. They should be in eax, ebx for jump to not_smi.
1091 __ mov(eax, edi);
1106 // number in eax.
1107 __ AllocateHeapNumber(eax, ecx, ebx, slow);
1115 __ fstp_d(FieldOperand(eax, HeapNumber::kValueOffset));
1121 __ movdbl(FieldOperand(eax, HeapNumber::kValueOffset), xmm0);
1125 __ fstp_d(FieldOperand(eax, HeapNumber::kValueOffset));
1138 // Restore arguments to edx, eax.
1156 __ mov(eax, right);
1184 __ mov(eax, ecx);
1195 // edx and eax.
1203 // Right operand is saved in ecx and eax was destroyed by the smi
1205 __ mov(eax, ecx);
1210 // Operands are in eax, ebx at this point.
1211 __ mov(edx, eax);
1212 __ mov(eax, ebx);
1246 __ cmp(eax, Immediate(Smi::FromInt(fixed_right_arg_value())));
1305 __ push(eax);
1321 Register right = eax;
1350 // eax: right operand (tagged)
1352 // eax: result (tagged)
1377 __ JumpIfNotSmi(eax, ¬_int32);
1405 __ movdbl(FieldOperand(eax, HeapNumber::kValueOffset), xmm0);
1431 __ fstp_d(FieldOperand(eax, HeapNumber::kValueOffset));
1460 case Token::BIT_OR: __ or_(eax, ecx); break;
1461 case Token::BIT_AND: __ and_(eax, ecx); break;
1462 case Token::BIT_XOR: __ xor_(eax, ecx); break;
1463 case Token::SAR: __ sar_cl(eax); break;
1464 case Token::SHL: __ shl_cl(eax); break;
1465 case Token::SHR: __ shr_cl(eax); break;
1470 __ test(eax, Immediate(0xc0000000));
1474 __ cmp(eax, 0xc0000000);
1478 __ SmiTag(eax);
1486 __ mov(ebx, eax); // ebx: result
1493 __ mov(eax, Operand(esp, mode_ == OVERWRITE_RIGHT ?
1495 __ JumpIfNotSmi(eax, &skip_allocation, Label::kNear);
1498 __ AllocateHeapNumber(eax, ecx, edx, &call_runtime);
1507 __ movdbl(FieldOperand(eax, HeapNumber::kValueOffset), xmm0);
1511 __ fstp_d(FieldOperand(eax, HeapNumber::kValueOffset));
1551 __ push(eax);
1578 __ cmp(eax, factory->undefined_value());
1581 __ xor_(eax, eax);
1583 __ mov(eax, Immediate(factory->nan_value()));
1614 __ JumpIfNotSmi(eax, ¬_floats);
1634 __ movdbl(FieldOperand(eax, HeapNumber::kValueOffset), xmm0);
1652 __ fstp_d(FieldOperand(eax, HeapNumber::kValueOffset));
1684 case Token::BIT_OR: __ or_(eax, ecx); break;
1685 case Token::BIT_AND: __ and_(eax, ecx); break;
1686 case Token::BIT_XOR: __ xor_(eax, ecx); break;
1687 case Token::SAR: __ sar_cl(eax); break;
1688 case Token::SHL: __ shl_cl(eax); break;
1689 case Token::SHR: __ shr_cl(eax); break;
1694 __ test(eax, Immediate(0xc0000000));
1698 __ cmp(eax, 0xc0000000);
1702 __ SmiTag(eax);
1710 __ mov(ebx, eax); // ebx: result
1717 __ mov(eax, Operand(esp, mode_ == OVERWRITE_RIGHT ?
1719 __ JumpIfNotSmi(eax, &skip_allocation, Label::kNear);
1722 __ AllocateHeapNumber(eax, ecx, edx, &call_runtime);
1731 __ movdbl(FieldOperand(eax, HeapNumber::kValueOffset), xmm0);
1735 __ fstp_d(FieldOperand(eax, HeapNumber::kValueOffset));
1773 __ push(eax);
1827 __ movdbl(FieldOperand(eax, HeapNumber::kValueOffset), xmm0);
1845 __ fstp_d(FieldOperand(eax, HeapNumber::kValueOffset));
1872 case Token::BIT_OR: __ or_(eax, ecx); break;
1873 case Token::BIT_AND: __ and_(eax, ecx); break;
1874 case Token::BIT_XOR: __ xor_(eax, ecx); break;
1875 case Token::SAR: __ sar_cl(eax); break;
1876 case Token::SHL: __ shl_cl(eax); break;
1877 case Token::SHR: __ shr_cl(eax); break;
1882 __ test(eax, Immediate(0xc0000000));
1886 __ cmp(eax, 0xc0000000);
1890 __ SmiTag(eax);
1898 __ mov(ebx, eax); // ebx: result
1905 __ mov(eax, Operand(esp, mode_ == OVERWRITE_RIGHT ?
1907 __ JumpIfNotSmi(eax, &skip_allocation, Label::kNear);
1910 __ AllocateHeapNumber(eax, ecx, edx, &call_runtime);
1919 __ movdbl(FieldOperand(eax, HeapNumber::kValueOffset), xmm0);
1923 __ fstp_d(FieldOperand(eax, HeapNumber::kValueOffset));
1959 __ push(eax);
1972 Register right = eax;
2009 // Allocate a heap number for the result. Keep eax and edx intact
2017 __ mov(eax, edx);
2021 // If the argument in eax is already an object, we skip the
2023 __ JumpIfNotSmi(eax, &skip_allocation, Label::kNear);
2026 // Allocate a heap number for the result. Keep eax and edx intact
2029 // Now eax can be overwritten losing one of the arguments as we are
2031 __ mov(eax, ebx);
2042 __ push(eax);
2053 // eax: tagged double result.
2066 // Test that eax is a number.
2069 __ mov(eax, Operand(esp, kPointerSize));
2070 __ JumpIfNotSmi(eax, &input_not_smi, Label::kNear);
2074 __ sar(eax, 1);
2076 __ mov(Operand(esp, 0), eax);
2084 __ mov(ebx, FieldOperand(eax, HeapObject::kMapOffset));
2090 __ fld_d(FieldOperand(eax, HeapNumber::kValueOffset));
2091 __ mov(edx, FieldOperand(eax, HeapNumber::kExponentOffset));
2092 __ mov(ebx, FieldOperand(eax, HeapNumber::kMantissaOffset));
2114 __ mov(eax, ecx);
2115 __ sar(eax, 16);
2116 __ xor_(ecx, eax);
2117 __ mov(eax, ecx);
2118 __ sar(eax, 8);
2119 __ xor_(ecx, eax);
2130 __ mov(eax, Immediate(cache_array));
2133 __ mov(eax, Operand(eax, cache_array_index));
2134 // Eax points to the cache for the type type_.
2136 __ test(eax, eax);
2152 // Find the address of the ecx'th entry in the cache, i.e., &eax[ecx*12].
2154 __ lea(ecx, Operand(eax, ecx, times_4, 0));
2164 __ mov(eax, Operand(ecx, 2 * kIntSize));
2170 __ movdbl(xmm1, FieldOperand(eax, HeapNumber::kValueOffset));
2180 __ AllocateHeapNumber(eax, edi, no_reg, &runtime_call_clear_stack);
2183 __ AllocateHeapNumber(eax, edi, no_reg, &skip_cache);
2192 __ mov(Operand(ecx, 2 * kIntSize), eax);
2193 __ fstp_d(FieldOperand(eax, HeapNumber::kValueOffset));
2198 __ movdbl(xmm1, FieldOperand(eax, HeapNumber::kValueOffset));
2233 __ AllocateHeapNumber(eax, edi, no_reg, &skip_cache);
2234 __ movdbl(FieldOperand(eax, HeapNumber::kValueOffset), xmm1);
2237 __ push(eax);
2240 __ movdbl(xmm1, FieldOperand(eax, HeapNumber::kValueOffset));
2264 // Address of result (a newly allocated HeapNumber) may be in eax.
2296 __ mov(edi, eax); // Save eax before using fnstsw_ax.
2306 __ test(eax, Immediate(5));
2319 __ test(eax, Immediate(0x400 /* C2 */));
2327 __ mov(eax, edi); // Restore eax (allocated HeapNumber pointer).
2357 // Input: edx, eax are the left and right objects of a bit op.
2358 // Output: eax, ecx are left and right integers for a bit op.
2405 // Here edx has the untagged integer, eax has a Smi or a heap number.
2410 __ JumpIfNotSmi(eax, conversion_failure);
2412 __ JumpIfNotSmi(eax, &arg2_is_object, Label::kNear);
2415 __ SmiUntag(eax);
2416 __ mov(ecx, eax);
2421 __ cmp(eax, factory->undefined_value());
2427 __ mov(ebx, FieldOperand(eax, HeapObject::kMapOffset));
2430 // Get the untagged integer version of the eax heap number in ecx.
2434 ConvertHeapNumberToInt32(masm, eax, conversion_failure);
2436 DoubleToIStub stub(eax, ecx, HeapNumber::kValueOffset - kHeapObjectTag,
2442 __ mov(eax, edx);
2471 // Load operand in eax into xmm1.
2472 __ JumpIfSmi(eax, &load_smi_eax, Label::kNear);
2473 __ movdbl(xmm1, FieldOperand(eax, HeapNumber::kValueOffset));
2483 __ SmiUntag(eax); // Untag smi before converting to float.
2484 __ cvtsi2sd(xmm1, eax);
2485 __ SmiTag(eax); // Retag smi for heap number overwriting test.
2501 // Load operand in eax into xmm1, or branch to not_numbers.
2502 __ JumpIfSmi(eax, &load_smi_eax, Label::kNear);
2503 __ cmp(FieldOperand(eax, HeapObject::kMapOffset), factory->heap_number_map());
2505 __ jmp(not_numbers); // Argument in eax is not a number.
2512 __ SmiUntag(eax); // Untag smi before converting to float.
2513 __ cvtsi2sd(xmm1, eax);
2514 __ SmiTag(eax); // Retag smi for heap number overwriting test.
2517 __ movdbl(xmm1, FieldOperand(eax, HeapNumber::kValueOffset));
2525 const Register right = eax;
2568 __ mov(scratch, eax);
2596 const Register right = eax;
2624 __ JumpIfSmi(eax, &done, Label::kNear);
2625 __ mov(scratch, FieldOperand(eax, HeapObject::kMapOffset));
2627 __ j(not_equal, non_float); // argument in eax is not a number -> NaN
2637 const Register exponent = eax;
2805 __ test_b(eax, 0x5F); // We check for all but precision exception.
2874 __ AllocateHeapNumber(eax, scratch, base, &call_runtime);
2875 __ movdbl(FieldOperand(eax, HeapNumber::kValueOffset), double_result);
2915 StubCompiler::GenerateLoadFunctionPrototype(masm, edx, eax, ebx, &miss);
2935 StubCompiler::GenerateLoadStringLength(masm, edx, eax, ebx, &miss,
2945 // -- eax : value
2959 Register value = eax;
3009 // The key is in edx and the parameter count is in eax.
3028 // through register eax. Use unsigned comparison to get negative
3030 __ cmp(edx, eax);
3036 __ lea(ebx, Operand(ebp, eax, times_2, 0));
3038 __ mov(eax, Operand(ebx, edx, times_2, kDisplacement));
3054 __ mov(eax, Operand(ebx, edx, times_2, kDisplacement));
3155 __ Allocate(ebx, eax, edx, edi, &runtime, TAG_OBJECT);
3157 // eax = address of new object(s) (tagged)
3178 // eax = address of new object (tagged)
3188 __ mov(FieldOperand(eax, i), edx);
3194 __ mov(FieldOperand(eax, JSObject::kHeaderSize +
3200 __ mov(FieldOperand(eax, JSObject::kHeaderSize +
3207 __ lea(edi, Operand(eax, Heap::kArgumentsObjectSize));
3208 __ mov(FieldOperand(eax, JSObject::kElementsOffset), edi);
3210 // eax = address of new object (tagged)
3218 __ push(eax);
3227 __ lea(eax, Operand(ebx, reinterpret_cast<intptr_t>(Smi::FromInt(2))));
3228 __ mov(FieldOperand(edi, FixedArray::kLengthOffset), eax);
3230 __ lea(eax, Operand(edi, ebx, times_2, kParameterMapHeaderSize));
3231 __ mov(FieldOperand(edi, FixedArray::kHeaderSize + 1 * kPointerSize), eax);
3243 __ mov(eax, Operand(esp, 2 * kPointerSize));
3246 __ sub(ebx, eax);
3249 __ lea(edi, Operand(edi, eax, times_2, kParameterMapHeaderSize));
3250 // eax = loop variable (tagged)
3263 __ sub(eax, Immediate(Smi::FromInt(1)));
3264 __ mov(FieldOperand(edx, eax, times_2, kParameterMapHeaderSize), ebx);
3265 __ mov(FieldOperand(edi, eax, times_2, FixedArray::kHeaderSize), ecx);
3268 __ test(eax, eax);
3294 __ mov(eax, Operand(edx, 0));
3295 __ mov(FieldOperand(edi, ebx, times_2, FixedArray::kHeaderSize), eax);
3303 __ pop(eax); // Address of arguments object.
3311 __ pop(eax); // Remove saved parameter count.
3355 __ Allocate(ecx, eax, edx, ebx, &runtime, TAG_OBJECT);
3367 __ mov(FieldOperand(eax, i), ebx);
3373 __ mov(FieldOperand(eax, JSObject::kHeaderSize +
3387 __ lea(edi, Operand(eax, Heap::kArgumentsObjectSizeStrict));
3388 __ mov(FieldOperand(eax, JSObject::kElementsOffset), edi);
3450 __ mov(eax, Operand(esp, kJSRegExpOffset));
3452 __ JumpIfSmi(eax, &runtime);
3453 __ CmpObjectType(eax, JS_REGEXP_TYPE, ecx);
3457 __ mov(ecx, FieldOperand(eax, JSRegExp::kDataOffset));
3485 __ mov(eax, Operand(esp, kSubjectOffset));
3486 __ JumpIfSmi(eax, &runtime);
3487 __ mov(edx, eax); // Make a copy of the original subject string.
3488 __ mov(ebx, FieldOperand(eax, HeapObject::kMapOffset));
3491 // eax: subject string
3547 __ cmp(FieldOperand(eax, ConsString::kSecondOffset), factory->empty_string());
3549 __ mov(eax, FieldOperand(eax, ConsString::kFirstOffset));
3551 __ mov(ebx, FieldOperand(eax, HeapObject::kMapOffset));
3565 // eax: sequential subject string (or look-alike, external string)
3571 // to use edx instead of eax here because it might have been only made to
3588 // eax: subject string
3634 // eax: underlying subject string
3653 __ lea(ecx, FieldOperand(eax, esi, times_1, SeqOneByteString::kHeaderSize));
3655 __ lea(ecx, FieldOperand(eax, ebx, times_1, SeqOneByteString::kHeaderSize));
3662 __ lea(ecx, FieldOperand(eax, esi, times_1, SeqTwoByteString::kHeaderSize));
3664 __ lea(ecx, FieldOperand(eax, ebx, times_2, SeqTwoByteString::kHeaderSize));
3678 __ cmp(eax, 1);
3683 __ cmp(eax, NativeRegExpMacroAssembler::FAILURE);
3685 __ cmp(eax, NativeRegExpMacroAssembler::EXCEPTION);
3695 __ mov(eax, Operand::StaticVariable(pending_exception));
3696 __ cmp(edx, eax);
3705 __ cmp(eax, factory->termination_exception());
3710 __ Throw(eax);
3713 __ ThrowUncatchable(eax);
3717 __ mov(eax, factory->null_value());
3722 __ mov(eax, Operand(esp, kJSRegExpOffset));
3723 __ mov(ecx, FieldOperand(eax, JSRegExp::kDataOffset));
3733 __ mov(eax, Operand(esp, kLastMatchInfoOffset));
3734 __ JumpIfSmi(eax, &runtime);
3735 __ CmpObjectType(eax, JS_ARRAY_TYPE, ebx);
3738 __ mov(ebx, FieldOperand(eax, JSArray::kElementsOffset));
3739 __ mov(eax, FieldOperand(ebx, HeapObject::kMapOffset));
3740 __ cmp(eax, factory->fixed_array_map());
3744 __ mov(eax, FieldOperand(ebx, FixedArray::kLengthOffset));
3745 __ SmiUntag(eax);
3746 __ sub(eax, Immediate(RegExpImpl::kLastMatchOverhead));
3747 __ cmp(edx, eax);
3757 __ mov(eax, Operand(esp, kSubjectOffset));
3758 __ mov(ecx, eax);
3759 __ mov(FieldOperand(ebx, RegExpImpl::kLastSubjectOffset), eax);
3762 eax,
3765 __ mov(eax, ecx);
3766 __ mov(FieldOperand(ebx, RegExpImpl::kLastInputOffset), eax);
3769 eax,
3800 __ mov(eax, Operand(esp, kLastMatchInfoOffset));
3816 __ mov(ebx, FieldOperand(eax, HeapObject::kMapOffset));
3824 __ mov(eax, FieldOperand(eax, ExternalString::kResourceDataOffset));
3827 __ sub(eax, Immediate(SeqTwoByteString::kHeaderSize - kHeapObjectTag));
3833 // eax: sequential subject string (or look-alike, external string)
3839 // to use edx instead of eax here because it might have been only made to
3858 __ mov(edi, FieldOperand(eax, SlicedString::kOffsetOffset));
3859 __ mov(eax, FieldOperand(eax, SlicedString::kParentOffset));
3883 eax, // Out: Start of allocation (tagged).
3888 // eax: Start of allocated area, object-tagged.
3897 __ lea(ebx, Operand(eax, JSRegExpResult::kSize));
3899 __ mov(FieldOperand(eax, JSObject::kElementsOffset), ebx);
3900 __ mov(FieldOperand(eax, JSObject::kPropertiesOffset), ecx);
3902 __ mov(FieldOperand(eax, HeapObject::kMapOffset), edx);
3906 __ mov(FieldOperand(eax, JSRegExpResult::kInputOffset), ecx);
3908 __ mov(FieldOperand(eax, JSRegExpResult::kIndexOffset), ecx);
3910 __ mov(FieldOperand(eax, JSArray::kLengthOffset), ecx);
3913 // eax: JSArray.
3927 // eax: JSArray.
4038 GenerateLookupNumberStringCache(masm, ebx, eax, ecx, edx, &runtime);
4093 CheckInputType(masm, eax, right_, &miss);
4098 __ or_(ecx, eax);
4100 __ sub(edx, eax); // Return on the result of the subtraction.
4104 __ mov(eax, edx);
4116 __ cmp(eax, edx);
4125 __ Set(eax, Immediate(Smi::FromInt(NegativeComparisonResult(cc))));
4137 __ CmpObjectType(eax, FIRST_SPEC_OBJECT_TYPE, ecx);
4140 __ Set(eax, Immediate(Smi::FromInt(EQUAL)));
4161 __ and_(ecx, eax);
4168 // ecx still holds eax & kSmiTag, which is either zero or one.
4171 __ xor_(ebx, eax);
4172 __ and_(ebx, ecx); // ebx holds either 0 or eax ^ edx.
4173 __ xor_(ebx, eax);
4174 // if eax was smi, ebx is now edx, else eax.
4182 __ mov(eax, ebx);
4194 __ CmpObjectType(eax, FIRST_SPEC_OBJECT_TYPE, ecx);
4197 // Return non-zero (eax is not zero)
4233 __ mov(eax, 0); // equal
4235 __ cmov(above, eax, ecx);
4237 __ cmov(below, eax, ecx);
4242 FloatingPointHelper::LoadFloatOperand(masm, eax);
4254 __ Set(eax, Immediate(0));
4258 __ mov(eax, Immediate(Smi::FromInt(-1)));
4262 __ mov(eax, Immediate(Smi::FromInt(1)));
4271 __ mov(eax, Immediate(Smi::FromInt(1)));
4273 __ mov(eax, Immediate(Smi::FromInt(-1)));
4283 BranchIfNotInternalizedString(masm, &check_for_strings, eax, ecx);
4287 // are internalized they aren't equal. Register eax already holds a
4294 __ JumpIfNotBothSequentialAsciiStrings(edx, eax, ecx, ebx,
4301 eax,
4307 eax,
4328 __ lea(ecx, Operand(eax, edx, times_1, 0));
4331 __ CmpObjectType(eax, FIRST_SPEC_OBJECT_TYPE, ecx);
4346 __ Set(eax, Immediate(EQUAL));
4348 // Return non-equal by returning the non-zero object pointer in eax,
4357 __ push(eax);
4454 __ SmiTag(eax);
4455 __ push(eax);
4464 __ pop(eax);
4465 __ SmiUntag(eax);
4490 __ mov(eax, Operand(esp, (argc_ + 1) * kPointerSize));
4492 __ cmp(eax, isolate->factory()->the_hole_value());
4516 __ cmp(eax, isolate->factory()->the_hole_value());
4546 __ Set(eax, Immediate(argc_ + 1));
4559 __ Set(eax, Immediate(argc_));
4569 // eax : number of arguments
4593 // eax: number of arguments
4605 // Set expected number of arguments to zero (not changing eax).
4677 // eax: result parameter for PerformGC, if any
4684 // Result returned in eax, or eax+edx if result_size_ is 2.
4697 __ mov(Operand(esp, 0 * kPointerSize), eax); // Result.
4713 // Result is in eax or edx:eax - do not destroy these registers!
4723 __ cmp(eax, masm->isolate()->factory()->the_hole_value());
4732 __ lea(ecx, Operand(eax, 1));
4733 // Lower 2 bits of ecx are 0 iff eax has failure tag.
4764 __ test(eax, Immediate(((1 << kFailureTypeTagSize) - 1) << kFailureTagSize));
4768 JumpIfOOM(masm, eax, ecx, throw_out_of_memory_exception);
4771 __ mov(eax, Operand::StaticVariable(pending_exception_address));
4774 JumpIfOOM(masm, eax, ecx, throw_out_of_memory_exception);
4782 __ cmp(eax, masm->isolate()->factory()->termination_exception());
4794 // eax: number of arguments including receiver
4810 // eax: result parameter for PerformGC, if any (setup below)
4839 __ mov(eax, Immediate(reinterpret_cast<int32_t>(failure)));
4854 // Set pending exception and eax to out of memory exception.
4858 JumpIfOOM(masm, eax, ecx, &already_have_failure);
4859 __ mov(eax, reinterpret_cast<int32_t>(Failure::OutOfMemoryException(0x1)));
4861 __ mov(Operand::StaticVariable(pending_exception), eax);
4865 __ ThrowUncatchable(eax);
4868 __ Throw(eax);
4915 __ mov(Operand::StaticVariable(pending_exception), eax);
4916 __ mov(eax, reinterpret_cast<int32_t>(Failure::Exception()));
4982 // b8 XX XX XX XX mov eax, <the hole, patched to either true or false>
4997 Register object = eax; // Object (lhs).
5034 __ LoadRoot(eax, Heap::kInstanceofCacheAnswerRootIndex);
5084 __ mov(eax, Immediate(0));
5085 __ StoreRoot(eax, scratch, Heap::kInstanceofCacheAnswerRootIndex);
5088 __ mov(eax, factory->true_value());
5095 __ mov(Operand(scratch, kDeltaToMovImmediate), eax);
5097 __ Set(eax, Immediate(0));
5104 __ mov(eax, Immediate(Smi::FromInt(1)));
5105 __ StoreRoot(eax, scratch, Heap::kInstanceofCacheAnswerRootIndex);
5108 __ mov(eax, factory->false_value());
5115 __ mov(Operand(scratch, kDeltaToMovImmediate), eax);
5117 __ Set(eax, Immediate(Smi::FromInt(1)));
5133 __ Set(eax, Immediate(Smi::FromInt(1)));
5139 __ Set(eax, Immediate(Smi::FromInt(1)));
5146 __ Set(eax, Immediate(Smi::FromInt(1)));
5170 __ test(eax, eax);
5172 __ mov(eax, factory->false_value());
5175 __ mov(eax, factory->true_value());
5182 Register InstanceofStub::left() { return eax; }
5245 if (!index_.is(eax)) {
5248 __ mov(index_, eax);
5270 if (!result_.is(eax)) {
5271 __ mov(result_, eax);
5317 if (!result_.is(eax)) {
5318 __ mov(result_, eax);
5332 __ mov(eax, Operand(esp, 2 * kPointerSize)); // First argument.
5341 __ JumpIfSmi(eax, &call_runtime);
5342 __ CmpObjectType(eax, FIRST_NONSTRING_TYPE, ebx);
5351 GenerateConvertArgument(masm, 2 * kPointerSize, eax, ebx, ecx, edi,
5362 // eax: first string
5370 // Second string is empty, result is first string which is already in eax.
5375 __ mov(ebx, FieldOperand(eax, String::kLengthOffset));
5380 __ mov(eax, edx);
5385 // eax: first string
5402 __ JumpIfNotBothSequentialAsciiStrings(eax, edx, ebx, ecx, &call_runtime);
5405 __ movzx_b(ebx, FieldOperand(eax, SeqOneByteString::kHeaderSize));
5412 masm, ebx, ecx, eax, edx, edi,
5420 __ mov(eax, Operand(esp, 2 * kPointerSize)); // First argument.
5423 __ movzx_b(ebx, FieldOperand(eax, SeqOneByteString::kHeaderSize));
5427 __ AllocateAsciiString(eax, 2, edi, edx, &call_runtime);
5432 __ mov_w(FieldOperand(eax, SeqOneByteString::kHeaderSize), ebx);
5444 __ mov(edi, FieldOperand(eax, HeapObject::kMapOffset));
5469 __ mov(FieldOperand(ecx, ConsString::kFirstOffset), eax);
5472 eax,
5484 __ mov(FieldOperand(ecx, ConsString::kFirstOffset), eax);
5489 __ mov(eax, ecx);
5499 __ mov(ecx, FieldOperand(eax, HeapObject::kMapOffset));
5514 // eax: first string
5520 __ mov(ecx, FieldOperand(eax, HeapObject::kMapOffset));
5530 __ mov(eax, FieldOperand(eax, ExternalString::kResourceDataOffset));
5534 __ add(eax, Immediate(SeqOneByteString::kHeaderSize - kHeapObjectTag));
5560 __ push(eax);
5572 __ AllocateAsciiString(eax, ebx, ecx, edx, edi, &call_runtime_drop_two);
5573 // eax: result string
5574 __ mov(ecx, eax);
5583 // eax: result string
5594 // eax: result string
5603 // eax: first string - known to be two byte
5609 __ AllocateTwoByteString(eax, ebx, ecx, edx, edi, &call_runtime_drop_two);
5610 // eax: result string
5611 __ mov(ecx, eax);
5620 // eax: result string
5631 // eax: result string
5676 __ push(eax);
5685 __ pop(eax);
5934 if (!result.is(eax)) {
5935 __ mov(eax, result);
6018 __ mov(eax, Operand(esp, 3 * kPointerSize));
6020 __ JumpIfSmi(eax, &runtime);
6021 Condition is_string = masm->IsObjectStringType(eax, ebx, ebx);
6024 // eax: string
6033 __ cmp(ecx, FieldOperand(eax, String::kLengthOffset));
6049 // eax: string
6067 __ cmp(FieldOperand(eax, ConsString::kSecondOffset),
6070 __ mov(edi, FieldOperand(eax, ConsString::kFirstOffset));
6078 __ add(edx, FieldOperand(eax, SlicedString::kOffsetOffset));
6079 __ mov(edi, FieldOperand(eax, SlicedString::kParentOffset));
6087 __ mov(edi, eax);
6110 __ AllocateAsciiSlicedString(eax, ebx, no_reg, &runtime);
6113 __ AllocateTwoByteSlicedString(eax, ebx, no_reg, &runtime);
6115 __ mov(FieldOperand(eax, SlicedString::kLengthOffset), ecx);
6116 __ mov(FieldOperand(eax, SlicedString::kHashFieldOffset),
6118 __ mov(FieldOperand(eax, SlicedString::kParentOffset), edi);
6119 __ mov(FieldOperand(eax, SlicedString::kOffsetOffset), edx);
6158 __ AllocateAsciiString(eax, ecx, ebx, edx, edi, &runtime_drop_two);
6160 // eax: result string
6164 __ mov(edi, eax);
6172 // eax: result string
6184 __ AllocateTwoByteString(eax, ecx, ebx, edx, edi, &runtime_drop_two);
6186 // eax: result string
6190 __ mov(edi, eax);
6202 // eax: result string
6221 // eax: string
6226 eax, edx, ecx, eax, &runtime, &runtime, &runtime, STRING_INDEX_IS_NUMBER);
6246 __ Set(eax, Immediate(Smi::FromInt(NOT_EQUAL)));
6255 __ Set(eax, Immediate(Smi::FromInt(EQUAL)));
6264 __ Set(eax, Immediate(Smi::FromInt(EQUAL)));
6312 __ Set(eax, Immediate(Smi::FromInt(EQUAL)));
6325 __ Set(eax, Immediate(Smi::FromInt(LESS)));
6330 __ Set(eax
6374 __ mov(eax, Operand(esp, 1 * kPointerSize)); // right
6377 __ cmp(edx, eax);
6381 __ Set(eax, Immediate(Smi::FromInt(EQUAL)));
6388 __ JumpIfNotBothSequentialAsciiStrings(edx, eax, ecx, ebx, &runtime);
6395 GenerateCompareFlatAsciiStrings(masm, edx, eax, ecx, ebx, edi);
6408 __ or_(ecx, eax);
6413 __ sub(eax, edx);
6416 __ sub(edx, eax);
6421 __ mov(eax, edx);
6441 __ JumpIfNotSmi(eax, &miss);
6452 __ JumpIfSmi(eax, &right_smi, Label::kNear);
6453 __ cmp(FieldOperand(eax, HeapObject::kMapOffset),
6456 __ movdbl(xmm1, FieldOperand(eax, HeapNumber::kValueOffset));
6459 __ mov(ecx, eax); // Can't clobber eax because we can still jump away.
6484 __ mov(eax, 0); // equal
6486 __ cmov(above, eax, ecx);
6488 __ cmov(below, eax, ecx);
6492 __ and_(ecx, eax);
6495 __ cmp(FieldOperand(eax, HeapObject::kMapOffset),
6511 __ cmp(eax, Immediate(masm->isolate()->factory()->undefined_value()));
6536 Register right = eax;
6560 // Make sure eax is non-zero. At this point input operands are
6562 ASSERT(right.is(eax));
6566 __ Set(eax, Immediate(Smi::FromInt(EQUAL)));
6581 Register right = eax;
6605 // Make sure eax is non-zero. At this point input operands are
6607 ASSERT(right.is(eax));
6611 __ Set(eax, Immediate(Smi::FromInt(EQUAL)));
6628 Register right = eax;
6657 __ Set(eax, Immediate(Smi::FromInt(EQUAL)));
6673 // Make sure eax is non-zero. At this point input operands are
6675 ASSERT(right.is(eax));
6714 __ and_(ecx, eax);
6717 __ CmpObjectType(eax, JS_OBJECT_TYPE, ecx);
6723 __ sub(eax, edx);
6734 __ and_(ecx, eax);
6737 __ mov(ecx, FieldOperand(eax, HeapObject::kMapOffset));
6744 __ sub(eax, edx);
6758 __ push(edx); // Preserve edx and eax.
6759 __ push(eax);
6761 __ push(eax);
6765 __ lea(edi, FieldOperand(eax, Code::kHeaderSize));
6766 __ pop(eax);
6997 { REG(ebx), REG(eax), REG(edi), EMIT_REMEMBERED_SET },
7022 { REG(eax), REG(edx), REG(esi), EMIT_REMEMBERED_SET},
7023 { REG(edx), REG(eax), REG(edi), EMIT_REMEMBERED_SET},
7025 { REG(ebx), REG(eax), REG(ecx), EMIT_REMEMBERED_SET},
7029 { REG(ecx), REG(eax), REG(ebx), EMIT_REMEMBERED_SET},
7285 // -- eax : element value to store
7308 __ JumpIfSmi(eax, &smi_element);
7319 __ push(eax);
7336 __ mov(Operand(ecx, 0), eax);
7338 __ RecordWrite(ebx, ecx, eax,
7349 FixedArrayBase::kHeaderSize), eax);
7357 __ StoreNumberToDoubleElements(eax,
7400 __ push(eax);
7405 __ lea(eax, Operand(esp, (kNumSavedRegisters + 1) * kPointerSize));
7406 __ push(eax);
7410 __ mov(eax, Operand(esp, (kNumSavedRegisters + 1) * kPointerSize));
7411 __ sub(eax, Immediate(Assembler::kCallInstructionLength));
7412 __ push(eax);
7423 __ pop(eax);
7451 // eax - number of arguments
7554 // -- eax : argc (only if argument_count_ == ANY)
7610 __ test(eax, eax);
7615 __ cmp(eax, 1);
7638 __ test(eax, eax);
7644 __ cmp(eax, 1);
7671 // -- eax : argc