Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(346)

Side by Side Diff: src/a64/ic-a64.cc

Issue 153923005: A64: Synchronize with r17525. (Closed) Base URL: https://v8.googlecode.com/svn/branches/experimental/a64
Patch Set: Created 6 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « src/a64/full-codegen-a64.cc ('k') | src/a64/macro-assembler-a64.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 1374 matching lines...) Expand 10 before | Expand all | Expand 10 after
1385 Label finish_store; 1385 Label finish_store;
1386 1386
1387 __ Bind(fast_object); 1387 __ Bind(fast_object);
1388 if (check_map == kCheckMap) { 1388 if (check_map == kCheckMap) {
1389 __ Ldr(elements_map, FieldMemOperand(elements, HeapObject::kMapOffset)); 1389 __ Ldr(elements_map, FieldMemOperand(elements, HeapObject::kMapOffset));
1390 __ Cmp(elements_map, 1390 __ Cmp(elements_map,
1391 Operand(masm->isolate()->factory()->fixed_array_map())); 1391 Operand(masm->isolate()->factory()->fixed_array_map()));
1392 __ B(ne, fast_double); 1392 __ B(ne, fast_double);
1393 } 1393 }
1394 1394
1395 // HOLECHECK: guards "A[i] = V"
1396 // We have to go to the runtime if the current value is the hole because there
1397 // may be a callback on the element.
1398 Label holecheck_passed;
1399 // TODO(all): This address calculation is repeated later (for the store
1400 // itself). We should keep the result to avoid doing the work twice.
1401 __ Add(x10, elements, FixedArray::kHeaderSize - kHeapObjectTag);
1402 __ Add(x10, x10, Operand::UntagSmiAndScale(key, kPointerSizeLog2));
1403 __ Ldr(x11, MemOperand(x10));
1404 __ JumpIfNotRoot(x11, Heap::kTheHoleValueRootIndex, &holecheck_passed);
1405 __ JumpIfDictionaryInPrototypeChain(receiver, elements_map, x10, slow);
1406 __ bind(&holecheck_passed);
1407
1395 // Smi stores don't require further checks. 1408 // Smi stores don't require further checks.
1396 __ JumpIfSmi(value, &finish_store); 1409 __ JumpIfSmi(value, &finish_store);
1397 1410
1398 // Escape to elements kind transition case. 1411 // Escape to elements kind transition case.
1399 __ CheckFastObjectElements(receiver_map, x10, &transition_smi_elements); 1412 __ CheckFastObjectElements(receiver_map, x10, &transition_smi_elements);
1400 1413
1401 __ Bind(&finish_store); 1414 __ Bind(&finish_store);
1402 if (increment_length == kIncrementLength) { 1415 if (increment_length == kIncrementLength) {
1403 // Add 1 to receiver->length. 1416 // Add 1 to receiver->length.
1404 __ Add(x10, key, Operand(Smi::FromInt(1))); 1417 __ Add(x10, key, Operand(Smi::FromInt(1)));
(...skipping 23 matching lines...) Expand all
1428 __ Ret(); 1441 __ Ret();
1429 1442
1430 1443
1431 __ Bind(fast_double); 1444 __ Bind(fast_double);
1432 if (check_map == kCheckMap) { 1445 if (check_map == kCheckMap) {
1433 // Check for fast double array case. If this fails, call through to the 1446 // Check for fast double array case. If this fails, call through to the
1434 // runtime. 1447 // runtime.
1435 __ JumpIfNotRoot(elements_map, Heap::kFixedDoubleArrayMapRootIndex, slow); 1448 __ JumpIfNotRoot(elements_map, Heap::kFixedDoubleArrayMapRootIndex, slow);
1436 } 1449 }
1437 1450
1451 // HOLECHECK: guards "A[i] double hole?"
1452 // We have to see if the double version of the hole is present. If so go to
1453 // the runtime.
1454 // TODO(all): This address calculation was done earlier. We should keep the
1455 // result to avoid doing the work twice.
1456 __ Add(x10, elements, FixedDoubleArray::kHeaderSize - kHeapObjectTag);
1457 __ Add(x10, x10, Operand::UntagSmiAndScale(key, kPointerSizeLog2));
1458 __ Ldr(x11, MemOperand(x10));
1459 __ CompareAndBranch(x11, kHoleNanInt64, ne, &fast_double_without_map_check);
1460 __ JumpIfDictionaryInPrototypeChain(receiver, elements_map, x10, slow);
1461
1438 __ Bind(&fast_double_without_map_check); 1462 __ Bind(&fast_double_without_map_check);
1439 __ StoreNumberToDoubleElements(value, 1463 __ StoreNumberToDoubleElements(value,
1440 key, 1464 key,
1441 elements, 1465 elements,
1442 x10, 1466 x10,
1443 d0, 1467 d0,
1444 d1, 1468 d1,
1445 &transition_double_elements); 1469 &transition_double_elements);
1446 if (increment_length == kIncrementLength) { 1470 if (increment_length == kIncrementLength) {
1447 // Add 1 to receiver->length. 1471 // Add 1 to receiver->length.
(...skipping 349 matching lines...) Expand 10 before | Expand all | Expand 10 after
1797 ASSERT(to_patch->Mask(TestBranchMask) == TBNZ); 1821 ASSERT(to_patch->Mask(TestBranchMask) == TBNZ);
1798 // This is JumpIfSmi(smi_reg, branch_imm). 1822 // This is JumpIfSmi(smi_reg, branch_imm).
1799 patcher.tbz(smi_reg, 0, branch_imm); 1823 patcher.tbz(smi_reg, 0, branch_imm);
1800 } 1824 }
1801 } 1825 }
1802 1826
1803 1827
1804 } } // namespace v8::internal 1828 } } // namespace v8::internal
1805 1829
1806 #endif // V8_TARGET_ARCH_A64 1830 #endif // V8_TARGET_ARCH_A64
OLDNEW
« no previous file with comments | « src/a64/full-codegen-a64.cc ('k') | src/a64/macro-assembler-a64.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698