OLD | NEW |
1 // Copyright 2013 the V8 project authors. All rights reserved. | 1 // Copyright 2013 the V8 project authors. All rights reserved. |
2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
4 // met: | 4 // met: |
5 // | 5 // |
6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
(...skipping 306 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
317 __ Add(dst_end, dst_elements, Operand(length, LSL, kPointerSizeLog2)); | 317 __ Add(dst_end, dst_elements, Operand(length, LSL, kPointerSizeLog2)); |
318 | 318 |
319 Register the_hole = x14; | 319 Register the_hole = x14; |
320 Register heap_num_map = x15; | 320 Register heap_num_map = x15; |
321 __ LoadRoot(the_hole, Heap::kTheHoleValueRootIndex); | 321 __ LoadRoot(the_hole, Heap::kTheHoleValueRootIndex); |
322 __ LoadRoot(heap_num_map, Heap::kHeapNumberMapRootIndex); | 322 __ LoadRoot(heap_num_map, Heap::kHeapNumberMapRootIndex); |
323 | 323 |
324 Label entry; | 324 Label entry; |
325 __ B(&entry); | 325 __ B(&entry); |
326 | 326 |
327 Label gc_cleanup; | |
328 __ Bind(&gc_cleanup); | |
329 #ifdef VERIFY_HEAP | |
330 // Make sure new space is iterable if we are verifying the heap. | |
331 __ Mov(x5, Operand(masm->isolate()->factory()->one_pointer_filler_map())); | |
332 __ Str(x5, MemOperand(dst_elements, kPointerSize, PostIndex)); | |
333 __ Cmp(dst_elements, dst_end); | |
334 __ B(lt, &gc_cleanup); | |
335 #endif | |
336 | |
337 // Call into runtime if GC is required. | 327 // Call into runtime if GC is required. |
338 __ Bind(&gc_required); | 328 __ Bind(&gc_required); |
339 __ Pop(value, key, receiver, target_map); | 329 __ Pop(value, key, receiver, target_map); |
340 __ Pop(lr); | 330 __ Pop(lr); |
341 __ B(fail); | 331 __ B(fail); |
342 | 332 |
343 { | 333 { |
344 Label loop, convert_hole; | 334 Label loop, convert_hole; |
345 __ Bind(&loop); | 335 __ Bind(&loop); |
346 __ Ldr(x13, MemOperand(src_elements, kPointerSize, PostIndex)); | 336 __ Ldr(x13, MemOperand(src_elements, kPointerSize, PostIndex)); |
347 __ Cmp(x13, kHoleNanInt64); | 337 __ Cmp(x13, kHoleNanInt64); |
348 __ B(eq, &convert_hole); | 338 __ B(eq, &convert_hole); |
349 | 339 |
350 // Non-hole double, copy value into a heap number. | 340 // Non-hole double, copy value into a heap number. |
351 Register heap_num = x5; | 341 Register heap_num = x5; |
352 __ AllocateHeapNumber(heap_num, &gc_cleanup, x6, x4, | 342 __ AllocateHeapNumber(heap_num, &gc_required, x6, x4, |
353 x13, heap_num_map); | 343 x13, heap_num_map); |
354 __ Mov(x13, dst_elements); | 344 __ Mov(x13, dst_elements); |
355 __ Str(heap_num, MemOperand(dst_elements, kPointerSize, PostIndex)); | 345 __ Str(heap_num, MemOperand(dst_elements, kPointerSize, PostIndex)); |
356 __ RecordWrite(array, x13, heap_num, kLRHasBeenSaved, kDontSaveFPRegs, | 346 __ RecordWrite(array, x13, heap_num, kLRHasBeenSaved, kDontSaveFPRegs, |
357 EMIT_REMEMBERED_SET, OMIT_SMI_CHECK); | 347 EMIT_REMEMBERED_SET, OMIT_SMI_CHECK); |
358 | 348 |
359 __ B(&entry); | 349 __ B(&entry); |
360 | 350 |
361 // Replace the-hole NaN with the-hole pointer. | 351 // Replace the-hole NaN with the-hole pointer. |
362 __ Bind(&convert_hole); | 352 __ Bind(&convert_hole); |
(...skipping 253 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
616 __ Fmul(result, double_temp3, double_temp1); | 606 __ Fmul(result, double_temp3, double_temp1); |
617 | 607 |
618 __ Bind(&done); | 608 __ Bind(&done); |
619 } | 609 } |
620 | 610 |
621 #undef __ | 611 #undef __ |
622 | 612 |
623 } } // namespace v8::internal | 613 } } // namespace v8::internal |
624 | 614 |
625 #endif // V8_TARGET_ARCH_ARM64 | 615 #endif // V8_TARGET_ARCH_ARM64 |
OLD | NEW |