Home | History | Annotate | Download | only in ia32

Lines Matching defs:eax

46   // The ToNumber stub takes one argument in eax.
48 __ JumpIfNotSmi(eax, &check_heap_number, Label::kNear);
52 __ mov(ebx, FieldOperand(eax, HeapObject::kMapOffset));
60 __ push(eax);
70 __ AllocateInNewSpace(JSFunction::kSize, eax, ebx, ecx, &gc, TAG_OBJECT);
84 __ mov(FieldOperand(eax, JSObject::kMapOffset), ecx);
90 __ mov(FieldOperand(eax, JSObject::kPropertiesOffset), ebx);
91 __ mov(FieldOperand(eax, JSObject::kElementsOffset), ebx);
92 __ mov(FieldOperand(eax, JSFunction::kPrototypeOrInitialMapOffset),
94 __ mov(FieldOperand(eax, JSFunction::kSharedFunctionInfoOffset), edx);
95 __ mov(FieldOperand(eax, JSFunction::kContextOffset), esi);
96 __ mov(FieldOperand(eax, JSFunction::kLiteralsOffset), ebx);
97 __ mov(FieldOperand(eax, JSFunction::kNextFunctionLinkOffset),
104 __ mov(FieldOperand(eax, JSFunction::kCodeEntryOffset), edx);
126 eax, ebx, ecx, &gc, TAG_OBJECT);
133 __ mov(FieldOperand(eax, HeapObject::kMapOffset),
135 __ mov(FieldOperand(eax, Context::kLengthOffset),
140 __ mov(Operand(eax, Context::SlotOffset(Context::CLOSURE_INDEX)), ecx);
141 __ mov(Operand(eax, Context::SlotOffset(Context::PREVIOUS_INDEX)), esi);
142 __ mov(Operand(eax, Context::SlotOffset(Context::EXTENSION_INDEX)), ebx);
146 __ mov(Operand(eax, Context::SlotOffset(Context::GLOBAL_INDEX)), ebx);
151 __ mov(Operand(eax, Context::SlotOffset(i)), ebx);
155 __ mov(esi, eax);
174 eax, ebx, ecx, &gc, TAG_OBJECT);
184 __ mov(FieldOperand(eax, HeapObject::kMapOffset),
186 __ mov(FieldOperand(eax, Context::kLengthOffset),
206 __ mov(ContextOperand(eax, Context::CLOSURE_INDEX), ecx);
207 __ mov(ContextOperand(eax, Context::PREVIOUS_INDEX), esi);
208 __ mov(ContextOperand(eax, Context::EXTENSION_INDEX), ebx);
212 __ mov(ContextOperand(eax, Context::GLOBAL_INDEX), ebx);
216 __ mov(ContextOperand(eax, Context::MIN_CONTEXT_SLOTS),
221 __ mov(ContextOperand(eax, i + Context::MIN_CONTEXT_SLOTS), ebx);
226 __ mov(esi, eax);
256 __ AllocateInNewSpace(size, eax, ebx, edx, fail, TAG_OBJECT);
262 __ mov(FieldOperand(eax, i), ebx);
270 __ lea(edx, Operand(eax, JSArray::kSize));
271 __ mov(FieldOperand(eax, JSArray::kElementsOffset), edx);
307 __ mov(eax, Operand(esp, 2 * kPointerSize));
311 __ mov(ecx, FieldOperand(ecx, eax, times_half_pointer_size,
383 __ mov(eax, Operand(esp, 3 * kPointerSize));
387 __ mov(ecx, FieldOperand(ecx, eax, times_half_pointer_size,
396 __ mov(eax, FieldOperand(ecx, HeapObject::kMapOffset));
397 __ movzx_b(eax, FieldOperand(eax, Map::kInstanceSizeOffset));
398 __ cmp(eax, Immediate(size >> kPointerSizeLog2));
403 __ AllocateInNewSpace(size, eax, ebx, edx, &slow_case, TAG_OBJECT);
406 __ mov(FieldOperand(eax, i), ebx);
424 const Register argument = eax;
558 const Register argument = eax;
607 // operand_1 on TOS+1 or in edx, operand_2 on TOS+2 or in eax.
614 // Expects operands in edx, eax.
618 // operand_1 in eax, operand_2 in edx; falls through on float
629 // Takes the operands in edx and eax and loads them as integers in eax
637 // are in eax and ecx. Checks that the original numbers were in the int32
644 // into xmm0 and xmm1. Operands are in edx and eax.
650 // either operand is not a number. Operands are in edx and eax.
655 // Expects operands in edx, eax.
837 __ push(eax); // the operand
894 __ JumpIfNotSmi(eax, non_smi, non_smi_near);
897 __ test(eax, eax);
900 // Try optimistic subtraction '0 - value', saving operand in eax for undo.
901 __ mov(edx, eax);
902 __ Set(eax, Immediate(0));
903 __ sub(eax, edx);
914 __ JumpIfNotSmi(eax, non_smi, non_smi_near);
917 __ not_(eax);
918 __ and_(eax, ~kSmiTagMask);
924 __ mov(eax, edx);
970 __ mov(edx, FieldOperand(eax, HeapObject::kMapOffset));
975 __ xor_(FieldOperand(eax, HeapNumber::kExponentOffset),
978 __ mov(edx, eax);
982 __ AllocateHeapNumber(eax, ebx, ecx, &slow_allocate_heapnumber);
994 // eax: allocated 'empty' number
997 __ mov(FieldOperand(eax, HeapNumber::kExponentOffset), ecx);
999 __ mov(FieldOperand(eax, HeapNumber::kMantissaOffset), ecx);
1007 __ mov(edx, FieldOperand(eax, HeapObject::kMapOffset));
1011 // Convert the heap number in eax to an untagged integer in ecx.
1012 IntegerConvert(masm, eax, CpuFeatures::IsSupported(SSE3), slow);
1022 __ lea(eax, Operand(ecx, times_2, kSmiTag));
1029 __ mov(ebx, eax);
1030 __ AllocateHeapNumber(eax, edx, edi, &slow_allocate_heapnumber);
1041 // New HeapNumber is in eax.
1054 __ movdbl(FieldOperand(eax, HeapNumber::kValueOffset), xmm0);
1059 __ fstp_d(FieldOperand(eax, HeapNumber::kValueOffset));
1105 __ push(eax);
1123 __ push(eax);
1222 // 1. Move arguments into edx, eax except for DIV and MOD, which need the
1223 // dividend in eax and edx free for the division. Use eax, ebx for those.
1226 Register right = eax;
1228 left = eax;
1230 __ mov(ebx, eax);
1231 __ mov(eax, edx);
1242 // Perform the operation into eax and smi check the result. Preserve
1243 // eax in case the result is not a smi.
1264 // Move the right operand into ecx for the shift operation, use eax
1281 // eax and check the result if necessary.
1290 ASSERT(right.is(eax));
1295 ASSERT(right.is(eax));
1308 // Tag the result and store it in register eax.
1310 __ mov(eax, left);
1319 // Tag the result and store it in register eax.
1321 __ mov(eax, left);
1338 // Tag the result and store it in register eax.
1340 __ mov(eax, left);
1344 ASSERT(right.is(eax));
1352 __ mov(eax, left);
1377 // Sign extend left into edx:eax.
1378 ASSERT(left.is(eax));
1380 // Divide edx:eax by right.
1386 __ cmp(eax, 0x40000000);
1389 __ NegativeZeroTest(eax, combined, &use_fp_on_smis);
1393 // Tag the result and store it in register eax.
1394 __ SmiTag(eax);
1402 // Sign extend left into edx:eax.
1403 ASSERT(left.is(eax));
1405 // Divide edx:eax by right.
1409 // Move remainder to register eax.
1410 __ mov(eax, edx);
1417 // 5. Emit return of result in eax. Some operations have registers pushed.
1462 // division. They should be in eax, ebx for jump to not_smi.
1463 __ mov(eax, edi);
1478 // number in eax.
1479 __ AllocateHeapNumber(eax, ecx, ebx, slow);
1487 __ fstp_d(FieldOperand(eax, HeapNumber::kValueOffset));
1493 __ movdbl(FieldOperand(eax, HeapNumber::kValueOffset), xmm0);
1497 __ fstp_d(FieldOperand(eax, HeapNumber::kValueOffset));
1510 // Restore arguments to edx, eax.
1528 __ mov(eax, right);
1556 __ mov(eax, ecx);
1567 // edx and eax.
1575 // Right operand is saved in ecx and eax was destroyed by the smi
1577 __ mov(eax, ecx);
1582 // Operands are in eax, ebx at this point.
1583 __ mov(edx, eax);
1584 __ mov(eax, ebx);
1663 Register right = eax;
1716 __ movdbl(FieldOperand(eax, HeapNumber::kValueOffset), xmm0);
1734 __ fstp_d(FieldOperand(eax, HeapNumber::kValueOffset));
1772 case Token::BIT_OR: __ or_(eax, ecx); break;
1773 case Token::BIT_AND: __ and_(eax, ecx); break;
1774 case Token::BIT_XOR: __ xor_(eax, ecx); break;
1775 case Token::SAR: __ sar_cl(eax); break;
1776 case Token::SHL: __ shl_cl(eax); break;
1777 case Token::SHR: __ shr_cl(eax); break;
1782 __ test(eax, Immediate(0xc0000000));
1786 __ cmp(eax, 0xc0000000);
1790 __ SmiTag(eax);
1798 __ mov(ebx, eax); // ebx: result
1805 __ mov(eax, Operand(esp, mode_ == OVERWRITE_RIGHT ?
1807 __ JumpIfNotSmi(eax, &skip_allocation, Label::kNear);
1810 __ AllocateHeapNumber(eax, ecx, edx, &call_runtime);
1819 __ movdbl(FieldOperand(eax, HeapNumber::kValueOffset), xmm0);
1823 __ fstp_d(FieldOperand(eax, HeapNumber::kValueOffset));
1905 __ cmp(eax, factory->undefined_value());
1908 __ xor_(eax, eax);
1910 __ mov(eax, Immediate(factory->nan_value()));
1940 __ movdbl(FieldOperand(eax, HeapNumber::kValueOffset), xmm0);
1957 __ fstp_d(FieldOperand(eax, HeapNumber::kValueOffset));
1986 case Token::BIT_OR: __ or_(eax, ecx); break;
1987 case Token::BIT_AND: __ and_(eax, ecx); break;
1988 case Token::BIT_XOR: __ xor_(eax, ecx); break;
1989 case Token::SAR: __ sar_cl(eax); break;
1990 case Token::SHL: __ shl_cl(eax); break;
1991 case Token::SHR: __ shr_cl(eax); break;
1996 __ test(eax, Immediate(0xc0000000));
2000 __ cmp(eax, 0xc0000000);
2004 __ SmiTag(eax);
2012 __ mov(ebx, eax); // ebx: result
2019 __ mov(eax, Operand(esp, mode_ == OVERWRITE_RIGHT ?
2021 __ JumpIfNotSmi(eax, &skip_allocation, Label::kNear);
2024 __ AllocateHeapNumber(eax, ecx, edx, &call_runtime);
2033 __ movdbl(FieldOperand(eax, HeapNumber::kValueOffset), xmm0);
2037 __ fstp_d(FieldOperand(eax, HeapNumber::kValueOffset));
2144 __ movdbl(FieldOperand(eax, HeapNumber::kValueOffset), xmm0);
2161 __ fstp_d(FieldOperand(eax, HeapNumber::kValueOffset));
2185 case Token::BIT_OR: __ or_(eax, ecx); break;
2186 case Token::BIT_AND: __ and_(eax, ecx); break;
2187 case Token::BIT_XOR: __ xor_(eax, ecx); break;
2188 case Token::SAR: __ sar_cl(eax); break;
2189 case Token::SHL: __ shl_cl(eax); break;
2190 case Token::SHR: __ shr_cl(eax); break;
2195 __ test(eax, Immediate(0xc0000000));
2199 __ cmp(eax, 0xc0000000);
2203 __ SmiTag(eax);
2211 __ mov(ebx, eax); // ebx: result
2218 __ mov(eax, Operand(esp, mode_ == OVERWRITE_RIGHT ?
2220 __ JumpIfNotSmi(eax, &skip_allocation, Label::kNear);
2223 __ AllocateHeapNumber(eax, ecx, edx, &call_runtime);
2232 __ movdbl(FieldOperand(eax, HeapNumber::kValueOffset), xmm0);
2236 __ fstp_d(FieldOperand(eax, HeapNumber::kValueOffset));
2300 Register right = eax;
2336 // Allocate a heap number for the result. Keep eax and edx intact
2344 __ mov(eax, edx);
2348 // If the argument in eax is already an object, we skip the
2350 __ JumpIfNotSmi(eax, &skip_allocation, Label::kNear);
2353 // Allocate a heap number for the result. Keep eax and edx intact
2356 // Now eax can be overwritten losing one of the arguments as we are
2358 __ mov(eax, ebx);
2369 __ push(eax);
2380 // eax: tagged double result.
2393 // Test that eax is a number.
2396 __ mov(eax, Operand(esp, kPointerSize));
2397 __ JumpIfNotSmi(eax, &input_not_smi, Label::kNear);
2401 __ sar(eax, 1);
2403 __ mov(Operand(esp, 0), eax);
2411 __ mov(ebx, FieldOperand(eax, HeapObject::kMapOffset));
2417 __ fld_d(FieldOperand(eax
2418 __ mov(edx, FieldOperand(eax, HeapNumber::kExponentOffset));
2419 __ mov(ebx, FieldOperand(eax, HeapNumber::kMantissaOffset));
2440 __ mov(eax, ecx);
2441 __ sar(eax, 16);
2442 __ xor_(ecx, eax);
2443 __ mov(eax, ecx);
2444 __ sar(eax, 8);
2445 __ xor_(ecx, eax);
2456 __ mov(eax, Immediate(cache_array));
2459 __ mov(eax, Operand(eax, cache_array_index));
2460 // Eax points to the cache for the type type_.
2462 __ test(eax, eax);
2478 // Find the address of the ecx'th entry in the cache, i.e., &eax[ecx*12].
2480 __ lea(ecx, Operand(eax, ecx, times_4, 0));
2490 __ mov(eax, Operand(ecx, 2 * kIntSize));
2495 __ movdbl(xmm1, FieldOperand(eax, HeapNumber::kValueOffset));
2505 __ AllocateHeapNumber(eax, edi, no_reg, &runtime_call_clear_stack);
2507 __ AllocateHeapNumber(eax, edi, no_reg, &skip_cache);
2516 __ mov(Operand(ecx, 2 * kIntSize), eax);
2517 __ fstp_d(FieldOperand(eax, HeapNumber::kValueOffset));
2521 __ movdbl(xmm1, FieldOperand(eax, HeapNumber::kValueOffset));
2555 __ AllocateHeapNumber(eax, edi, no_reg, &skip_cache);
2556 __ movdbl(FieldOperand(eax, HeapNumber::kValueOffset), xmm1);
2559 __ push(eax);
2562 __ movdbl(xmm1, FieldOperand(eax, HeapNumber::kValueOffset));
2586 // Address of result (a newly allocated HeapNumber) may be in eax.
2618 __ mov(edi, eax); // Save eax before using fnstsw_ax.
2628 __ test(eax, Immediate(5));
2641 __ test(eax, Immediate(0x400 /* C2 */));
2649 __ mov(eax, edi); // Restore eax (allocated HeapNumber pointer).
2679 // Input: edx, eax are the left and right objects of a bit op.
2680 // Output: eax, ecx are left and right integers for a bit op.
2712 // Here edx has the untagged integer, eax has a Smi or a heap number.
2716 __ JumpIfNotSmi(eax, &arg2_is_object, Label::kNear);
2718 __ SmiUntag(eax);
2719 __ mov(ecx, eax);
2724 __ cmp(eax, factory->undefined_value());
2730 __ mov(ebx, FieldOperand(eax, HeapObject::kMapOffset));
2734 // Get the untagged integer version of the eax heap number in ecx.
2735 IntegerConvert(masm, eax, use_sse3, conversion_failure);
2737 __ mov(eax, edx);
2773 // Load operand in eax into xmm1.
2774 __ JumpIfSmi(eax, &load_smi_eax, Label::kNear);
2775 __ movdbl(xmm1, FieldOperand(eax, HeapNumber::kValueOffset));
2785 __ SmiUntag(eax); // Untag smi before converting to float.
2786 __ cvtsi2sd(xmm1, eax);
2787 __ SmiTag(eax); // Retag smi for heap number overwriting test.
2803 // Load operand in eax into xmm1, or branch to not_numbers.
2804 __ JumpIfSmi(eax, &load_smi_eax, Label::kNear);
2805 __ cmp(FieldOperand(eax, HeapObject::kMapOffset), factory->heap_number_map());
2807 __ jmp(not_numbers); // Argument in eax is not a number.
2814 __ SmiUntag(eax); // Untag smi before converting to float.
2815 __ cvtsi2sd(xmm1, eax);
2816 __ SmiTag(eax); // Retag smi for heap number overwriting test.
2819 __ movdbl(xmm1, FieldOperand(eax, HeapNumber::kValueOffset));
2827 const Register right = eax;
2869 __ mov(scratch, eax);
2897 const Register right = eax;
2925 __ JumpIfSmi(eax, &done, Label::kNear);
2926 __ mov(scratch, FieldOperand(eax, HeapObject::kMapOffset));
2928 __ j(not_equal, non_float); // argument in eax is not a number -> NaN
2944 const Register exponent = eax;
3112 __ test_b(eax, 0x5F); // We check for all but precision exception.
3174 __ AllocateHeapNumber(eax, scratch, base, &call_runtime);
3175 __ movdbl(FieldOperand(eax, HeapNumber::kValueOffset), double_result);
3203 // The key is in edx and the parameter count is in eax.
3222 // through register eax. Use unsigned comparison to get negative
3224 __ cmp(edx, eax);
3230 __ lea(ebx, Operand(ebp, eax, times_2, 0));
3232 __ mov(eax, Operand(ebx, edx, times_2, kDisplacement));
3248 __ mov(eax, Operand(ebx, edx, times_2, kDisplacement));
3347 __ AllocateInNewSpace(ebx, eax, edx, edi, &runtime, TAG_OBJECT);
3349 // eax = address of new object(s) (tagged)
3370 // eax = address of new object (tagged)
3380 __ mov(FieldOperand(eax, i), edx);
3386 __ mov(FieldOperand(eax, JSObject::kHeaderSize +
3392 __ mov(FieldOperand(eax, JSObject::kHeaderSize +
3399 __ lea(edi, Operand(eax, Heap::kArgumentsObjectSize));
3400 __ mov(FieldOperand(eax, JSObject::kElementsOffset), edi);
3402 // eax = address of new object (tagged)
3410 __ push(eax);
3419 __ lea(eax, Operand(ebx, reinterpret_cast<intptr_t>(Smi::FromInt(2))));
3420 __ mov(FieldOperand(edi, FixedArray::kLengthOffset), eax);
3422 __ lea(eax, Operand(edi, ebx, times_2, kParameterMapHeaderSize));
3423 __ mov(FieldOperand(edi, FixedArray::kHeaderSize + 1 * kPointerSize), eax);
3435 __ mov(eax, Operand(esp, 2 * kPointerSize));
3438 __ sub(ebx, eax);
3441 __ lea(edi, Operand(edi, eax, times_2, kParameterMapHeaderSize));
3442 // eax = loop variable (tagged)
3455 __ sub(eax, Immediate(Smi::FromInt(1)));
3456 __ mov(FieldOperand(edx, eax, times_2, kParameterMapHeaderSize), ebx);
3457 __ mov(FieldOperand(edi, eax, times_2, FixedArray::kHeaderSize), ecx);
3460 __ test(eax, eax);
3486 __ mov(eax, Operand(edx, 0));
3487 __ mov(FieldOperand(edi, ebx, times_2, FixedArray::kHeaderSize), eax);
3495 __ pop(eax); // Address of arguments object.
3503 __ pop(eax); // Remove saved parameter count.
3545 __ AllocateInNewSpace(ecx, eax, edx, ebx, &runtime, TAG_OBJECT);
3557 __ mov(FieldOperand(eax, i), ebx);
3563 __ mov(FieldOperand(eax, JSObject::kHeaderSize +
3577 __ lea(edi, Operand(eax, Heap::kArgumentsObjectSizeStrict));
3578 __ mov(FieldOperand(eax, JSObject::kElementsOffset), edi);
3639 __ mov(eax, Operand(esp, kJSRegExpOffset));
3641 __ JumpIfSmi(eax, &runtime);
3642 __ CmpObjectType(eax, JS_REGEXP_TYPE, ecx);
3645 __ mov(ecx, FieldOperand(eax, JSRegExp::kDataOffset));
3674 __ mov(eax, Operand(esp, kSubjectOffset));
3675 __ JumpIfSmi(eax, &runtime);
3676 Condition is_string = masm->IsObjectStringType(eax, ebx, ebx);
3679 __ mov(ebx, FieldOperand(eax, String::kLengthOffset));
3686 __ mov(eax, Operand(esp, kPreviousIndexOffset));
3687 __ JumpIfNotSmi(eax, &runtime);
3688 __ cmp(eax, ebx);
3694 __ mov(eax, Operand(esp, kLastMatchInfoOffset));
3695 __ JumpIfSmi(eax, &runtime);
3696 __ CmpObjectType(eax, JS_ARRAY_TYPE, ebx);
3699 __ mov(ebx, FieldOperand(eax, JSArray::kElementsOffset));
3700 __ mov(eax, FieldOperand(ebx, HeapObject::kMapOffset));
3702 __ cmp(eax, factory->fixed_array_map());
3706 __ mov(eax, FieldOperand(ebx, FixedArray::kLengthOffset));
3707 __ SmiUntag(eax);
3709 __ cmp(edx, eax);
3717 __ mov(eax, Operand(esp, kSubjectOffset));
3718 __ mov(ebx, FieldOperand(eax, HeapObject::kMapOffset));
3757 __ mov(edi, FieldOperand(eax, SlicedString::kOffsetOffset));
3758 __ mov(eax, FieldOperand(eax, SlicedString::kParentOffset));
3760 // eax: parent string.
3764 __ cmp(FieldOperand(eax, ConsString::kSecondOffset), factory->empty_string());
3766 __ mov(eax, FieldOperand(eax, ConsString::kFirstOffset));
3768 __ mov(ebx, FieldOperand(eax, HeapObject::kMapOffset));
3769 // eax: first part of cons string or parent of sliced string.
3782 // eax: subject string (flat ASCII)
3789 // eax: subject string (flat two byte)
3800 // eax: subject string
3808 // eax: subject string
3849 // eax: underlying subject string
3868 __ lea(ecx, FieldOperand(eax, esi, times_1, SeqAsciiString::kHeaderSize));
3870 __ lea(ecx, FieldOperand(eax, ebx, times_1, SeqAsciiString::kHeaderSize));
3877 __ lea(ecx, FieldOperand(eax, esi, times_1, SeqTwoByteString::kHeaderSize));
3879 __ lea(ecx, FieldOperand(eax, ebx, times_2, SeqTwoByteString::kHeaderSize));
3893 __ cmp(eax, NativeRegExpMacroAssembler::SUCCESS);
3896 __ cmp(eax, NativeRegExpMacroAssembler::FAILURE);
3898 __ cmp(eax, NativeRegExpMacroAssembler::EXCEPTION);
3908 __ mov(eax, Operand::StaticVariable(pending_exception));
3909 __ cmp(edx, eax);
3918 __ cmp(eax, factory->termination_exception());
3923 __ Throw(eax);
3926 __ ThrowUncatchable(eax);
3930 __ mov(eax, factory->null_value());
3935 __ mov(eax, Operand(esp, kJSRegExpOffset));
3936 __ mov(ecx, FieldOperand(eax, JSRegExp::kDataOffset));
3945 __ mov(eax, Operand(esp, kLastMatchInfoOffset));
3946 __ mov(ebx, FieldOperand(eax, JSArray::kElementsOffset));
3955 __ mov(eax, Operand(esp, kSubjectOffset));
3956 __ mov(FieldOperand(ebx, RegExpImpl::kLastSubjectOffset), eax);
3959 eax,
3962 __ mov(eax, Operand(esp, kSubjectOffset));
3963 __ mov(FieldOperand(ebx, RegExpImpl::kLastInputOffset), eax);
3966 eax,
3997 __ mov(eax, Operand(esp, kLastMatchInfoOffset));
4001 // eax: subject string (expected to be external)
4004 __ mov(ebx, FieldOperand(eax, HeapObject::kMapOffset));
4012 __ mov(eax, FieldOperand(eax, ExternalString::kResourceDataOffset));
4015 __ sub(eax, Immediate(SeqTwoByteString::kHeaderSize - kHeapObjectTag));
4045 eax, // Out: Start of allocation (tagged).
4050 // eax: Start of allocated area, object-tagged.
4059 __ lea(ebx, Operand(eax, JSRegExpResult::kSize));
4061 __ mov(FieldOperand(eax, JSObject::kElementsOffset), ebx);
4062 __ mov(FieldOperand(eax, JSObject::kPropertiesOffset), ecx);
4064 __ mov(FieldOperand(eax, HeapObject::kMapOffset), edx);
4068 __ mov(FieldOperand(eax, JSRegExpResult::kInputOffset), ecx);
4070 __ mov(FieldOperand(eax, JSRegExpResult::kIndexOffset), ecx);
4072 __ mov(FieldOperand(eax, JSArray::kLengthOffset), ecx);
4075 // eax: JSArray.
4089 // eax: JSArray.
4211 GenerateLookupNumberStringCache(masm, ebx, eax, ecx, edx, false, &runtime);
4236 __ or_(ecx, eax);
4238 __ sub(edx, eax); // Return on the result of the subtraction.
4242 __ mov(eax, edx);
4247 __ or_(ecx, eax);
4259 __ cmp(eax, edx);
4268 __ Set(eax, Immediate(Smi::FromInt(NegativeComparisonResult(cc_))));
4277 __ Set(eax, Immediate(Smi::FromInt(EQUAL)));
4286 __ CmpObjectType(eax, FIRST_SPEC_OBJECT_TYPE, ecx);
4289 __ Set(eax, Immediate(Smi::FromInt(EQUAL)));
4305 __ Set(eax, Immediate(0));
4312 __ setcc(above_equal, eax);
4317 __ Set(eax, Immediate(Smi::FromInt(EQUAL)));
4320 __ Set(eax, Immediate(Smi::FromInt(NegativeComparisonResult(cc_))));
4342 __ and_(ecx, eax);
4349 // ecx still holds eax & kSmiTag, which is either zero or one.
4352 __ xor_(ebx, eax);
4353 __ and_(ebx, ecx); // ebx holds either 0 or eax ^ edx.
4354 __ xor_(ebx, eax);
4355 // if eax was smi, ebx is now edx, else eax.
4363 __ mov(eax, ebx);
4375 __ CmpObjectType(eax, FIRST_SPEC_OBJECT_TYPE, ecx);
4378 // Return non-zero (eax is not zero)
4414 __ mov(eax, 0); // equal
4416 __ cmov(above, eax, ecx);
4418 __ cmov(below, eax, ecx);
4423 FloatingPointHelper::LoadFloatOperand(masm, eax);
4435 __ Set(eax, Immediate(0));
4439 __ mov(eax, Immediate(Smi::FromInt(-1)));
4443 __ mov(eax, Immediate(Smi::FromInt(1)));
4452 __ mov(eax, Immediate(Smi::FromInt(1)));
4454 __ mov(eax, Immediate(Smi::FromInt(-1)));
4465 BranchIfNonSymbol(masm, &check_for_strings, eax, ecx);
4469 // are symbols they aren't equal. Register eax already holds a
4476 __ JumpIfNotBothSequentialAsciiStrings(edx, eax, ecx, ebx,
4483 eax,
4489 eax,
4510 __ lea(ecx, Operand(eax, edx, times_1, 0));
4513 __ CmpObjectType(eax, FIRST_SPEC_OBJECT_TYPE, ecx);
4528 __ Set(eax, Immediate(EQUAL));
4530 // Return non-equal by returning the non-zero object pointer in eax,
4539 __ push(eax);
4633 __ mov(eax, Operand(esp, (argc_ + 1) * kPointerSize));
4635 __ cmp(eax, isolate->factory()->the_hole_value());
4659 __ cmp(eax, isolate->factory()->the_hole_value());
4689 __ Set(eax, Immediate(argc_ + 1));
4702 __ Set(eax, Immediate(argc_));
4712 // eax : number of arguments
4734 // eax: number of arguments
4746 // Set expected number of arguments to zero (not changing eax).
4795 // eax: result parameter for PerformGC, if any
4802 // Result returned in eax, or eax+edx if result_size_ is 2.
4815 __ mov(Operand(esp, 0 * kPointerSize), eax); // Result.
4831 // Result is in eax or edx:eax - do not destroy these registers!
4841 __ cmp(eax, masm->isolate()->factory()->the_hole_value());
4850 __ lea(ecx, Operand(eax, 1));
4851 // Lower 2 bits of ecx are 0 iff eax has failure tag.
4882 __ test(eax, Immediate(((1 << kFailureTypeTagSize) - 1) << kFailureTagSize));
4886 __ cmp(eax, reinterpret_cast<int32_t>(Failure::OutOfMemoryException()));
4890 __ mov(eax, Operand::StaticVariable(pending_exception_address));
4896 __ cmp(eax, masm->isolate()->factory()->termination_exception());
4908 // eax: number of arguments including receiver
4922 // eax: result parameter for PerformGC, if any (setup below)
4951 __ mov(eax, Immediate(reinterpret_cast<int32_t>(failure)));
4966 // Set pending exception and eax to out of memory exception.
4969 __ mov(eax, reinterpret_cast<int32_t>(Failure::OutOfMemoryException()));
4970 __ mov(Operand::StaticVariable(pending_exception), eax);
4974 __ ThrowUncatchable(eax);
4977 __ Throw(eax);
5024 __ mov(Operand::StaticVariable(pending_exception), eax);
5025 __ mov(eax, reinterpret_cast<int32_t>(Failure::Exception()));
5091 // b8 XX XX XX XX mov eax, <the hole, patched to either true or false>
5106 Register object = eax; // Object (lhs).
5152 __ mov(eax, Operand::StaticArray(
5207 __ Set(eax, Immediate(0));
5210 times_pointer_size, roots_array_start), eax);
5213 __ mov(eax, factory->true_value());
5220 __ mov(Operand(scratch, kDeltaToMovImmediate), eax);
5222 __ Set(eax, Immediate(0));
5229 __ Set(eax, Immediate(Smi::FromInt(1)));
5232 scratch, times_pointer_size, roots_array_start), eax);
5235 __ mov(eax, factory->false_value());
5242 __ mov(Operand(scratch, kDeltaToMovImmediate), eax);
5244 __ Set(eax, Immediate(Smi::FromInt(1)));
5260 __ Set(eax, Immediate(Smi::FromInt(1)));
5266 __ Set(eax, Immediate(Smi::FromInt(1)));
5273 __ Set(eax, Immediate(Smi::FromInt(1)));
5297 __ test(eax, eax);
5299 __ mov(eax, factory->false_value());
5302 __ mov(eax, factory->true_value());
5309 Register InstanceofStub::left() { return eax; }
5410 if (!index_.is(eax)) {
5413 __ mov(index_, eax);
5435 if (!result_.is(eax)) {
5436 __ mov(result_, eax);
5482 if (!result_.is(eax)) {
5483 __ mov(result_, eax);
5514 __ mov(eax, Operand(esp, 2 * kPointerSize)); // First argument.
5519 __ JumpIfSmi(eax, &call_runtime);
5520 __ CmpObjectType(eax, FIRST_NONSTRING_TYPE, ebx);
5532 GenerateConvertArgument(masm, 2 * kPointerSize, eax, ebx, ecx, edi,
5544 // eax: first string
5552 // Second string is empty, result is first string which is already in eax.
5557 __ mov(ebx, FieldOperand(eax, String::kLengthOffset));
5562 __ mov(eax, edx);
5567 // eax: first string
5584 __ JumpIfNotBothSequentialAsciiStrings(eax, edx, ebx, ecx, &call_runtime);
5587 __ movzx_b(ebx, FieldOperand(eax, SeqAsciiString::kHeaderSize));
5594 masm, ebx, ecx, eax, edx, edi,
5602 __ mov(eax, Operand(esp, 2 * kPointerSize)); // First argument.
5605 __ movzx_b(ebx, FieldOperand(eax, SeqAsciiString::kHeaderSize));
5609 __ AllocateAsciiString(eax, 2, edi, edx, &call_runtime);
5614 __ mov_w(FieldOperand(eax, SeqAsciiString::kHeaderSize), ebx);
5626 __ mov(edi, FieldOperand(eax, HeapObject::kMapOffset));
5644 __ mov(FieldOperand(ecx, ConsString::kFirstOffset), eax);
5646 __ mov(eax, ecx);
5656 __ mov(ecx, FieldOperand(eax, HeapObject::kMapOffset));
5671 // eax: first string
5677 __ mov(ecx, FieldOperand(eax, HeapObject::kMapOffset));
5687 __ mov(eax, FieldOperand(eax, ExternalString::kResourceDataOffset));
5691 __ add(eax, Immediate(SeqAsciiString::kHeaderSize - kHeapObjectTag));
5717 __ push(eax);
5729 __ AllocateAsciiString(eax, ebx, ecx, edx, edi, &call_runtime_drop_two);
5730 // eax: result string
5731 __ mov(ecx, eax);
5740 // eax: result string
5751 // eax: result string
5760 // eax: first string - known to be two byte
5766 __ AllocateTwoByteString(eax, ebx, ecx, edx, edi, &call_runtime_drop_two);
5767 // eax: result string
5768 __ mov(ecx, eax);
5777 // eax: result string
5788 // eax: result string
6059 if (!result.is(eax)) {
6060 __ mov(eax, result);
6148 __ mov(eax, Operand(esp, 3 * kPointerSize));
6150 __ JumpIfSmi(eax, &runtime);
6151 Condition is_string = masm->IsObjectStringType(eax, ebx, ebx);
6154 // eax: string
6163 __ cmp(ecx, FieldOperand(eax, String::kLengthOffset));
6171 // eax: string
6189 __ cmp(FieldOperand(eax, ConsString::kSecondOffset),
6192 __ mov(edi, FieldOperand(eax, ConsString::kFirstOffset));
6200 __ add(edx, FieldOperand(eax, SlicedString::kOffsetOffset));
6201 __ mov(edi, FieldOperand(eax, SlicedString::kParentOffset));
6209 __ mov(edi, eax);
6232 __ AllocateAsciiSlicedString(eax, ebx, no_reg, &runtime);
6235 __ AllocateTwoByteSlicedString(eax, ebx, no_reg, &runtime);
6237 __ mov(FieldOperand(eax, SlicedString::kLengthOffset), ecx);
6238 __ mov(FieldOperand(eax, SlicedString::kHashFieldOffset),
6240 __ mov(FieldOperand(eax, SlicedString::kParentOffset), edi);
6241 __ mov(FieldOperand(eax, SlicedString::kOffsetOffset), edx);
6280 __ AllocateAsciiString(eax, ecx, ebx, edx, edi, &runtime_drop_two);
6282 // eax: result string
6286 __ mov(edi, eax);
6294 // eax: result string
6306 __ AllocateTwoByteString(eax, ecx, ebx, edx, edi, &runtime_drop_two);
6308 // eax: result string
6312 __ mov(edi, eax);
6324 // eax: result string
6357 __ Set(eax, Immediate(Smi::FromInt(NOT_EQUAL)));
6366 __ Set(eax, Immediate(Smi::FromInt(EQUAL)));
6375 __ Set(eax, Immediate(Smi::FromInt(EQUAL)));
6422 __ Set(eax, Immediate(Smi::FromInt(EQUAL)));
6430 __ Set(eax, Immediate(Smi::FromInt(LESS)));
6435 __ Set(eax, Immediate(Smi::FromInt(GREATER)));
6479 __ mov(eax, Operand(esp, 1 * kPointerSize)); // right
6482 __ cmp(edx, eax);
6486 __ Set(eax, Immediate(Smi::FromInt(EQUAL)));
6493 __ JumpIfNotBothSequentialAsciiStrings(edx, eax, ecx, ebx, &runtime);
6500 GenerateCompareFlatAsciiStrings(masm, edx, eax, ecx, ebx, edi);
6513 __ or_(ecx, eax);
6518 __ sub(eax, edx);
6521 __ sub(edx, eax);
6526 __ mov(eax, edx);
6542 __ and_(ecx, eax);
6545 __ CmpObjectType(eax, HEAP_NUMBER_TYPE, ecx);
6558 __ movdbl(xmm1, FieldOperand(eax, HeapNumber::kValueOffset));
6568 __ mov(eax, 0); // equal
6570 __ cmov(above, eax, ecx);
6572 __ cmov(below, eax, ecx);
6583 __ cmp(eax, Immediate(masm->isolate()->factory()->undefined_value()));
6607 Register right = eax;
6631 // Make sure eax is non-zero. At this point input operands are
6633 ASSERT(right.is(eax));
6637 __ Set(eax, Immediate(Smi::FromInt(EQUAL)));
6654 Register right = eax;
6683 __ Set(eax, Immediate(Smi::FromInt(EQUAL)));
6698 // Make sure eax is non-zero. At this point input operands are
6700 ASSERT(right.is(eax));
6739 __ and_(ecx, eax);
6742 __ CmpObjectType(eax, JS_OBJECT_TYPE, ecx);
6748 __ sub(eax, edx);
6759 __ and_(ecx, eax);
6762 __ mov(ecx, FieldOperand(eax, HeapObject::kMapOffset));
6769 __ sub(eax, edx);
6783 __ push(edx); // Preserve edx and eax.
6784 __ push(eax);
6786 __ push(eax);
6790 __ lea(edi, FieldOperand(eax, Code::kHeaderSize));
6791 __ pop(eax);
7031 { REG(ebx), REG(eax), REG(edi), EMIT_REMEMBERED_SET },
7056 { REG(eax), REG(edx), REG(esi), EMIT_REMEMBERED_SET},
7057 { REG(edx), REG(eax), REG(edi), EMIT_REMEMBERED_SET},
7059 { REG(ebx), REG(eax), REG(ecx), EMIT_REMEMBERED_SET},
7306 // -- eax : element value to store
7324 __ JumpIfSmi(eax, &smi_element);
7335 __ push(eax);
7352 __ mov(Operand(ecx, 0), eax);
7354 __ RecordWrite(ebx, ecx, eax,
7365 FixedArrayBase::kHeaderSize), eax);
7373 __ StoreNumberToDoubleElements(eax,