| OLD | NEW |
| 1 // Copyright 2011 the V8 project authors. All rights reserved. | 1 // Copyright 2011 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 1371 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1382 __ push(rax); | 1382 __ push(rax); |
| 1383 __ CallRuntime(Runtime::kTraceExit, 1); | 1383 __ CallRuntime(Runtime::kTraceExit, 1); |
| 1384 } | 1384 } |
| 1385 __ movq(rsp, rbp); | 1385 __ movq(rsp, rbp); |
| 1386 __ pop(rbp); | 1386 __ pop(rbp); |
| 1387 __ ret((ParameterCount() + 1) * kPointerSize); | 1387 __ ret((ParameterCount() + 1) * kPointerSize); |
| 1388 } | 1388 } |
| 1389 | 1389 |
| 1390 | 1390 |
| 1391 void LCodeGen::DoLoadGlobal(LLoadGlobal* instr) { | 1391 void LCodeGen::DoLoadGlobal(LLoadGlobal* instr) { |
| 1392 Register result = ToRegister(instr->result()); | 1392 Abort("Unimplemented: %s", "DoLoadGlobal"); |
| 1393 if (result.is(rax)) { | |
| 1394 __ load_rax(instr->hydrogen()->cell().location(), | |
| 1395 RelocInfo::GLOBAL_PROPERTY_CELL); | |
| 1396 } else { | |
| 1397 __ movq(result, instr->hydrogen()->cell().location(), | |
| 1398 RelocInfo::GLOBAL_PROPERTY_CELL); | |
| 1399 __ movq(result, Operand(result, 0)); | |
| 1400 } | |
| 1401 if (instr->hydrogen()->check_hole_value()) { | |
| 1402 __ CompareRoot(result, Heap::kTheHoleValueRootIndex); | |
| 1403 DeoptimizeIf(equal, instr->environment()); | |
| 1404 } | |
| 1405 } | 1393 } |
| 1406 | 1394 |
| 1407 | 1395 |
| 1408 void LCodeGen::DoStoreGlobal(LStoreGlobal* instr) { | 1396 void LCodeGen::DoStoreGlobal(LStoreGlobal* instr) { |
| 1409 Abort("Unimplemented: %s", "DoStoreGlobal"); | 1397 Abort("Unimplemented: %s", "DoStoreGlobal"); |
| 1410 } | 1398 } |
| 1411 | 1399 |
| 1412 | 1400 |
| 1413 void LCodeGen::DoLoadContextSlot(LLoadContextSlot* instr) { | 1401 void LCodeGen::DoLoadContextSlot(LLoadContextSlot* instr) { |
| 1414 Abort("Unimplemented: %s", "DoLoadContextSlot"); | 1402 Abort("Unimplemented: %s", "DoLoadContextSlot"); |
| (...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1459 Abort("Unimplemented: %s", "DoArgumentsLength"); | 1447 Abort("Unimplemented: %s", "DoArgumentsLength"); |
| 1460 } | 1448 } |
| 1461 | 1449 |
| 1462 | 1450 |
| 1463 void LCodeGen::DoApplyArguments(LApplyArguments* instr) { | 1451 void LCodeGen::DoApplyArguments(LApplyArguments* instr) { |
| 1464 Abort("Unimplemented: %s", "DoApplyArguments"); | 1452 Abort("Unimplemented: %s", "DoApplyArguments"); |
| 1465 } | 1453 } |
| 1466 | 1454 |
| 1467 | 1455 |
| 1468 void LCodeGen::DoPushArgument(LPushArgument* instr) { | 1456 void LCodeGen::DoPushArgument(LPushArgument* instr) { |
| 1469 LOperand* argument = instr->InputAt(0); | 1457 Abort("Unimplemented: %s", "DoPushArgument"); |
| 1470 if (argument->IsConstantOperand()) { | |
| 1471 LConstantOperand* const_op = LConstantOperand::cast(argument); | |
| 1472 Handle<Object> literal = chunk_->LookupLiteral(const_op); | |
| 1473 Representation r = chunk_->LookupLiteralRepresentation(const_op); | |
| 1474 if (r.IsInteger32()) { | |
| 1475 ASSERT(literal->IsNumber()); | |
| 1476 __ push(Immediate(static_cast<int32_t>(literal->Number()))); | |
| 1477 } else if (r.IsDouble()) { | |
| 1478 Abort("unsupported double immediate"); | |
| 1479 } else { | |
| 1480 ASSERT(r.IsTagged()); | |
| 1481 __ Push(literal); | |
| 1482 } | |
| 1483 } else if (argument->IsRegister()) { | |
| 1484 __ push(ToRegister(argument)); | |
| 1485 } else { | |
| 1486 ASSERT(!argument->IsDoubleRegister()); | |
| 1487 __ push(ToOperand(argument)); | |
| 1488 } | |
| 1489 } | 1458 } |
| 1490 | 1459 |
| 1491 | 1460 |
| 1492 void LCodeGen::DoGlobalObject(LGlobalObject* instr) { | 1461 void LCodeGen::DoGlobalObject(LGlobalObject* instr) { |
| 1493 Register result = ToRegister(instr->result()); | 1462 Register result = ToRegister(instr->result()); |
| 1494 __ movq(result, GlobalObjectOperand()); | 1463 __ movq(result, GlobalObjectOperand()); |
| 1495 } | 1464 } |
| 1496 | 1465 |
| 1497 | 1466 |
| 1498 void LCodeGen::DoGlobalReceiver(LGlobalReceiver* instr) { | 1467 void LCodeGen::DoGlobalReceiver(LGlobalReceiver* instr) { |
| (...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1586 Abort("Unimplemented: %s", "DoCallGlobal"); | 1555 Abort("Unimplemented: %s", "DoCallGlobal"); |
| 1587 } | 1556 } |
| 1588 | 1557 |
| 1589 | 1558 |
| 1590 void LCodeGen::DoCallKnownGlobal(LCallKnownGlobal* instr) { | 1559 void LCodeGen::DoCallKnownGlobal(LCallKnownGlobal* instr) { |
| 1591 Abort("Unimplemented: %s", "DoCallKnownGlobal"); | 1560 Abort("Unimplemented: %s", "DoCallKnownGlobal"); |
| 1592 } | 1561 } |
| 1593 | 1562 |
| 1594 | 1563 |
| 1595 void LCodeGen::DoCallNew(LCallNew* instr) { | 1564 void LCodeGen::DoCallNew(LCallNew* instr) { |
| 1596 ASSERT(ToRegister(instr->InputAt(0)).is(rdi)); | 1565 Abort("Unimplemented: %s", "DoCallNew"); |
| 1597 ASSERT(ToRegister(instr->result()).is(rax)); | |
| 1598 | |
| 1599 Handle<Code> builtin(Builtins::builtin(Builtins::JSConstructCall)); | |
| 1600 __ Set(rax, instr->arity()); | |
| 1601 CallCode(builtin, RelocInfo::CONSTRUCT_CALL, instr); | |
| 1602 } | 1566 } |
| 1603 | 1567 |
| 1604 | 1568 |
| 1605 void LCodeGen::DoCallRuntime(LCallRuntime* instr) { | 1569 void LCodeGen::DoCallRuntime(LCallRuntime* instr) { |
| 1606 Abort("Unimplemented: %s", "DoCallRuntime"); | 1570 Abort("Unimplemented: %s", "DoCallRuntime"); |
| 1607 } | 1571 } |
| 1608 | 1572 |
| 1609 | 1573 |
| 1610 void LCodeGen::DoStoreNamedField(LStoreNamedField* instr) { | 1574 void LCodeGen::DoStoreNamedField(LStoreNamedField* instr) { |
| 1611 Abort("Unimplemented: %s", "DoStoreNamedField"); | 1575 Abort("Unimplemented: %s", "DoStoreNamedField"); |
| (...skipping 139 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1751 Abort("Unimplemented: %s", "DoNumberUntagD"); | 1715 Abort("Unimplemented: %s", "DoNumberUntagD"); |
| 1752 } | 1716 } |
| 1753 | 1717 |
| 1754 | 1718 |
| 1755 void LCodeGen::DoDoubleToI(LDoubleToI* instr) { | 1719 void LCodeGen::DoDoubleToI(LDoubleToI* instr) { |
| 1756 Abort("Unimplemented: %s", "DoDoubleToI"); | 1720 Abort("Unimplemented: %s", "DoDoubleToI"); |
| 1757 } | 1721 } |
| 1758 | 1722 |
| 1759 | 1723 |
| 1760 void LCodeGen::DoCheckSmi(LCheckSmi* instr) { | 1724 void LCodeGen::DoCheckSmi(LCheckSmi* instr) { |
| 1761 LOperand* input = instr->InputAt(0); | 1725 Abort("Unimplemented: %s", "DoCheckSmi"); |
| 1762 ASSERT(input->IsRegister()); | |
| 1763 Condition cc = masm()->CheckSmi(ToRegister(input)); | |
| 1764 if (instr->condition() != equal) { | |
| 1765 cc = NegateCondition(cc); | |
| 1766 } | |
| 1767 DeoptimizeIf(cc, instr->environment()); | |
| 1768 } | 1726 } |
| 1769 | 1727 |
| 1770 | 1728 |
| 1771 void LCodeGen::DoCheckInstanceType(LCheckInstanceType* instr) { | 1729 void LCodeGen::DoCheckInstanceType(LCheckInstanceType* instr) { |
| 1772 Abort("Unimplemented: %s", "DoCheckInstanceType"); | 1730 Abort("Unimplemented: %s", "DoCheckInstanceType"); |
| 1773 } | 1731 } |
| 1774 | 1732 |
| 1775 | 1733 |
| 1776 void LCodeGen::DoCheckFunction(LCheckFunction* instr) { | 1734 void LCodeGen::DoCheckFunction(LCheckFunction* instr) { |
| 1777 Abort("Unimplemented: %s", "DoCheckFunction"); | 1735 Abort("Unimplemented: %s", "DoCheckFunction"); |
| 1778 } | 1736 } |
| 1779 | 1737 |
| 1780 | 1738 |
| 1781 void LCodeGen::DoCheckMap(LCheckMap* instr) { | 1739 void LCodeGen::DoCheckMap(LCheckMap* instr) { |
| 1782 LOperand* input = instr->InputAt(0); | 1740 Abort("Unimplemented: %s", "DoCheckMap"); |
| 1783 ASSERT(input->IsRegister()); | |
| 1784 Register reg = ToRegister(input); | |
| 1785 __ Cmp(FieldOperand(reg, HeapObject::kMapOffset), | |
| 1786 instr->hydrogen()->map()); | |
| 1787 DeoptimizeIf(not_equal, instr->environment()); | |
| 1788 } | 1741 } |
| 1789 | 1742 |
| 1790 | 1743 |
| 1791 void LCodeGen::LoadHeapObject(Register result, Handle<HeapObject> object) { | 1744 void LCodeGen::LoadHeapObject(Register result, Handle<HeapObject> object) { |
| 1792 Abort("Unimplemented: %s", "LoadHeapObject"); | 1745 Abort("Unimplemented: %s", "LoadHeapObject"); |
| 1793 } | 1746 } |
| 1794 | 1747 |
| 1795 | 1748 |
| 1796 void LCodeGen::DoCheckPrototypeMaps(LCheckPrototypeMaps* instr) { | 1749 void LCodeGen::DoCheckPrototypeMaps(LCheckPrototypeMaps* instr) { |
| 1797 Abort("Unimplemented: %s", "DoCheckPrototypeMaps"); | 1750 Abort("Unimplemented: %s", "DoCheckPrototypeMaps"); |
| (...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1939 | 1892 |
| 1940 void LCodeGen::DoOsrEntry(LOsrEntry* instr) { | 1893 void LCodeGen::DoOsrEntry(LOsrEntry* instr) { |
| 1941 Abort("Unimplemented: %s", "DoOsrEntry"); | 1894 Abort("Unimplemented: %s", "DoOsrEntry"); |
| 1942 } | 1895 } |
| 1943 | 1896 |
| 1944 #undef __ | 1897 #undef __ |
| 1945 | 1898 |
| 1946 } } // namespace v8::internal | 1899 } } // namespace v8::internal |
| 1947 | 1900 |
| 1948 #endif // V8_TARGET_ARCH_X64 | 1901 #endif // V8_TARGET_ARCH_X64 |
| OLD | NEW |