Home | History | Annotate | Download | only in x64

Lines Matching defs:rax

45   static Register registers[] = { rax };
55 static Register registers[] = { rax, rbx, rcx };
66 static Register registers[] = { rax, rbx, rcx, rdx };
87 static Register registers[] = { rdx, rax };
98 static Register registers[] = { rax };
118 static Register registers[] = { rdx, rcx, rax };
129 static Register registers[] = { rax, rbx };
142 // rax -- number of arguments
149 descriptor->stack_parameter_count_ = &rax;
164 // rax -- number of arguments
171 descriptor->stack_parameter_count_ = &rax;
226 static Register registers[] = { rax };
239 static Register registers[] = { rax };
252 static Register registers[] = { rdx, rcx, rax };
263 static Register registers[] = { rax, rbx, rcx, rdx };
285 rax.is(descriptor->register_params_[param_count - 1]));
304 __ Allocate(JSFunction::kSize, rax, rbx, rcx, &gc, TAG_OBJECT);
318 __ movq(FieldOperand(rax, JSObject::kMapOffset), rbx);
325 __ movq(FieldOperand(rax, JSObject::kPropertiesOffset), rbx);
326 __ movq(FieldOperand(rax, JSObject::kElementsOffset), rbx);
327 __ movq(FieldOperand(rax, JSFunction::kPrototypeOrInitialMapOffset), r8);
328 __ movq(FieldOperand(rax, JSFunction::kSharedFunctionInfoOffset), rdx);
329 __ movq(FieldOperand(rax, JSFunction::kContextOffset), rsi);
330 __ movq(FieldOperand(rax, JSFunction::kLiteralsOffset), rbx);
344 __ movq(FieldOperand(rax, JSFunction::kNextFunctionLinkOffset),
348 __ movq(FieldOperand(rax, JSFunction::kCodeEntryOffset), rdx);
394 __ movq(FieldOperand(rax, JSFunction::kCodeEntryOffset), rdx);
399 __ movq(FieldOperand(rax, JSFunction::kNextFunctionLinkOffset), rdx);
400 // No need for write barrier as JSFunction (rax) is in the new space.
402 __ movq(ContextOperand(rcx, Context::OPTIMIZED_FUNCTIONS_LIST), rax);
403 // Store JSFunction (rax) into rdx before issuing write barrier as
405 __ movq(rdx, rax);
437 rax, rbx, rcx, &gc, TAG_OBJECT);
444 __ movq(FieldOperand(rax, HeapObject::kMapOffset), kScratchRegister);
445 __ Move(FieldOperand(rax, FixedArray::kLengthOffset), Smi::FromInt(length));
449 __ movq(Operand(rax
450 __ movq(Operand(rax, Context::SlotOffset(Context::PREVIOUS_INDEX)), rsi);
451 __ movq(Operand(rax, Context::SlotOffset(Context::EXTENSION_INDEX)), rbx);
455 __ movq(Operand(rax, Context::SlotOffset(Context::GLOBAL_OBJECT_INDEX)), rbx);
460 __ movq(Operand(rax, Context::SlotOffset(i)), rbx);
464 __ movq(rsi, rax);
483 rax, rbx, rcx, &gc, TAG_OBJECT);
493 __ movq(FieldOperand(rax, HeapObject::kMapOffset), kScratchRegister);
494 __ Move(FieldOperand(rax, FixedArray::kLengthOffset), Smi::FromInt(length));
512 __ movq(ContextOperand(rax, Context::CLOSURE_INDEX), rcx);
513 __ movq(ContextOperand(rax, Context::PREVIOUS_INDEX), rsi);
514 __ movq(ContextOperand(rax, Context::EXTENSION_INDEX), rbx);
518 __ movq(ContextOperand(rax, Context::GLOBAL_OBJECT_INDEX), rbx);
523 __ movq(ContextOperand(rax, i + Context::MIN_CONTEXT_SLOTS), rbx);
527 __ movq(rsi, rax);
558 // Load the operands from rdx and rax into xmm0 and xmm1, as doubles.
560 // Leaves rdx and rax unchanged. SmiOperands assumes both are smis.
567 // Takes the operands in rdx and rax and loads them as integers in rax
621 // Since we must use rcx for shifts below, use some other register (rax)
623 Register result_reg = final_result_reg.is(rcx) ? rax : final_result_reg;
627 Register save_reg = final_result_reg.is(rcx) ? rax : rcx;
688 __ push(rax);
710 // Arguments to BinaryOpStub are in rdx and rax.
712 const Register right = rax;
738 ASSERT(right.is(rax));
744 __ movq(rax, left);
748 ASSERT(right.is(rax));
753 // SmiDiv will not accept left in rdx or right in rax.
754 __ movq(rbx, rax);
756 __ SmiDiv(rax, rcx, rbx, &use_fp_on_smis);
760 // SmiMod will not accept left in rdx or right in rax.
761 __ movq(rbx, rax);
763 __ SmiMod(rax, rcx, rbx, &use_fp_on_smis);
767 ASSERT(right.is(rax));
772 ASSERT(right.is(rax));
777 ASSERT(right.is(rax));
783 __ movq(rax, left);
788 __ movq(rax, left);
793 __ movq(rax, left);
800 // 5. Emit return of result in rax. Some operations have registers pushed.
809 // Restore left and right to rdx and rax.
811 __ movq(rax, rbx);
831 __ movq(rax, rcx);
840 // with the operands in rdx and rax.
889 __ movsd(FieldOperand(rax, HeapNumber::kValueOffset), xmm0);
910 case Token::BIT_OR: __ orl(rax, rcx); break;
911 case Token::BIT_AND: __ andl(rax, rcx); break;
912 case Token::BIT_XOR: __ xorl(rax, rcx); break;
913 case Token::SAR: __ sarl_cl(rax); break;
914 case Token::SHL: __ shll_cl(rax); break;
916 __ shrl_cl(rax);
919 __ testl(rax, rax);
927 __ Integer32ToSmi(rax, rax);
936 __ movl(rbx, rax); // rbx holds result value (uint32 value as int64).
940 __ Allocate(HeapNumber::kSize, rax, rdx, no_reg, &allocation_failed,
946 __ movq(FieldOperand(rax, HeapObject::kMapOffset),
949 __ movsd(FieldOperand(rax, HeapNumber::kValueOffset), xmm0);
953 // We need tagged values in rdx and rax for the following code,
954 // not int32 in rax and rcx.
955 __ Integer32ToSmi(rax, rcx);
976 __ push(rax);
987 Register right = rax;
1020 __ Cmp(rax, Smi::FromInt(fixed_right_arg_value()));
1068 Register right = rax;
1110 __ CompareRoot(rax, Heap::kUndefinedValueRootIndex);
1113 __ xor_(rax, rax);
1115 __ LoadRoot(rax, Heap::kNanValueRootIndex);
1157 BinaryOpStub_CheckSmiInput(masm, rax, &not_number);
1209 // Allocate a heap number for the result. Keep rax and rdx intact
1217 __ movq(rax, rdx);
1221 // If the argument in rax is already an object, we skip the
1223 __ JumpIfNotSmi(rax, &skip_allocation);
1226 // Allocate a heap number for the result. Keep rax and rdx intact
1229 // Now rax can be overwritten losing one of the arguments as we are
1231 __ movq(rax, rbx);
1241 __ push(rax);
1251 // rax: tagged double result.
1265 // Test that rax is a number.
1266 __ movq(rax, Operand(rsp, kPointerSize));
1267 __ JumpIfNotSmi(rax, &input_not_smi, Label::kNear);
1270 __ SmiToInteger32(rax, rax);
1272 __ cvtlsi2sd(xmm1, rax);
1283 __ cmpq(rbx, FieldOperand(rax, HeapObject::kMapOffset));
1287 __ fld_d(FieldOperand(rax, HeapNumber::kValueOffset));
1288 __ movq(rbx, FieldOperand(rax, HeapNumber::kValueOffset));
1309 __ movl(rax, rdx);
1313 __ sarl(rax, Immediate(24));
1315 __ xorl(rax, rdi);
1316 __ xorl(rcx, rax);
1325 __ movq(rax, cache_array);
1328 __ movq(rax, Operand(rax, cache_array_index));
1329 // rax points to the cache for the type type_.
1331 __ testq(rax, rax);
1350 // Find the address of the rcx'th entry in the cache, i.e., &rax[rcx*16].
1352 __ lea(rcx, Operand(rax, rcx, times_8, 0));
1360 __ movq(rax, Operand(rcx, 2 * kIntSize));
1365 __ movsd(xmm1, FieldOperand(rax, HeapNumber::kValueOffset));
1373 __ AllocateHeapNumber(rax, rdi, &runtime_call_clear_stack);
1375 __ AllocateHeapNumber(rax, rdi, &skip_cache);
1376 __ movsd(FieldOperand(rax, HeapNumber::kValueOffset), xmm1);
1377 __ fld_d(FieldOperand(rax, HeapNumber::kValueOffset));
1381 __ movq(Operand(rcx, 2 * kIntSize), rax);
1382 __ fstp_d(FieldOperand(rax, HeapNumber::kValueOffset));
1386 __ movsd(xmm1, FieldOperand(rax, HeapNumber::kValueOffset));
1419 __ AllocateHeapNumber(rax, rdi, &skip_cache);
1420 __ movsd(FieldOperand(rax, HeapNumber::kValueOffset), xmm1);
1423 __ push(rax);
1426 __ movsd(xmm1, FieldOperand(rax, HeapNumber::kValueOffset));
1449 // rax: Newly allocated HeapNumber, which must be preserved.
1488 __ movq(rdi, rax); // Save rax before using fnstsw_ax.
1498 __ testl(rax, Immediate(5)); // #IO and #ZD flags of FPU status word.
1511 __ testl(rax, Immediate(0x400)); // Check C2 bit of FPU status word.
1521 __ movq(rax, rdi); // Restore rax, pointer to the new HeapNumber.
1549 // Input: rdx, rax are the left and right objects of a bit op.
1550 // Output: rax, rcx are left and right integers for a bit op.
1560 __ JumpIfSmi(rax, &rax_is_smi);
1563 DoubleToIStub stub1(rax, rcx, HeapNumber::kValueOffset - kHeapObjectTag,
1573 __ JumpIfNotSmi(rax, &rax_is_object);
1576 __ SmiToInteger32(rcx, rax);
1579 __ movl(rax, rdx);
1583 // Input: rdx, rax are the left and right objects of a bit op.
1584 // Output: rax, rcx are left and right integers for a bit op.
1585 // Jump to conversion_failure: rdx and rax are unchanged.
1613 // Here r8 has the untagged integer, rax has a Smi or a heap number.
1616 __ JumpIfNotSmi(rax, &arg2_is_object);
1617 __ SmiToInteger32(rcx, rax);
1622 __ CompareRoot(rax, Heap::kUndefinedValueRootIndex);
1628 __ cmpq(FieldOperand(rax, HeapObject::kMapOffset), heap_number_map);
1630 // Get the untagged integer version of the rax heap number in rcx.
1631 DoubleToIStub stub2(rax, rcx, HeapNumber::kValueOffset - kHeapObjectTag,
1636 __ movl(rax, r8);
1643 __ SmiToInteger32(kScratchRegister, rax);
1653 // Load operand in rax into xmm1.
1654 __ JumpIfSmi(rax, &load_smi_rax);
1656 __ movsd(xmm1, FieldOperand(rax, HeapNumber::kValueOffset));
1662 __ JumpIfNotSmi(rax, &load_nonsmi_rax);
1665 __ SmiToInteger32(kScratchRegister, rax);
1681 // Load operand in rax into xmm1, or branch to not_numbers.
1682 __ JumpIfSmi(rax, &load_smi_rax);
1685 __ cmpq(FieldOperand(rax, HeapObject::kMapOffset), rcx);
1687 __ movsd(xmm1, FieldOperand(rax, HeapNumber::kValueOffset));
1693 __ JumpIfNotSmi(rax, &load_nonsmi_rax);
1696 __ SmiToInteger32(kScratchRegister, rax);
1781 const Register base = rax;
1942 __ testb(rax, Immediate(0x5F)); // Check for all but precision exception.
2009 // as heap number in rax.
2011 __ AllocateHeapNumber(rax, rcx, &call_runtime);
2012 __ movsd(FieldOperand(rax, HeapNumber::kValueOffset), double_result);
2043 // -- rax : key
2047 __ Cmp(rax, masm->isolate()->factory()->prototype_string());
2053 // -- rax : receiver
2057 receiver = rax;
2072 // -- rax : key
2076 __ Cmp(rax, masm->isolate()->factory()->length_string());
2082 // -- rax : receiver
2086 receiver = rax;
2099 // -- rax : value
2113 Register value = rax;
2162 // The key is in rdx and the parameter count is in rax.
2184 // through register rax. Use unsigned comparison to get negative
2186 __ cmpq(rdx, rax);
2190 SmiIndex index = masm->SmiToIndex(rax, rax, kPointerSizeLog2);
2193 __ movq(rax, Operand(rbx, index.reg, index.scale, kDisplacement));
2205 index = masm->SmiToIndex(rax, rcx, kPointerSizeLog2);
2208 __ movq(rax, Operand(rbx, index.reg, index.scale, kDisplacement));
2229 // rax: the allocated object (tagged).
2284 __ Allocate(r8, rax, rdx, rdi, &runtime, TAG_OBJECT);
2286 // rax = address of new object(s) (tagged)
2304 // rax = address of new object (tagged)
2311 __ movq(FieldOperand(rax, i), rdx);
2317 __ movq(FieldOperand(rax, JSObject::kHeaderSize +
2325 __ movq(FieldOperand(rax, JSObject::kHeaderSize +
2332 __ lea(rdi, Operand(rax, Heap::kArgumentsObjectSize));
2333 __ movq(FieldOperand(rax, JSObject::kElementsOffset), rdi);
2335 // rax = address of new object (tagged)
2502 __ Allocate(rcx, rax, rdx, rbx, &runtime, TAG_OBJECT);
2514 __ movq(FieldOperand(rax, i), rbx);
2520 __ movq(FieldOperand(rax, JSObject::kHeaderSize +
2534 __ lea(rdi, Operand(rax, Heap::kArgumentsObjectSizeStrict));
2535 __ movq(FieldOperand(rax, JSObject::kElementsOffset), rdi);
2596 __ movq(rax, Operand(rsp, kJSRegExpOffset));
2597 __ JumpIfSmi(rax, &runtime);
2598 __ CmpObjectType(rax, JS_REGEXP_TYPE, kScratchRegister);
2602 __ movq(rax, FieldOperand(rax, JSRegExp::kDataOffset));
2604 Condition is_smi = masm->CheckSmi(rax);
2607 __ CmpObjectType(rax, FIXED_ARRAY_TYPE, kScratchRegister);
2611 // rax: RegExp data (FixedArray)
2613 __ SmiToInteger32(rbx, FieldOperand(rax, JSRegExp::kDataTagOffset));
2617 // rax: RegExp data (FixedArray)
2620 FieldOperand(rax, JSRegExp::kIrregexpCaptureCountOffset));
2634 // rax: RegExp data (FixedArray)
2710 // rax: RegExp data (FixedArray)
2711 __ movq(r11, FieldOperand(rax, JSRegExp::kDataAsciiCodeOffset));
2838 __ cmpl(rax, Immediate(1));
2842 __ cmpl(rax, Immediate(NativeRegExpMacroAssembler::EXCEPTION));
2844 __ cmpl(rax, Immediate(NativeRegExpMacroAssembler::FAILURE));
2850 __ LoadRoot(rax, Heap::kNullValueRootIndex);
2855 __ movq(rax, Operand(rsp, kJSRegExpOffset));
2856 __ movq(rcx, FieldOperand(rax, JSRegExp::kDataOffset));
2857 __ SmiToInteger32(rax,
2860 __ leal(rdx, Operand(rax, rax, times_1, 2));
2870 __ movq(rax, FieldOperand(rbx, HeapObject::kMapOffset));
2871 __ CompareRoot(rax, Heap::kFixedArrayMapRootIndex);
2876 __ SmiToInteger32(rax, FieldOperand(rbx, FixedArray::kLengthOffset));
2877 __ subl(rax, Immediate(RegExpImpl::kLastMatchOverhead));
2878 __ cmpl(rdx, rax);
2888 __ movq(rax, Operand(rsp, kSubjectOffset));
2889 __ movq(FieldOperand(rbx, RegExpImpl::kLastSubjectOffset), rax);
2890 __ movq(rcx, rax);
2893 rax,
2896 __ movq(rax, rcx);
2897 __ movq(FieldOperand(rbx, RegExpImpl::kLastInputOffset), rax);
2900 rax,
2930 __ movq(rax, r15);
2942 __ movq(rax, pending_exception_operand);
2944 __ cmpq(rax, rdx);
2948 __ CompareRoot(rax, Heap::kTerminationExceptionRootIndex);
2951 __ Throw(rax);
2954 __ ThrowUncatchable(rax);
2986 // rax: RegExp data (FixedArray)
2989 __ movq(r11, FieldOperand(rax, JSRegExp::kDataUC16CodeOffset));
3027 rax, // Out: Start of allocation (tagged).
3032 // rax: Start of allocated area, object-tagged.
3040 __ movq(FieldOperand(rax, HeapObject::kMapOffset), rdx);
3044 __ movq(FieldOperand(rax, JSObject::kPropertiesOffset), kScratchRegister);
3047 __ lea(rcx, Operand(rax, JSRegExpResult::kSize));
3048 __ movq(FieldOperand(rax, JSObject::kElementsOffset), rcx);
3052 __ movq(FieldOperand(rax, JSRegExpResult::kInputOffset), r8);
3054 __ movq(FieldOperand(rax, JSRegExpResult::kIndexOffset), r8);
3056 __ movq(FieldOperand(rax, JSArray::kLengthOffset), r8);
3059 // rax: JSArray.
3073 // rax: JSArray.
3189 GenerateLookupNumberStringCache(masm, rbx, rax, r8, r9, &runtime);
3245 CheckInputType(masm, rax, right_, &miss);
3249 __ JumpIfNotBothSmi(rax, rdx, &non_smi);
3250 __ subq(rdx, rax);
3254 __ movq(rax, rdx);
3259 // value in rax, corresponding to result of comparing the two inputs.
3266 __ cmpq(rax, rdx);
3275 __ Set(rax, NegativeComparisonResult(cc));
3289 __ CmpObjectType(rax, FIRST_SPEC_OBJECT_TYPE, rcx);
3292 __ Set(rax, EQUAL);
3300 __ Set(rax, EQUAL);
3303 __ setcc(parity_even, rax);
3304 // rax is 0 for equal non-NaN heapnumbers, 1 for NaNs.
3306 __ neg(rax);
3325 __ SelectNonSmi(rbx, rax, rdx, &not_smis);
3333 __ movq(rax, rbx);
3346 __ CmpObjectType(rax, FIRST_SPEC_OBJECT_TYPE, rcx);
3348 // Return non-zero (rax (not rax) is not zero)
3375 __ xorl(rax, rax);
3382 __ setcc(above, rax);
3384 __ subq(rax, rcx);
3392 __ Set(rax, 1);
3394 __ Set(rax, -1);
3405 masm, &check_for_strings, rax, kScratchRegister);
3410 // internalized strings they aren't equal. Register rax (not rax) already
3418 rdx, rax, rcx, rbx, &check_unequal_objects);
3424 rax,
3430 rax,
3452 __ lea(rcx, Operand(rax, rdx, times_1, 0));
3455 __ CmpObjectType(rax, FIRST_SPEC_OBJECT_TYPE, rbx);
3467 __ Set(rax, EQUAL);
3469 // Return non-equal by returning the non-zero object pointer in rax,
3478 __ push(rax);
3571 __ Integer32ToSmi(rax, rax);
3572 rax);
3581 __ pop(rax);
3582 __ SmiToInteger32(rax, rax);
3607 __ movq(rax, Operand(rsp, (argc_ + 1) * kPointerSize));
3609 __ CompareRoot(rax, Heap::kTheHoleValueRootIndex);
3633 __ CompareRoot(rax, Heap::kTheHoleValueRootIndex);
3663 __ Set(rax, argc_ + 1);
3677 __ Set(rax, argc_);
3688 // rax : number of arguments
3712 // rax: number of arguments
3724 // Set expected number of arguments to zero (not changing rax).
3788 // rax: result parameter for PerformGC, if any.
3797 // Simple results returned in rax (both AMD64 and Win64 calling conventions).
3799 // AMD64 calling convention: a struct of two pointers in rax+rdx
3811 __ movq(arg_reg_1, rax);
3831 // Return result in single register (rax).
3852 // Result is in rax - do not destroy this register!
3869 __ movq(rax, Operand(rsp, 6 * kPointerSize));
3873 __ lea(rcx, Operand(rax, 1));
3874 // Lower 2 bits of rcx are 0 iff rax has failure tag.
3888 __ testl(rax, Immediate(((1 << kFailureTypeTagSize) - 1) << kFailureTagSize));
3892 JumpIfOOM(masm, rax, kScratchRegister, throw_out_of_memory_exception);
3899 __ movq(rax, pending_exception_operand);
3902 JumpIfOOM(masm, rax, kScratchRegister, throw_out_of_memory_exception);
3912 __ CompareRoot(rax, Heap::kTerminationExceptionRootIndex);
3924 // rax: number of arguments including receiver
3945 // rax: Holds the context at this point, but should not be used.
3950 // of rax is then passed to Runtime::PerformGC.
3979 __ movq(rax, failure, RelocInfo::NONE64);
3992 __ Set(rax, static_cast<int64_t>(false));
3993 __ Store(external_caught, rax);
3995 // Set pending exception and rax to out of memory exception.
3999 JumpIfOOM(masm, rax, kScratchRegister, &already_have_failure);
4000 __ movq(rax, Failure::OutOfMemoryException(0x1), RelocInfo::NONE64);
4002 __ Store(pending_exception, rax);
4006 __ ThrowUncatchable(rax);
4009 __ Throw(rax);
4078 __ Load(rax, js_entry_sp);
4079 __ testq(rax, rax);
4082 __ movq(rax, rbp);
4083 __ Store(js_entry_sp, rax);
4099 __ Store(pending_exception, rax);
4100 __ movq(rax, Failure::Exception(), RelocInfo::NONE64);
4109 __ LoadRoot(rax, Heap::kTheHoleValueRootIndex);
4110 __ Store(pending_exception, rax);
4123 __ Load(rax, construct_entry);
4126 __ Load(rax, entry);
4128 __ lea(kScratchRegister, FieldOperand(rax, Code::kHeaderSize));
4200 // movq(rdi, FieldOperand(rax, HeapObject::kMapOffset))
4216 __ movq(rax, Operand(rsp, 2 * kPointerSize + extra_stack_space));
4217 __ JumpIfSmi(rax, &slow);
4219 // Check that the left hand is a JS object. Leave its map in rax.
4220 __ CmpObjectType(rax, FIRST_SPEC_OBJECT_TYPE, rax);
4222 __ CmpInstanceType(rax, LAST_SPEC_OBJECT_TYPE);
4227 // rdx is function, rax is map.
4236 __ CompareRoot(rax, Heap::kInstanceofCacheMapRootIndex);
4238 __ LoadRoot(rax, Heap::kInstanceofCacheAnswerRootIndex);
4253 // rax is object map.
4258 __ StoreRoot(rax, Heap::kInstanceofCacheMapRootIndex);
4270 __ movq(Operand(kScratchRegister, 0), rax);
4273 __ movq(rcx, FieldOperand(rax, Map::kPrototypeOffset));
4291 __ xorl(rax, rax);
4294 __ StoreRoot(rax, Heap::kInstanceofCacheAnswerRootIndex);
4301 __ movl(rax, Immediate(true_offset));
4304 __ movb(Operand(kScratchRegister, kOffsetToResultValue), rax);
4306 __ movl(rax, Immediate(kWordBeforeResultValue));
4307 __ cmpl(Operand(kScratchRegister, kOffsetToResultValue - 4), rax);
4310 __ Set(rax, 0);
4324 __ movl(rax, Immediate(false_offset));
4327 __ movb(Operand(kScratchRegister, kOffsetToResultValue), rax);
4329 __ movl(rax, Immediate(kWordBeforeResultValue));
4330 __ cmpl(Operand(kScratchRegister, kOffsetToResultValue - 4), rax);
4341 __ pop(rax);
4415 if (!index_.is(rax)) {
4418 __ movq(index_, rax);
4439 if (!result_.is(rax)) {
4440 __ movq(result_, rax);
4477 if (!result_.is(rax)) {
4478 __ movq(result_, rax);
4492 __ movq(rax, Operand(rsp, 2 * kPointerSize)); // First argument (left).
4501 __ JumpIfSmi(rax, &call_runtime);
4502 __ CmpObjectType(rax, FIRST_NONSTRING_TYPE, r8);
4511 GenerateConvertArgument(masm, 2 * kPointerSize, rax, rbx, rcx, rdi,
4522 // rax: first string
4529 // Second string is empty, result is first string which is already in rax.
4534 __ movq(rbx, FieldOperand(rax, String::kLengthOffset));
4538 __ movq(rax, rdx);
4543 // rax: first string
4555 __ movq(r8, FieldOperand(rax, HeapObject::kMapOffset));
4575 __ movzxbq(rbx, FieldOperand(rax, SeqOneByteString::kHeaderSize));
4588 __ AllocateAsciiString(rax, rdi, r8, r9, r11, &call_runtime);
4596 __ movw(FieldOperand(rax, SeqOneByteString::kHeaderSize), rbx);
4611 // rax: first string
4639 __ movq(FieldOperand(rcx, ConsString::kFirstOffset), rax);
4642 rax,
4654 __ movq(FieldOperand(rcx, ConsString::kFirstOffset), rax);
4659 __ movq(rax, rcx);
4683 // rax: first string
4692 __ SmiToInteger32(r14, FieldOperand(rax, SeqString::kLengthOffset));
4701 __ movq(rcx, FieldOperand(rax, ExternalString::kResourceDataOffset));
4705 __ lea(rcx, FieldOperand(rax, SeqOneByteString::kHeaderSize));
4739 __ AllocateAsciiString(rax, rbx, rdi, r8, r9, &call_runtime);
4740 // rax: result string
4742 __ lea(rbx, FieldOperand(rax, SeqOneByteString::kHeaderSize));
4756 __ AllocateTwoByteString(rax, rbx, rdi, r8, r9, &call_runtime);
4757 // rax: result string
4759 __ lea(rbx, FieldOperand(rax, SeqTwoByteString::kHeaderSize));
4806 __ push(rax);
4815 __ pop(rax);
5065 if (!result.is(rax)) {
5066 __ movq(rax, result);
5145 __ movq(rax, Operand(rsp, kStringOffset));
5147 __ testl(rax, Immediate(kSmiTagMask));
5149 Condition is_string = masm->IsObjectStringType(rax, rbx, rbx);
5152 // rax: string
5160 __ cmpq(rcx, FieldOperand(rax, String::kLengthOffset));
5178 // rax: string
5195 __ CompareRoot(FieldOperand(rax, ConsString::kSecondOffset),
5198 __ movq(rdi, FieldOperand(rax, ConsString::kFirstOffset));
5206 __ addq(rdx, FieldOperand(rax, SlicedString::kOffsetOffset));
5207 __ movq(rdi, FieldOperand(rax, SlicedString::kParentOffset));
5215 __ movq(rdi, rax);
5240 __ AllocateAsciiSlicedString(rax, rbx, r14, &runtime);
5243 __ AllocateTwoByteSlicedString(rax, rbx, r14, &runtime);
5246 __ movq(FieldOperand(rax, SlicedString::kLengthOffset), rcx);
5247 __ movq(FieldOperand(rax, SlicedString::kHashFieldOffset),
5249 __ movq(FieldOperand(rax, SlicedString::kParentOffset), rdi);
5250 __ movq(FieldOperand(rax, SlicedString::kOffsetOffset), rdx);
5285 __ AllocateAsciiString(rax, rcx, r11, r14, r15, &runtime);
5287 // rax: result string
5296 __ lea(rdi, FieldOperand(rax, SeqOneByteString::kHeaderSize));
5298 // rax: result string
5310 __ AllocateTwoByteString(rax, rcx, r11, r14, r15, &runtime);
5312 // rax: result string
5321 __ lea(rdi, FieldOperand(rax, SeqTwoByteString::kHeaderSize));
5323 // rax: result string
5338 // rax: string
5343 rax, rdx, rcx, rax, &runtime, &runtime, &runtime, STRING_INDEX_IS_NUMBER);
5362 __ Move(rax, Smi::FromInt(NOT_EQUAL));
5371 __ Move(rax, Smi::FromInt(EQUAL));
5381 __ Move(rax, Smi::FromInt(EQUAL));
5386 __ Move(rax, Smi::FromInt(NOT_EQUAL));
5438 __ Move(rax, Smi::FromInt(EQUAL));
5452 __ Move(rax, Smi::FromInt(LESS));
5457 __ Move(rax, Smi::FromInt(GREATER));
5501 __ movq(rax, Operand(rsp, 1 * kPointerSize)); // right
5505 __ cmpq(rdx, rax);
5507 __ Move(rax, Smi::FromInt(EQUAL));
5515 __ JumpIfNotBothSequentialAsciiStrings(rdx, rax, rcx, rbx, &runtime);
5523 GenerateCompareFlatAsciiStrings(masm, rdx, rax, rcx, rbx, rdi, r8);
5535 __ JumpIfNotBothSmi(rdx, rax, &miss, Label::kNear);
5539 __ subq(rax, rdx);
5542 __ subq(rdx, rax);
5547 __ movq(rax, rdx);
5567 __ JumpIfNotSmi(rax, &miss);
5572 __ JumpIfSmi(rax, &right_smi, Label::kNear);
5573 __ CompareMap(rax, masm->isolate()->factory()->heap_number_map(), NULL);
5575 __ movsd(xmm1, FieldOperand(rax, HeapNumber::kValueOffset));
5578 __ SmiToInteger32(rcx, rax); // Can't clobber rax yet.
5600 __ movl(rax, Immediate(0));
5602 __ setcc(above, rax); // Add one to zero if carry clear and not equal.
5603 __ sbbq(rax, rcx); // Subtract one if below (aka. carry set).
5614 __ Cmp(rax, masm->isolate()->factory()->undefined_value());
5639 Register right = rax;
5661 // Make sure rax is non-zero. At this point input operands are
5663 ASSERT(right.is(rax));
5667 __ Move(rax, Smi::FromInt(EQUAL));
5682 Register right = rax;
5704 // Make sure rax is non-zero. At this point input operands are
5706 ASSERT(right.is(rax));
5710 __ Move(rax, Smi::FromInt(EQUAL));
5727 Register right = rax;
5754 __ Move(rax, Smi::FromInt(EQUAL));
5769 // Make sure rax is non-zero. At this point input operands are
5771 ASSERT(right.is(rax));
5809 Condition either_smi = masm->CheckEitherSmi(rdx, rax);
5812 __ CmpObjectType(rax, JS_OBJECT_TYPE, rcx);
5818 __ subq(rax, rdx);
5828 Condition either_smi = masm->CheckEitherSmi(rdx, rax);
5831 __ movq(rcx, FieldOperand(rax, HeapObject::kMapOffset));
5838 __ subq(rax, rdx);
5854 __ push(rax);
5856 __ push(rax);
5861 __ lea(rdi, FieldOperand(rax, Code::kHeaderSize));
5862 __ pop(rax);
6083 { REG(rbx), REG(rax), REG(rdi), EMIT_REMEMBERED_SET },
6110 { REG(r11), REG(rax), REG(r15), EMIT_REMEMBERED_SET},
6112 { REG(rbx), REG(rax), REG(rcx), EMIT_REMEMBERED_SET},
6117 { REG(rcx), REG(rax), REG(rbx), EMIT_REMEMBERED_SET},
6373 // -- rax : element value to store
6395 __ JumpIfSmi(rax, &smi_element);
6405 __ push(rax);
6418 __ movq(Operand(rcx, 0), rax);
6420 __ RecordWrite(rbx, rcx, rax,
6432 FixedArrayBase::kHeaderSize), rax);
6440 __ StoreNumberToDoubleElements(rax,
6495 __ movq(rax, FUNCTION_ADDR(masm->isolate()->function_entry_hook()),
6502 __ CallCFunction(rax, kArgumentCount);
6535 // rax - number of arguments
6638 // -- rax : argc
6695 __ testq(rax, rax);
6700 __ cmpl(rax, Immediate(1));
6723 __ testq(rax, rax);
6729 __ cmpl(rax, Immediate(1));
6756 // -- rax : argc