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

Side by Side Diff: src/x64/lithium-codegen-x64.cc

Issue 6262013: X64 Crankshaft: Added some functions needed for delta-blue. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge/build-x64
Patch Set: Created 9 years, 11 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 | « no previous file | src/x64/lithium-x64.cc » ('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 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
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 Abort("Unimplemented: %s", "DoLoadGlobal"); 1392 Register result = ToRegister(instr->result());
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 }
1393 } 1405 }
1394 1406
1395 1407
1396 void LCodeGen::DoStoreGlobal(LStoreGlobal* instr) { 1408 void LCodeGen::DoStoreGlobal(LStoreGlobal* instr) {
1397 Abort("Unimplemented: %s", "DoStoreGlobal"); 1409 Abort("Unimplemented: %s", "DoStoreGlobal");
1398 } 1410 }
1399 1411
1400 1412
1401 void LCodeGen::DoLoadContextSlot(LLoadContextSlot* instr) { 1413 void LCodeGen::DoLoadContextSlot(LLoadContextSlot* instr) {
1402 Abort("Unimplemented: %s", "DoLoadContextSlot"); 1414 Abort("Unimplemented: %s", "DoLoadContextSlot");
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
1447 Abort("Unimplemented: %s", "DoArgumentsLength"); 1459 Abort("Unimplemented: %s", "DoArgumentsLength");
1448 } 1460 }
1449 1461
1450 1462
1451 void LCodeGen::DoApplyArguments(LApplyArguments* instr) { 1463 void LCodeGen::DoApplyArguments(LApplyArguments* instr) {
1452 Abort("Unimplemented: %s", "DoApplyArguments"); 1464 Abort("Unimplemented: %s", "DoApplyArguments");
1453 } 1465 }
1454 1466
1455 1467
1456 void LCodeGen::DoPushArgument(LPushArgument* instr) { 1468 void LCodeGen::DoPushArgument(LPushArgument* instr) {
1457 Abort("Unimplemented: %s", "DoPushArgument"); 1469 LOperand* argument = instr->InputAt(0);
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());
William Hesse 2011/01/25 13:55:07 Don't we have more of a problem with DoubleStackSl
Lasse Reichstein 2011/01/25 14:01:11 I don't think it can happen (from reading the ia32
1487 __ push(ToOperand(argument));
1488 }
1458 } 1489 }
1459 1490
1460 1491
1461 void LCodeGen::DoGlobalObject(LGlobalObject* instr) { 1492 void LCodeGen::DoGlobalObject(LGlobalObject* instr) {
1462 Register result = ToRegister(instr->result()); 1493 Register result = ToRegister(instr->result());
1463 __ movq(result, GlobalObjectOperand()); 1494 __ movq(result, GlobalObjectOperand());
1464 } 1495 }
1465 1496
1466 1497
1467 void LCodeGen::DoGlobalReceiver(LGlobalReceiver* instr) { 1498 void LCodeGen::DoGlobalReceiver(LGlobalReceiver* instr) {
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after
1555 Abort("Unimplemented: %s", "DoCallGlobal"); 1586 Abort("Unimplemented: %s", "DoCallGlobal");
1556 } 1587 }
1557 1588
1558 1589
1559 void LCodeGen::DoCallKnownGlobal(LCallKnownGlobal* instr) { 1590 void LCodeGen::DoCallKnownGlobal(LCallKnownGlobal* instr) {
1560 Abort("Unimplemented: %s", "DoCallKnownGlobal"); 1591 Abort("Unimplemented: %s", "DoCallKnownGlobal");
1561 } 1592 }
1562 1593
1563 1594
1564 void LCodeGen::DoCallNew(LCallNew* instr) { 1595 void LCodeGen::DoCallNew(LCallNew* instr) {
1565 Abort("Unimplemented: %s", "DoCallNew"); 1596 ASSERT(ToRegister(instr->InputAt(0)).is(rdi));
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);
1566 } 1602 }
1567 1603
1568 1604
1569 void LCodeGen::DoCallRuntime(LCallRuntime* instr) { 1605 void LCodeGen::DoCallRuntime(LCallRuntime* instr) {
1570 Abort("Unimplemented: %s", "DoCallRuntime"); 1606 Abort("Unimplemented: %s", "DoCallRuntime");
1571 } 1607 }
1572 1608
1573 1609
1574 void LCodeGen::DoStoreNamedField(LStoreNamedField* instr) { 1610 void LCodeGen::DoStoreNamedField(LStoreNamedField* instr) {
1575 Abort("Unimplemented: %s", "DoStoreNamedField"); 1611 Abort("Unimplemented: %s", "DoStoreNamedField");
(...skipping 139 matching lines...) Expand 10 before | Expand all | Expand 10 after
1715 Abort("Unimplemented: %s", "DoNumberUntagD"); 1751 Abort("Unimplemented: %s", "DoNumberUntagD");
1716 } 1752 }
1717 1753
1718 1754
1719 void LCodeGen::DoDoubleToI(LDoubleToI* instr) { 1755 void LCodeGen::DoDoubleToI(LDoubleToI* instr) {
1720 Abort("Unimplemented: %s", "DoDoubleToI"); 1756 Abort("Unimplemented: %s", "DoDoubleToI");
1721 } 1757 }
1722 1758
1723 1759
1724 void LCodeGen::DoCheckSmi(LCheckSmi* instr) { 1760 void LCodeGen::DoCheckSmi(LCheckSmi* instr) {
1725 Abort("Unimplemented: %s", "DoCheckSmi"); 1761 LOperand* input = instr->InputAt(0);
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());
1726 } 1768 }
1727 1769
1728 1770
1729 void LCodeGen::DoCheckInstanceType(LCheckInstanceType* instr) { 1771 void LCodeGen::DoCheckInstanceType(LCheckInstanceType* instr) {
1730 Abort("Unimplemented: %s", "DoCheckInstanceType"); 1772 Abort("Unimplemented: %s", "DoCheckInstanceType");
1731 } 1773 }
1732 1774
1733 1775
1734 void LCodeGen::DoCheckFunction(LCheckFunction* instr) { 1776 void LCodeGen::DoCheckFunction(LCheckFunction* instr) {
1735 Abort("Unimplemented: %s", "DoCheckFunction"); 1777 Abort("Unimplemented: %s", "DoCheckFunction");
1736 } 1778 }
1737 1779
1738 1780
1739 void LCodeGen::DoCheckMap(LCheckMap* instr) { 1781 void LCodeGen::DoCheckMap(LCheckMap* instr) {
1740 Abort("Unimplemented: %s", "DoCheckMap"); 1782 LOperand* input = instr->InputAt(0);
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());
1741 } 1788 }
1742 1789
1743 1790
1744 void LCodeGen::LoadHeapObject(Register result, Handle<HeapObject> object) { 1791 void LCodeGen::LoadHeapObject(Register result, Handle<HeapObject> object) {
1745 Abort("Unimplemented: %s", "LoadHeapObject"); 1792 Abort("Unimplemented: %s", "LoadHeapObject");
1746 } 1793 }
1747 1794
1748 1795
1749 void LCodeGen::DoCheckPrototypeMaps(LCheckPrototypeMaps* instr) { 1796 void LCodeGen::DoCheckPrototypeMaps(LCheckPrototypeMaps* instr) {
1750 Abort("Unimplemented: %s", "DoCheckPrototypeMaps"); 1797 Abort("Unimplemented: %s", "DoCheckPrototypeMaps");
(...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after
1892 1939
1893 void LCodeGen::DoOsrEntry(LOsrEntry* instr) { 1940 void LCodeGen::DoOsrEntry(LOsrEntry* instr) {
1894 Abort("Unimplemented: %s", "DoOsrEntry"); 1941 Abort("Unimplemented: %s", "DoOsrEntry");
1895 } 1942 }
1896 1943
1897 #undef __ 1944 #undef __
1898 1945
1899 } } // namespace v8::internal 1946 } } // namespace v8::internal
1900 1947
1901 #endif // V8_TARGET_ARCH_X64 1948 #endif // V8_TARGET_ARCH_X64
OLDNEW
« no previous file with comments | « no previous file | src/x64/lithium-x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698