Lines Matching refs:__

34 #define __ masm.  macro
51 __ movsd(input, Operand(esp, 1 * kPointerSize)); in CreateExpFunction()
52 __ push(eax); in CreateExpFunction()
53 __ push(ebx); in CreateExpFunction()
57 __ pop(ebx); in CreateExpFunction()
58 __ pop(eax); in CreateExpFunction()
59 __ movsd(Operand(esp, 1 * kPointerSize), result); in CreateExpFunction()
60 __ fld_d(Operand(esp, 1 * kPointerSize)); in CreateExpFunction()
61 __ Ret(); in CreateExpFunction()
86 __ movsd(xmm0, Operand(esp, 1 * kPointerSize)); in CreateSqrtFunction()
87 __ sqrtsd(xmm0, xmm0); in CreateSqrtFunction()
88 __ movsd(Operand(esp, 1 * kPointerSize), xmm0); in CreateSqrtFunction()
90 __ fld_d(Operand(esp, 1 * kPointerSize)); in CreateSqrtFunction()
91 __ Ret(); in CreateSqrtFunction()
105 #undef __
106 #define __ ACCESS_MASM(masm) macro
125 __ cmp(loop_count, 0); in MemMoveEmitMainLoop()
126 __ j(equal, &move_last_63); in MemMoveEmitMainLoop()
127 __ bind(&loop); in MemMoveEmitMainLoop()
129 if (direction == BACKWARD) __ sub(src, Immediate(0x40)); in MemMoveEmitMainLoop()
130 __ movdq(alignment == MOVE_ALIGNED, xmm0, Operand(src, 0x00)); in MemMoveEmitMainLoop()
131 __ movdq(alignment == MOVE_ALIGNED, xmm1, Operand(src, 0x10)); in MemMoveEmitMainLoop()
132 __ movdq(alignment == MOVE_ALIGNED, xmm2, Operand(src, 0x20)); in MemMoveEmitMainLoop()
133 __ movdq(alignment == MOVE_ALIGNED, xmm3, Operand(src, 0x30)); in MemMoveEmitMainLoop()
134 if (direction == FORWARD) __ add(src, Immediate(0x40)); in MemMoveEmitMainLoop()
135 if (direction == BACKWARD) __ sub(dst, Immediate(0x40)); in MemMoveEmitMainLoop()
136 __ movdqa(Operand(dst, 0x00), xmm0); in MemMoveEmitMainLoop()
137 __ movdqa(Operand(dst, 0x10), xmm1); in MemMoveEmitMainLoop()
138 __ movdqa(Operand(dst, 0x20), xmm2); in MemMoveEmitMainLoop()
139 __ movdqa(Operand(dst, 0x30), xmm3); in MemMoveEmitMainLoop()
140 if (direction == FORWARD) __ add(dst, Immediate(0x40)); in MemMoveEmitMainLoop()
141 __ dec(loop_count); in MemMoveEmitMainLoop()
142 __ j(not_zero, &loop); in MemMoveEmitMainLoop()
144 __ bind(&move_last_63); in MemMoveEmitMainLoop()
145 __ test(count, Immediate(0x20)); in MemMoveEmitMainLoop()
146 __ j(zero, &move_last_31); in MemMoveEmitMainLoop()
147 if (direction == BACKWARD) __ sub(src, Immediate(0x20)); in MemMoveEmitMainLoop()
148 __ movdq(alignment == MOVE_ALIGNED, xmm0, Operand(src, 0x00)); in MemMoveEmitMainLoop()
149 __ movdq(alignment == MOVE_ALIGNED, xmm1, Operand(src, 0x10)); in MemMoveEmitMainLoop()
150 if (direction == FORWARD) __ add(src, Immediate(0x20)); in MemMoveEmitMainLoop()
151 if (direction == BACKWARD) __ sub(dst, Immediate(0x20)); in MemMoveEmitMainLoop()
152 __ movdqa(Operand(dst, 0x00), xmm0); in MemMoveEmitMainLoop()
153 __ movdqa(Operand(dst, 0x10), xmm1); in MemMoveEmitMainLoop()
154 if (direction == FORWARD) __ add(dst, Immediate(0x20)); in MemMoveEmitMainLoop()
156 __ bind(&move_last_31); in MemMoveEmitMainLoop()
157 __ test(count, Immediate(0x10)); in MemMoveEmitMainLoop()
158 __ j(zero, move_last_15); in MemMoveEmitMainLoop()
159 if (direction == BACKWARD) __ sub(src, Immediate(0x10)); in MemMoveEmitMainLoop()
160 __ movdq(alignment == MOVE_ALIGNED, xmm0, Operand(src, 0)); in MemMoveEmitMainLoop()
161 if (direction == FORWARD) __ add(src, Immediate(0x10)); in MemMoveEmitMainLoop()
162 if (direction == BACKWARD) __ sub(dst, Immediate(0x10)); in MemMoveEmitMainLoop()
163 __ movdqa(Operand(dst, 0), xmm0); in MemMoveEmitMainLoop()
164 if (direction == FORWARD) __ add(dst, Immediate(0x10)); in MemMoveEmitMainLoop()
169 __ pop(esi); in MemMoveEmitPopAndReturn()
170 __ pop(edi); in MemMoveEmitPopAndReturn()
171 __ ret(0); in MemMoveEmitPopAndReturn()
175 #undef __
176 #define __ masm. macro
230 __ push(edi); in CreateMemMoveFunction()
231 __ push(esi); in CreateMemMoveFunction()
237 __ mov(dst, Operand(esp, stack_offset + kDestinationOffset)); in CreateMemMoveFunction()
238 __ mov(src, Operand(esp, stack_offset + kSourceOffset)); in CreateMemMoveFunction()
239 __ mov(count, Operand(esp, stack_offset + kSizeOffset)); in CreateMemMoveFunction()
241 __ cmp(dst, src); in CreateMemMoveFunction()
242 __ j(equal, &pop_and_return); in CreateMemMoveFunction()
244 __ prefetch(Operand(src, 0), 1); in CreateMemMoveFunction()
245 __ cmp(count, kSmallCopySize); in CreateMemMoveFunction()
246 __ j(below_equal, &small_size); in CreateMemMoveFunction()
247 __ cmp(count, kMediumCopySize); in CreateMemMoveFunction()
248 __ j(below_equal, &medium_size); in CreateMemMoveFunction()
249 __ cmp(dst, src); in CreateMemMoveFunction()
250 __ j(above, &backward); in CreateMemMoveFunction()
255 __ mov(eax, src); in CreateMemMoveFunction()
256 __ sub(eax, dst); in CreateMemMoveFunction()
257 __ cmp(eax, kMinMoveDistance); in CreateMemMoveFunction()
258 __ j(below, &forward_much_overlap); in CreateMemMoveFunction()
260 __ movdqu(xmm0, Operand(src, 0)); in CreateMemMoveFunction()
261 __ movdqu(Operand(dst, 0), xmm0); in CreateMemMoveFunction()
263 __ mov(edx, dst); in CreateMemMoveFunction()
264 __ and_(edx, 0xF); in CreateMemMoveFunction()
265 __ neg(edx); in CreateMemMoveFunction()
266 __ add(edx, Immediate(16)); in CreateMemMoveFunction()
267 __ add(dst, edx); in CreateMemMoveFunction()
268 __ add(src, edx); in CreateMemMoveFunction()
269 __ sub(count, edx); in CreateMemMoveFunction()
271 __ mov(loop_count, count); in CreateMemMoveFunction()
272 __ shr(loop_count, 6); in CreateMemMoveFunction()
274 __ test(src, Immediate(0xF)); in CreateMemMoveFunction()
275 __ j(not_zero, &unaligned_source); in CreateMemMoveFunction()
279 __ bind(&move_last_15); in CreateMemMoveFunction()
280 __ and_(count, 0xF); in CreateMemMoveFunction()
281 __ j(zero, &skip_last_move, Label::kNear); in CreateMemMoveFunction()
282 __ movdqu(xmm0, Operand(src, count, times_1, -0x10)); in CreateMemMoveFunction()
283 __ movdqu(Operand(dst, count, times_1, -0x10), xmm0); in CreateMemMoveFunction()
284 __ bind(&skip_last_move); in CreateMemMoveFunction()
288 __ bind(&unaligned_source); in CreateMemMoveFunction()
290 __ jmp(&move_last_15); in CreateMemMoveFunction()
294 __ bind(&loop_until_aligned); in CreateMemMoveFunction()
295 __ mov_b(eax, Operand(src, 0)); in CreateMemMoveFunction()
296 __ inc(src); in CreateMemMoveFunction()
297 __ mov_b(Operand(dst, 0), eax); in CreateMemMoveFunction()
298 __ inc(dst); in CreateMemMoveFunction()
299 __ dec(count); in CreateMemMoveFunction()
300 __ bind(&forward_much_overlap); // Entry point into this block. in CreateMemMoveFunction()
301 __ test(dst, Immediate(0xF)); in CreateMemMoveFunction()
302 __ j(not_zero, &loop_until_aligned); in CreateMemMoveFunction()
304 __ mov(loop_count, count); in CreateMemMoveFunction()
305 __ shr(loop_count, 6); in CreateMemMoveFunction()
308 __ bind(&last_15_much_overlap); in CreateMemMoveFunction()
309 __ and_(count, 0xF); in CreateMemMoveFunction()
310 __ j(zero, &pop_and_return); in CreateMemMoveFunction()
311 __ cmp(count, kSmallCopySize); in CreateMemMoveFunction()
312 __ j(below_equal, &small_size); in CreateMemMoveFunction()
313 __ jmp(&medium_size); in CreateMemMoveFunction()
319 __ bind(&backward); in CreateMemMoveFunction()
321 __ add(dst, count); in CreateMemMoveFunction()
322 __ add(src, count); in CreateMemMoveFunction()
323 __ mov(eax, dst); in CreateMemMoveFunction()
324 __ sub(eax, src); in CreateMemMoveFunction()
325 __ cmp(eax, kMinMoveDistance); in CreateMemMoveFunction()
326 __ j(below, &backward_much_overlap); in CreateMemMoveFunction()
328 __ movdqu(xmm0, Operand(src, -0x10)); in CreateMemMoveFunction()
329 __ movdqu(Operand(dst, -0x10), xmm0); in CreateMemMoveFunction()
331 __ mov(edx, dst); in CreateMemMoveFunction()
332 __ and_(edx, 0xF); in CreateMemMoveFunction()
333 __ sub(dst, edx); in CreateMemMoveFunction()
334 __ sub(src, edx); in CreateMemMoveFunction()
335 __ sub(count, edx); in CreateMemMoveFunction()
337 __ mov(loop_count, count); in CreateMemMoveFunction()
338 __ shr(loop_count, 6); in CreateMemMoveFunction()
340 __ test(src, Immediate(0xF)); in CreateMemMoveFunction()
341 __ j(not_zero, &unaligned_source); in CreateMemMoveFunction()
345 __ bind(&move_first_15); in CreateMemMoveFunction()
346 __ and_(count, 0xF); in CreateMemMoveFunction()
347 __ j(zero, &skip_last_move, Label::kNear); in CreateMemMoveFunction()
348 __ sub(src, count); in CreateMemMoveFunction()
349 __ sub(dst, count); in CreateMemMoveFunction()
350 __ movdqu(xmm0, Operand(src, 0)); in CreateMemMoveFunction()
351 __ movdqu(Operand(dst, 0), xmm0); in CreateMemMoveFunction()
352 __ bind(&skip_last_move); in CreateMemMoveFunction()
356 __ bind(&unaligned_source); in CreateMemMoveFunction()
358 __ jmp(&move_first_15); in CreateMemMoveFunction()
362 __ bind(&loop_until_aligned); in CreateMemMoveFunction()
363 __ dec(src); in CreateMemMoveFunction()
364 __ dec(dst); in CreateMemMoveFunction()
365 __ mov_b(eax, Operand(src, 0)); in CreateMemMoveFunction()
366 __ mov_b(Operand(dst, 0), eax); in CreateMemMoveFunction()
367 __ dec(count); in CreateMemMoveFunction()
368 __ bind(&backward_much_overlap); // Entry point into this block. in CreateMemMoveFunction()
369 __ test(dst, Immediate(0xF)); in CreateMemMoveFunction()
370 __ j(not_zero, &loop_until_aligned); in CreateMemMoveFunction()
372 __ mov(loop_count, count); in CreateMemMoveFunction()
373 __ shr(loop_count, 6); in CreateMemMoveFunction()
376 __ bind(&first_15_much_overlap); in CreateMemMoveFunction()
377 __ and_(count, 0xF); in CreateMemMoveFunction()
378 __ j(zero, &pop_and_return); in CreateMemMoveFunction()
380 __ sub(dst, count); in CreateMemMoveFunction()
381 __ sub(src, count); in CreateMemMoveFunction()
382 __ cmp(count, kSmallCopySize); in CreateMemMoveFunction()
383 __ j(below_equal, &small_size); in CreateMemMoveFunction()
384 __ jmp(&medium_size); in CreateMemMoveFunction()
392 __ bind(&f9_16); in CreateMemMoveFunction()
393 __ movsd(xmm0, Operand(src, 0)); in CreateMemMoveFunction()
394 __ movsd(xmm1, Operand(src, count, times_1, -8)); in CreateMemMoveFunction()
395 __ movsd(Operand(dst, 0), xmm0); in CreateMemMoveFunction()
396 __ movsd(Operand(dst, count, times_1, -8), xmm1); in CreateMemMoveFunction()
399 __ bind(&f17_32); in CreateMemMoveFunction()
400 __ movdqu(xmm0, Operand(src, 0)); in CreateMemMoveFunction()
401 __ movdqu(xmm1, Operand(src, count, times_1, -0x10)); in CreateMemMoveFunction()
402 __ movdqu(Operand(dst, 0x00), xmm0); in CreateMemMoveFunction()
403 __ movdqu(Operand(dst, count, times_1, -0x10), xmm1); in CreateMemMoveFunction()
406 __ bind(&f33_48); in CreateMemMoveFunction()
407 __ movdqu(xmm0, Operand(src, 0x00)); in CreateMemMoveFunction()
408 __ movdqu(xmm1, Operand(src, 0x10)); in CreateMemMoveFunction()
409 __ movdqu(xmm2, Operand(src, count, times_1, -0x10)); in CreateMemMoveFunction()
410 __ movdqu(Operand(dst, 0x00), xmm0); in CreateMemMoveFunction()
411 __ movdqu(Operand(dst, 0x10), xmm1); in CreateMemMoveFunction()
412 __ movdqu(Operand(dst, count, times_1, -0x10), xmm2); in CreateMemMoveFunction()
415 __ bind(&f49_63); in CreateMemMoveFunction()
416 __ movdqu(xmm0, Operand(src, 0x00)); in CreateMemMoveFunction()
417 __ movdqu(xmm1, Operand(src, 0x10)); in CreateMemMoveFunction()
418 __ movdqu(xmm2, Operand(src, 0x20)); in CreateMemMoveFunction()
419 __ movdqu(xmm3, Operand(src, count, times_1, -0x10)); in CreateMemMoveFunction()
420 __ movdqu(Operand(dst, 0x00), xmm0); in CreateMemMoveFunction()
421 __ movdqu(Operand(dst, 0x10), xmm1); in CreateMemMoveFunction()
422 __ movdqu(Operand(dst, 0x20), xmm2); in CreateMemMoveFunction()
423 __ movdqu(Operand(dst, count, times_1, -0x10), xmm3); in CreateMemMoveFunction()
426 __ bind(&medium_handlers); in CreateMemMoveFunction()
427 __ dd(conv.address(&f9_16)); in CreateMemMoveFunction()
428 __ dd(conv.address(&f17_32)); in CreateMemMoveFunction()
429 __ dd(conv.address(&f33_48)); in CreateMemMoveFunction()
430 __ dd(conv.address(&f49_63)); in CreateMemMoveFunction()
432 __ bind(&medium_size); // Entry point into this block. in CreateMemMoveFunction()
433 __ mov(eax, count); in CreateMemMoveFunction()
434 __ dec(eax); in CreateMemMoveFunction()
435 __ shr(eax, 4); in CreateMemMoveFunction()
438 __ cmp(eax, 3); in CreateMemMoveFunction()
439 __ j(below_equal, &ok); in CreateMemMoveFunction()
440 __ int3(); in CreateMemMoveFunction()
441 __ bind(&ok); in CreateMemMoveFunction()
443 __ mov(eax, Operand(eax, times_4, conv.address(&medium_handlers))); in CreateMemMoveFunction()
444 __ jmp(eax); in CreateMemMoveFunction()
449 __ bind(&f0); in CreateMemMoveFunction()
452 __ bind(&f1); in CreateMemMoveFunction()
453 __ mov_b(eax, Operand(src, 0)); in CreateMemMoveFunction()
454 __ mov_b(Operand(dst, 0), eax); in CreateMemMoveFunction()
457 __ bind(&f2); in CreateMemMoveFunction()
458 __ mov_w(eax, Operand(src, 0)); in CreateMemMoveFunction()
459 __ mov_w(Operand(dst, 0), eax); in CreateMemMoveFunction()
462 __ bind(&f3); in CreateMemMoveFunction()
463 __ mov_w(eax, Operand(src, 0)); in CreateMemMoveFunction()
464 __ mov_b(edx, Operand(src, 2)); in CreateMemMoveFunction()
465 __ mov_w(Operand(dst, 0), eax); in CreateMemMoveFunction()
466 __ mov_b(Operand(dst, 2), edx); in CreateMemMoveFunction()
469 __ bind(&f4); in CreateMemMoveFunction()
470 __ mov(eax, Operand(src, 0)); in CreateMemMoveFunction()
471 __ mov(Operand(dst, 0), eax); in CreateMemMoveFunction()
474 __ bind(&f5_8); in CreateMemMoveFunction()
475 __ mov(eax, Operand(src, 0)); in CreateMemMoveFunction()
476 __ mov(edx, Operand(src, count, times_1, -4)); in CreateMemMoveFunction()
477 __ mov(Operand(dst, 0), eax); in CreateMemMoveFunction()
478 __ mov(Operand(dst, count, times_1, -4), edx); in CreateMemMoveFunction()
481 __ bind(&small_handlers); in CreateMemMoveFunction()
482 __ dd(conv.address(&f0)); in CreateMemMoveFunction()
483 __ dd(conv.address(&f1)); in CreateMemMoveFunction()
484 __ dd(conv.address(&f2)); in CreateMemMoveFunction()
485 __ dd(conv.address(&f3)); in CreateMemMoveFunction()
486 __ dd(conv.address(&f4)); in CreateMemMoveFunction()
487 __ dd(conv.address(&f5_8)); in CreateMemMoveFunction()
488 __ dd(conv.address(&f5_8)); in CreateMemMoveFunction()
489 __ dd(conv.address(&f5_8)); in CreateMemMoveFunction()
490 __ dd(conv.address(&f5_8)); in CreateMemMoveFunction()
492 __ bind(&small_size); // Entry point into this block. in CreateMemMoveFunction()
495 __ cmp(count, 8); in CreateMemMoveFunction()
496 __ j(below_equal, &ok); in CreateMemMoveFunction()
497 __ int3(); in CreateMemMoveFunction()
498 __ bind(&ok); in CreateMemMoveFunction()
500 __ mov(eax, Operand(count, times_4, conv.address(&small_handlers))); in CreateMemMoveFunction()
501 __ jmp(eax); in CreateMemMoveFunction()
504 __ bind(&pop_and_return); in CreateMemMoveFunction()
518 #undef __
523 #define __ ACCESS_MASM(masm) macro
539 __ JumpIfJSArrayHasAllocationMemento( in GenerateMapChangeElementsTransition()
544 __ mov(FieldOperand(receiver, HeapObject::kMapOffset), target_map); in GenerateMapChangeElementsTransition()
545 __ RecordWriteField(receiver, in GenerateMapChangeElementsTransition()
572 __ JumpIfJSArrayHasAllocationMemento(edx, edi, fail); in GenerateSmiToDouble()
577 __ mov(edi, FieldOperand(edx, JSObject::kElementsOffset)); in GenerateSmiToDouble()
578 __ cmp(edi, Immediate(masm->isolate()->factory()->empty_fixed_array())); in GenerateSmiToDouble()
579 __ j(equal, &only_change_map); in GenerateSmiToDouble()
581 __ push(eax); in GenerateSmiToDouble()
582 __ push(ebx); in GenerateSmiToDouble()
584 __ mov(edi, FieldOperand(edi, FixedArray::kLengthOffset)); in GenerateSmiToDouble()
591 __ Allocate(FixedDoubleArray::kHeaderSize, times_8, edi, in GenerateSmiToDouble()
597 __ mov(FieldOperand(eax, HeapObject::kMapOffset), in GenerateSmiToDouble()
599 __ mov(FieldOperand(eax, FixedDoubleArray::kLengthOffset), edi); in GenerateSmiToDouble()
600 __ mov(esi, FieldOperand(edx, JSObject::kElementsOffset)); in GenerateSmiToDouble()
602 __ mov(FieldOperand(edx, JSObject::kElementsOffset), eax); in GenerateSmiToDouble()
603 __ mov(ebx, eax); in GenerateSmiToDouble()
604 __ RecordWriteField(edx, in GenerateSmiToDouble()
612 __ mov(edi, FieldOperand(esi, FixedArray::kLengthOffset)); in GenerateSmiToDouble()
618 __ movsd(the_hole_nan, in GenerateSmiToDouble()
620 __ jmp(&entry); in GenerateSmiToDouble()
623 __ bind(&gc_required); in GenerateSmiToDouble()
625 __ mov(esi, Operand(ebp, StandardFrameConstants::kContextOffset)); in GenerateSmiToDouble()
626 __ pop(ebx); in GenerateSmiToDouble()
627 __ pop(eax); in GenerateSmiToDouble()
628 __ jmp(fail); in GenerateSmiToDouble()
632 __ bind(&loop); in GenerateSmiToDouble()
633 __ mov(ebx, FieldOperand(esi, edi, times_2, FixedArray::kHeaderSize)); in GenerateSmiToDouble()
636 __ JumpIfNotSmi(ebx, &convert_hole); in GenerateSmiToDouble()
639 __ SmiUntag(ebx); in GenerateSmiToDouble()
640 __ Cvtsi2sd(xmm0, ebx); in GenerateSmiToDouble()
641 __ movsd(FieldOperand(eax, edi, times_4, FixedDoubleArray::kHeaderSize), in GenerateSmiToDouble()
643 __ jmp(&entry); in GenerateSmiToDouble()
646 __ bind(&convert_hole); in GenerateSmiToDouble()
649 __ cmp(ebx, masm->isolate()->factory()->the_hole_value()); in GenerateSmiToDouble()
650 __ Assert(equal, kObjectFoundInSmiOnlyArray); in GenerateSmiToDouble()
653 __ movsd(FieldOperand(eax, edi, times_4, FixedDoubleArray::kHeaderSize), in GenerateSmiToDouble()
656 __ bind(&entry); in GenerateSmiToDouble()
657 __ sub(edi, Immediate(Smi::FromInt(1))); in GenerateSmiToDouble()
658 __ j(not_sign, &loop); in GenerateSmiToDouble()
660 __ pop(ebx); in GenerateSmiToDouble()
661 __ pop(eax); in GenerateSmiToDouble()
664 __ mov(esi, Operand(ebp, StandardFrameConstants::kContextOffset)); in GenerateSmiToDouble()
666 __ bind(&only_change_map); in GenerateSmiToDouble()
670 __ mov(FieldOperand(edx, HeapObject::kMapOffset), ebx); in GenerateSmiToDouble()
671 __ RecordWriteField(edx, in GenerateSmiToDouble()
698 __ JumpIfJSArrayHasAllocationMemento(edx, edi, fail); in GenerateDoubleToObject()
703 __ mov(edi, FieldOperand(edx, JSObject::kElementsOffset)); in GenerateDoubleToObject()
704 __ cmp(edi, Immediate(masm->isolate()->factory()->empty_fixed_array())); in GenerateDoubleToObject()
705 __ j(equal, &only_change_map); in GenerateDoubleToObject()
707 __ push(eax); in GenerateDoubleToObject()
708 __ push(edx); in GenerateDoubleToObject()
709 __ push(ebx); in GenerateDoubleToObject()
711 __ mov(ebx, FieldOperand(edi, FixedDoubleArray::kLengthOffset)); in GenerateDoubleToObject()
715 __ lea(edi, Operand(ebx, times_2, FixedArray::kHeaderSize)); in GenerateDoubleToObject()
716 __ Allocate(edi, eax, esi, no_reg, &gc_required, TAG_OBJECT); in GenerateDoubleToObject()
720 __ mov(FieldOperand(eax, HeapObject::kMapOffset), in GenerateDoubleToObject()
722 __ mov(FieldOperand(eax, FixedArray::kLengthOffset), ebx); in GenerateDoubleToObject()
723 __ mov(edi, FieldOperand(edx, JSObject::kElementsOffset)); in GenerateDoubleToObject()
729 __ jmp(&initialization_loop_entry, Label::kNear); in GenerateDoubleToObject()
730 __ bind(&initialization_loop); in GenerateDoubleToObject()
731 __ mov(FieldOperand(eax, ebx, times_2, FixedArray::kHeaderSize), in GenerateDoubleToObject()
733 __ bind(&initialization_loop_entry); in GenerateDoubleToObject()
734 __ sub(ebx, Immediate(Smi::FromInt(1))); in GenerateDoubleToObject()
735 __ j(not_sign, &initialization_loop); in GenerateDoubleToObject()
737 __ mov(ebx, FieldOperand(edi, FixedDoubleArray::kLengthOffset)); in GenerateDoubleToObject()
738 __ jmp(&entry); in GenerateDoubleToObject()
743 __ bind(&only_change_map); in GenerateDoubleToObject()
744 __ mov(FieldOperand(edx, HeapObject::kMapOffset), ebx); in GenerateDoubleToObject()
745 __ RecordWriteField(edx, in GenerateDoubleToObject()
752 __ jmp(&success); in GenerateDoubleToObject()
755 __ bind(&gc_required); in GenerateDoubleToObject()
756 __ mov(esi, Operand(ebp, StandardFrameConstants::kContextOffset)); in GenerateDoubleToObject()
757 __ pop(ebx); in GenerateDoubleToObject()
758 __ pop(edx); in GenerateDoubleToObject()
759 __ pop(eax); in GenerateDoubleToObject()
760 __ jmp(fail); in GenerateDoubleToObject()
765 __ bind(&loop); in GenerateDoubleToObject()
768 __ cmp(FieldOperand(edi, ebx, times_4, offset), Immediate(kHoleNanUpper32)); in GenerateDoubleToObject()
769 __ j(equal, &convert_hole); in GenerateDoubleToObject()
772 __ AllocateHeapNumber(edx, esi, no_reg, &gc_required); in GenerateDoubleToObject()
774 __ movsd(xmm0, in GenerateDoubleToObject()
776 __ movsd(FieldOperand(edx, HeapNumber::kValueOffset), xmm0); in GenerateDoubleToObject()
777 __ mov(FieldOperand(eax, ebx, times_2, FixedArray::kHeaderSize), edx); in GenerateDoubleToObject()
778 __ mov(esi, ebx); in GenerateDoubleToObject()
779 __ RecordWriteArray(eax, in GenerateDoubleToObject()
785 __ jmp(&entry, Label::kNear); in GenerateDoubleToObject()
788 __ bind(&convert_hole); in GenerateDoubleToObject()
789 __ mov(FieldOperand(eax, ebx, times_2, FixedArray::kHeaderSize), in GenerateDoubleToObject()
792 __ bind(&entry); in GenerateDoubleToObject()
793 __ sub(ebx, Immediate(Smi::FromInt(1))); in GenerateDoubleToObject()
794 __ j(not_sign, &loop); in GenerateDoubleToObject()
796 __ pop(ebx); in GenerateDoubleToObject()
797 __ pop(edx); in GenerateDoubleToObject()
801 __ mov(FieldOperand(edx, HeapObject::kMapOffset), ebx); in GenerateDoubleToObject()
802 __ RecordWriteField(edx, in GenerateDoubleToObject()
810 __ mov(FieldOperand(edx, JSObject::kElementsOffset), eax); in GenerateDoubleToObject()
811 __ RecordWriteField(edx, in GenerateDoubleToObject()
820 __ pop(eax); in GenerateDoubleToObject()
821 __ mov(esi, Operand(ebp, StandardFrameConstants::kContextOffset)); in GenerateDoubleToObject()
823 __ bind(&success); in GenerateDoubleToObject()
834 __ mov(result, FieldOperand(string, HeapObject::kMapOffset)); in Generate()
835 __ movzx_b(result, FieldOperand(result, Map::kInstanceTypeOffset)); in Generate()
839 __ test(result, Immediate(kIsIndirectStringMask)); in Generate()
840 __ j(zero, &check_sequential, Label::kNear); in Generate()
844 __ test(result, Immediate(kSlicedNotConsMask)); in Generate()
845 __ j(zero, &cons_string, Label::kNear); in Generate()
849 __ mov(result, FieldOperand(string, SlicedString::kOffsetOffset)); in Generate()
850 __ SmiUntag(result); in Generate()
851 __ add(index, result); in Generate()
852 __ mov(string, FieldOperand(string, SlicedString::kParentOffset)); in Generate()
853 __ jmp(&indirect_string_loaded, Label::kNear); in Generate()
860 __ bind(&cons_string); in Generate()
861 __ cmp(FieldOperand(string, ConsString::kSecondOffset), in Generate()
863 __ j(not_equal, call_runtime); in Generate()
864 __ mov(string, FieldOperand(string, ConsString::kFirstOffset)); in Generate()
866 __ bind(&indirect_string_loaded); in Generate()
867 __ mov(result, FieldOperand(string, HeapObject::kMapOffset)); in Generate()
868 __ movzx_b(result, FieldOperand(result, Map::kInstanceTypeOffset)); in Generate()
874 __ bind(&check_sequential); in Generate()
876 __ test(result, Immediate(kStringRepresentationMask)); in Generate()
877 __ j(zero, &seq_string, Label::kNear); in Generate()
884 __ test(result, Immediate(kIsIndirectStringMask)); in Generate()
885 __ Assert(zero, kExternalStringExpectedButNotFound); in Generate()
889 __ test_b(result, kShortExternalStringMask); in Generate()
890 __ j(not_zero, call_runtime); in Generate()
893 __ test_b(result, kStringEncodingMask); in Generate()
894 __ mov(result, FieldOperand(string, ExternalString::kResourceDataOffset)); in Generate()
895 __ j(not_equal, &one_byte_external, Label::kNear); in Generate()
897 __ movzx_w(result, Operand(result, index, times_2, 0)); in Generate()
898 __ jmp(&done, Label::kNear); in Generate()
899 __ bind(&one_byte_external); in Generate()
901 __ movzx_b(result, Operand(result, index, times_1, 0)); in Generate()
902 __ jmp(&done, Label::kNear); in Generate()
906 __ bind(&seq_string); in Generate()
909 __ test(result, Immediate(kStringEncodingMask)); in Generate()
910 __ j(not_zero, &one_byte, Label::kNear); in Generate()
914 __ movzx_w(result, FieldOperand(string, in Generate()
918 __ jmp(&done, Label::kNear); in Generate()
922 __ bind(&one_byte); in Generate()
923 __ movzx_b(result, FieldOperand(string, in Generate()
927 __ bind(&done); in Generate()
951 __ movsd(double_scratch, ExpConstant(0)); in EmitMathExp()
952 __ xorpd(result, result); in EmitMathExp()
953 __ ucomisd(double_scratch, input); in EmitMathExp()
954 __ j(above_equal, &done); in EmitMathExp()
955 __ ucomisd(input, ExpConstant(1)); in EmitMathExp()
956 __ movsd(result, ExpConstant(2)); in EmitMathExp()
957 __ j(above_equal, &done); in EmitMathExp()
958 __ movsd(double_scratch, ExpConstant(3)); in EmitMathExp()
959 __ movsd(result, ExpConstant(4)); in EmitMathExp()
960 __ mulsd(double_scratch, input); in EmitMathExp()
961 __ addsd(double_scratch, result); in EmitMathExp()
962 __ movd(temp2, double_scratch); in EmitMathExp()
963 __ subsd(double_scratch, result); in EmitMathExp()
964 __ movsd(result, ExpConstant(6)); in EmitMathExp()
965 __ mulsd(double_scratch, ExpConstant(5)); in EmitMathExp()
966 __ subsd(double_scratch, input); in EmitMathExp()
967 __ subsd(result, double_scratch); in EmitMathExp()
968 __ movsd(input, double_scratch); in EmitMathExp()
969 __ mulsd(input, double_scratch); in EmitMathExp()
970 __ mulsd(result, input); in EmitMathExp()
971 __ mov(temp1, temp2); in EmitMathExp()
972 __ mulsd(result, ExpConstant(7)); in EmitMathExp()
973 __ subsd(result, double_scratch); in EmitMathExp()
974 __ add(temp1, Immediate(0x1ff800)); in EmitMathExp()
975 __ addsd(result, ExpConstant(8)); in EmitMathExp()
976 __ and_(temp2, Immediate(0x7ff)); in EmitMathExp()
977 __ shr(temp1, 11); in EmitMathExp()
978 __ shl(temp1, 20); in EmitMathExp()
979 __ movd(input, temp1); in EmitMathExp()
980 __ pshufd(input, input, static_cast<uint8_t>(0xe1)); // Order: 11 10 00 01 in EmitMathExp()
981 __ movsd(double_scratch, Operand::StaticArray( in EmitMathExp()
983 __ orps(input, double_scratch); in EmitMathExp()
984 __ mulsd(result, input); in EmitMathExp()
985 __ bind(&done); in EmitMathExp()
988 #undef __