OLD | NEW |
1 // Copyright 2014 the V8 project authors. All rights reserved. | 1 // Copyright 2014 the V8 project authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "src/compiler/instruction-selector.h" | 5 #include "src/compiler/instruction-selector.h" |
6 | 6 |
7 #include <limits> | 7 #include <limits> |
8 | 8 |
9 #include "src/base/adapters.h" | 9 #include "src/base/adapters.h" |
10 #include "src/compiler/compiler-source-position-table.h" | 10 #include "src/compiler/compiler-source-position-table.h" |
(...skipping 1464 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1475 case IrOpcode::kCreateInt32x4: | 1475 case IrOpcode::kCreateInt32x4: |
1476 return MarkAsSimd128(node), VisitCreateInt32x4(node); | 1476 return MarkAsSimd128(node), VisitCreateInt32x4(node); |
1477 case IrOpcode::kInt32x4ExtractLane: | 1477 case IrOpcode::kInt32x4ExtractLane: |
1478 return MarkAsWord32(node), VisitInt32x4ExtractLane(node); | 1478 return MarkAsWord32(node), VisitInt32x4ExtractLane(node); |
1479 case IrOpcode::kInt32x4ReplaceLane: | 1479 case IrOpcode::kInt32x4ReplaceLane: |
1480 return MarkAsSimd128(node), VisitInt32x4ReplaceLane(node); | 1480 return MarkAsSimd128(node), VisitInt32x4ReplaceLane(node); |
1481 case IrOpcode::kInt32x4FromFloat32x4: | 1481 case IrOpcode::kInt32x4FromFloat32x4: |
1482 return MarkAsSimd128(node), VisitInt32x4FromFloat32x4(node); | 1482 return MarkAsSimd128(node), VisitInt32x4FromFloat32x4(node); |
1483 case IrOpcode::kUint32x4FromFloat32x4: | 1483 case IrOpcode::kUint32x4FromFloat32x4: |
1484 return MarkAsSimd128(node), VisitUint32x4FromFloat32x4(node); | 1484 return MarkAsSimd128(node), VisitUint32x4FromFloat32x4(node); |
| 1485 case IrOpcode::kInt32x4Neg: |
| 1486 return MarkAsSimd128(node), VisitInt32x4Neg(node); |
1485 case IrOpcode::kInt32x4Add: | 1487 case IrOpcode::kInt32x4Add: |
1486 return MarkAsSimd128(node), VisitInt32x4Add(node); | 1488 return MarkAsSimd128(node), VisitInt32x4Add(node); |
1487 case IrOpcode::kInt32x4Sub: | 1489 case IrOpcode::kInt32x4Sub: |
1488 return MarkAsSimd128(node), VisitInt32x4Sub(node); | 1490 return MarkAsSimd128(node), VisitInt32x4Sub(node); |
| 1491 case IrOpcode::kInt32x4Mul: |
| 1492 return MarkAsSimd128(node), VisitInt32x4Mul(node); |
| 1493 case IrOpcode::kInt32x4Min: |
| 1494 return MarkAsSimd128(node), VisitInt32x4Min(node); |
| 1495 case IrOpcode::kInt32x4Max: |
| 1496 return MarkAsSimd128(node), VisitInt32x4Max(node); |
1489 case IrOpcode::kInt32x4Equal: | 1497 case IrOpcode::kInt32x4Equal: |
1490 return MarkAsSimd128(node), VisitInt32x4Equal(node); | 1498 return MarkAsSimd128(node), VisitInt32x4Equal(node); |
1491 case IrOpcode::kInt32x4NotEqual: | 1499 case IrOpcode::kInt32x4NotEqual: |
1492 return MarkAsSimd128(node), VisitInt32x4NotEqual(node); | 1500 return MarkAsSimd128(node), VisitInt32x4NotEqual(node); |
| 1501 case IrOpcode::kInt32x4GreaterThan: |
| 1502 return MarkAsSimd128(node), VisitInt32x4GreaterThan(node); |
| 1503 case IrOpcode::kInt32x4GreaterThanOrEqual: |
| 1504 return MarkAsSimd128(node), VisitInt32x4GreaterThanOrEqual(node); |
| 1505 case IrOpcode::kUint32x4GreaterThan: |
| 1506 return MarkAsSimd128(node), VisitUint32x4GreaterThan(node); |
| 1507 case IrOpcode::kUint32x4GreaterThanOrEqual: |
| 1508 return MarkAsSimd128(node), VisitUint32x4GreaterThanOrEqual(node); |
1493 case IrOpcode::kSimd32x4Select: | 1509 case IrOpcode::kSimd32x4Select: |
1494 return MarkAsSimd128(node), VisitSimd32x4Select(node); | 1510 return MarkAsSimd128(node), VisitSimd32x4Select(node); |
| 1511 case IrOpcode::kCreateInt16x8: |
| 1512 return MarkAsSimd128(node), VisitCreateInt16x8(node); |
| 1513 case IrOpcode::kInt16x8ExtractLane: |
| 1514 return MarkAsWord32(node), VisitInt16x8ExtractLane(node); |
| 1515 case IrOpcode::kInt16x8ReplaceLane: |
| 1516 return MarkAsSimd128(node), VisitInt16x8ReplaceLane(node); |
| 1517 case IrOpcode::kInt16x8Neg: |
| 1518 return MarkAsSimd128(node), VisitInt16x8Neg(node); |
| 1519 case IrOpcode::kInt16x8Add: |
| 1520 return MarkAsSimd128(node), VisitInt16x8Add(node); |
| 1521 case IrOpcode::kInt16x8Sub: |
| 1522 return MarkAsSimd128(node), VisitInt16x8Sub(node); |
| 1523 case IrOpcode::kInt16x8Mul: |
| 1524 return MarkAsSimd128(node), VisitInt16x8Mul(node); |
| 1525 case IrOpcode::kInt16x8Min: |
| 1526 return MarkAsSimd128(node), VisitInt16x8Min(node); |
| 1527 case IrOpcode::kInt16x8Max: |
| 1528 return MarkAsSimd128(node), VisitInt16x8Max(node); |
| 1529 case IrOpcode::kInt16x8Equal: |
| 1530 return MarkAsSimd128(node), VisitInt16x8Equal(node); |
| 1531 case IrOpcode::kInt16x8NotEqual: |
| 1532 return MarkAsSimd128(node), VisitInt16x8NotEqual(node); |
| 1533 case IrOpcode::kInt16x8GreaterThan: |
| 1534 return MarkAsSimd128(node), VisitInt16x8GreaterThan(node); |
| 1535 case IrOpcode::kInt16x8GreaterThanOrEqual: |
| 1536 return MarkAsSimd128(node), VisitInt16x8GreaterThanOrEqual(node); |
| 1537 case IrOpcode::kUint16x8GreaterThan: |
| 1538 return MarkAsSimd128(node), VisitUint16x8GreaterThan(node); |
| 1539 case IrOpcode::kUint16x8GreaterThanOrEqual: |
| 1540 return MarkAsSimd128(node), VisitUint16x8GreaterThanOrEqual(node); |
| 1541 case IrOpcode::kCreateInt8x16: |
| 1542 return MarkAsSimd128(node), VisitCreateInt8x16(node); |
| 1543 case IrOpcode::kInt8x16ExtractLane: |
| 1544 return MarkAsWord32(node), VisitInt8x16ExtractLane(node); |
| 1545 case IrOpcode::kInt8x16ReplaceLane: |
| 1546 return MarkAsSimd128(node), VisitInt8x16ReplaceLane(node); |
| 1547 case IrOpcode::kInt8x16Neg: |
| 1548 return MarkAsSimd128(node), VisitInt8x16Neg(node); |
| 1549 case IrOpcode::kInt8x16Add: |
| 1550 return MarkAsSimd128(node), VisitInt8x16Add(node); |
| 1551 case IrOpcode::kInt8x16Sub: |
| 1552 return MarkAsSimd128(node), VisitInt8x16Sub(node); |
| 1553 case IrOpcode::kInt8x16Mul: |
| 1554 return MarkAsSimd128(node), VisitInt8x16Mul(node); |
| 1555 case IrOpcode::kInt8x16Min: |
| 1556 return MarkAsSimd128(node), VisitInt8x16Min(node); |
| 1557 case IrOpcode::kInt8x16Max: |
| 1558 return MarkAsSimd128(node), VisitInt8x16Max(node); |
| 1559 case IrOpcode::kInt8x16Equal: |
| 1560 return MarkAsSimd128(node), VisitInt8x16Equal(node); |
| 1561 case IrOpcode::kInt8x16NotEqual: |
| 1562 return MarkAsSimd128(node), VisitInt8x16NotEqual(node); |
| 1563 case IrOpcode::kInt8x16GreaterThan: |
| 1564 return MarkAsSimd128(node), VisitInt8x16GreaterThan(node); |
| 1565 case IrOpcode::kInt8x16GreaterThanOrEqual: |
| 1566 return MarkAsSimd128(node), VisitInt8x16GreaterThanOrEqual(node); |
| 1567 case IrOpcode::kUint8x16GreaterThan: |
| 1568 return MarkAsSimd128(node), VisitUint8x16GreaterThan(node); |
| 1569 case IrOpcode::kUint8x16GreaterThanOrEqual: |
| 1570 return MarkAsSimd128(node), VisitUint16x8GreaterThanOrEqual(node); |
1495 default: | 1571 default: |
1496 V8_Fatal(__FILE__, __LINE__, "Unexpected operator #%d:%s @ node #%d", | 1572 V8_Fatal(__FILE__, __LINE__, "Unexpected operator #%d:%s @ node #%d", |
1497 node->opcode(), node->op()->mnemonic(), node->id()); | 1573 node->opcode(), node->op()->mnemonic(), node->id()); |
1498 break; | 1574 break; |
1499 } | 1575 } |
1500 } | 1576 } |
1501 | 1577 |
1502 void InstructionSelector::VisitLoadStackPointer(Node* node) { | 1578 void InstructionSelector::VisitLoadStackPointer(Node* node) { |
1503 OperandGenerator g(this); | 1579 OperandGenerator g(this); |
1504 Emit(kArchStackPointer, g.DefineAsRegister(node)); | 1580 Emit(kArchStackPointer, g.DefineAsRegister(node)); |
(...skipping 364 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1869 } | 1945 } |
1870 | 1946 |
1871 void InstructionSelector::VisitInt32x4FromFloat32x4(Node* node) { | 1947 void InstructionSelector::VisitInt32x4FromFloat32x4(Node* node) { |
1872 UNIMPLEMENTED(); | 1948 UNIMPLEMENTED(); |
1873 } | 1949 } |
1874 | 1950 |
1875 void InstructionSelector::VisitUint32x4FromFloat32x4(Node* node) { | 1951 void InstructionSelector::VisitUint32x4FromFloat32x4(Node* node) { |
1876 UNIMPLEMENTED(); | 1952 UNIMPLEMENTED(); |
1877 } | 1953 } |
1878 | 1954 |
| 1955 void InstructionSelector::VisitInt32x4Neg(Node* node) { UNIMPLEMENTED(); } |
| 1956 |
| 1957 void InstructionSelector::VisitInt32x4Mul(Node* node) { UNIMPLEMENTED(); } |
| 1958 |
| 1959 void InstructionSelector::VisitInt32x4Max(Node* node) { UNIMPLEMENTED(); } |
| 1960 |
| 1961 void InstructionSelector::VisitInt32x4Min(Node* node) { UNIMPLEMENTED(); } |
| 1962 |
1879 void InstructionSelector::VisitInt32x4Equal(Node* node) { UNIMPLEMENTED(); } | 1963 void InstructionSelector::VisitInt32x4Equal(Node* node) { UNIMPLEMENTED(); } |
1880 | 1964 |
1881 void InstructionSelector::VisitInt32x4NotEqual(Node* node) { UNIMPLEMENTED(); } | 1965 void InstructionSelector::VisitInt32x4NotEqual(Node* node) { UNIMPLEMENTED(); } |
1882 | 1966 |
| 1967 void InstructionSelector::VisitInt32x4LessThan(Node* node) { UNIMPLEMENTED(); } |
| 1968 |
| 1969 void InstructionSelector::VisitInt32x4LessThanOrEqual(Node* node) { |
| 1970 UNIMPLEMENTED(); |
| 1971 } |
| 1972 |
| 1973 void InstructionSelector::VisitInt32x4GreaterThan(Node* node) { |
| 1974 UNIMPLEMENTED(); |
| 1975 } |
| 1976 |
| 1977 void InstructionSelector::VisitInt32x4GreaterThanOrEqual(Node* node) { |
| 1978 UNIMPLEMENTED(); |
| 1979 } |
| 1980 |
| 1981 void InstructionSelector::VisitUint32x4GreaterThan(Node* node) { |
| 1982 UNIMPLEMENTED(); |
| 1983 } |
| 1984 |
| 1985 void InstructionSelector::VisitUint32x4GreaterThanOrEqual(Node* node) { |
| 1986 UNIMPLEMENTED(); |
| 1987 } |
| 1988 |
1883 void InstructionSelector::VisitSimd32x4Select(Node* node) { UNIMPLEMENTED(); } | 1989 void InstructionSelector::VisitSimd32x4Select(Node* node) { UNIMPLEMENTED(); } |
| 1990 |
| 1991 void InstructionSelector::VisitCreateInt16x8(Node* node) { UNIMPLEMENTED(); } |
| 1992 |
| 1993 void InstructionSelector::VisitInt16x8ExtractLane(Node* node) { |
| 1994 UNIMPLEMENTED(); |
| 1995 } |
| 1996 |
| 1997 void InstructionSelector::VisitInt16x8ReplaceLane(Node* node) { |
| 1998 UNIMPLEMENTED(); |
| 1999 } |
| 2000 |
| 2001 void InstructionSelector::VisitInt16x8Neg(Node* node) { UNIMPLEMENTED(); } |
| 2002 |
| 2003 void InstructionSelector::VisitInt16x8Add(Node* node) { UNIMPLEMENTED(); } |
| 2004 |
| 2005 void InstructionSelector::VisitInt16x8Sub(Node* node) { UNIMPLEMENTED(); } |
| 2006 |
| 2007 void InstructionSelector::VisitInt16x8Mul(Node* node) { UNIMPLEMENTED(); } |
| 2008 |
| 2009 void InstructionSelector::VisitInt16x8Max(Node* node) { UNIMPLEMENTED(); } |
| 2010 |
| 2011 void InstructionSelector::VisitInt16x8Min(Node* node) { UNIMPLEMENTED(); } |
| 2012 |
| 2013 void InstructionSelector::VisitInt16x8Equal(Node* node) { UNIMPLEMENTED(); } |
| 2014 |
| 2015 void InstructionSelector::VisitInt16x8NotEqual(Node* node) { UNIMPLEMENTED(); } |
| 2016 |
| 2017 void InstructionSelector::VisitInt16x8LessThan(Node* node) { UNIMPLEMENTED(); } |
| 2018 |
| 2019 void InstructionSelector::VisitInt16x8LessThanOrEqual(Node* node) { |
| 2020 UNIMPLEMENTED(); |
| 2021 } |
| 2022 |
| 2023 void InstructionSelector::VisitInt16x8GreaterThan(Node* node) { |
| 2024 UNIMPLEMENTED(); |
| 2025 } |
| 2026 |
| 2027 void InstructionSelector::VisitInt16x8GreaterThanOrEqual(Node* node) { |
| 2028 UNIMPLEMENTED(); |
| 2029 } |
| 2030 |
| 2031 void InstructionSelector::VisitUint16x8GreaterThan(Node* node) { |
| 2032 UNIMPLEMENTED(); |
| 2033 } |
| 2034 |
| 2035 void InstructionSelector::VisitUint16x8GreaterThanOrEqual(Node* node) { |
| 2036 UNIMPLEMENTED(); |
| 2037 } |
| 2038 |
| 2039 void InstructionSelector::VisitCreateInt8x16(Node* node) { UNIMPLEMENTED(); } |
| 2040 |
| 2041 void InstructionSelector::VisitInt8x16ExtractLane(Node* node) { |
| 2042 UNIMPLEMENTED(); |
| 2043 } |
| 2044 |
| 2045 void InstructionSelector::VisitInt8x16ReplaceLane(Node* node) { |
| 2046 UNIMPLEMENTED(); |
| 2047 } |
| 2048 |
| 2049 void InstructionSelector::VisitInt8x16Neg(Node* node) { UNIMPLEMENTED(); } |
| 2050 |
| 2051 void InstructionSelector::VisitInt8x16Add(Node* node) { UNIMPLEMENTED(); } |
| 2052 |
| 2053 void InstructionSelector::VisitInt8x16Sub(Node* node) { UNIMPLEMENTED(); } |
| 2054 |
| 2055 void InstructionSelector::VisitInt8x16Mul(Node* node) { UNIMPLEMENTED(); } |
| 2056 |
| 2057 void InstructionSelector::VisitInt8x16Max(Node* node) { UNIMPLEMENTED(); } |
| 2058 |
| 2059 void InstructionSelector::VisitInt8x16Min(Node* node) { UNIMPLEMENTED(); } |
| 2060 |
| 2061 void InstructionSelector::VisitInt8x16Equal(Node* node) { UNIMPLEMENTED(); } |
| 2062 |
| 2063 void InstructionSelector::VisitInt8x16NotEqual(Node* node) { UNIMPLEMENTED(); } |
| 2064 |
| 2065 void InstructionSelector::VisitInt8x16LessThan(Node* node) { UNIMPLEMENTED(); } |
| 2066 |
| 2067 void InstructionSelector::VisitInt8x16LessThanOrEqual(Node* node) { |
| 2068 UNIMPLEMENTED(); |
| 2069 } |
| 2070 |
| 2071 void InstructionSelector::VisitInt8x16GreaterThan(Node* node) { |
| 2072 UNIMPLEMENTED(); |
| 2073 } |
| 2074 |
| 2075 void InstructionSelector::VisitInt8x16GreaterThanOrEqual(Node* node) { |
| 2076 UNIMPLEMENTED(); |
| 2077 } |
| 2078 |
| 2079 void InstructionSelector::VisitUint8x16GreaterThan(Node* node) { |
| 2080 UNIMPLEMENTED(); |
| 2081 } |
| 2082 |
| 2083 void InstructionSelector::VisitUint8x16GreaterThanOrEqual(Node* node) { |
| 2084 UNIMPLEMENTED(); |
| 2085 } |
1884 #endif // !V8_TARGET_ARCH_ARM | 2086 #endif // !V8_TARGET_ARCH_ARM |
1885 | 2087 |
1886 void InstructionSelector::VisitFinishRegion(Node* node) { EmitIdentity(node); } | 2088 void InstructionSelector::VisitFinishRegion(Node* node) { EmitIdentity(node); } |
1887 | 2089 |
1888 void InstructionSelector::VisitParameter(Node* node) { | 2090 void InstructionSelector::VisitParameter(Node* node) { |
1889 OperandGenerator g(this); | 2091 OperandGenerator g(this); |
1890 int index = ParameterIndexOf(node->op()); | 2092 int index = ParameterIndexOf(node->op()); |
1891 InstructionOperand op = | 2093 InstructionOperand op = |
1892 linkage()->ParameterHasSecondaryLocation(index) | 2094 linkage()->ParameterHasSecondaryLocation(index) |
1893 ? g.DefineAsDualLocation( | 2095 ? g.DefineAsDualLocation( |
(...skipping 369 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2263 return new (instruction_zone()) FrameStateDescriptor( | 2465 return new (instruction_zone()) FrameStateDescriptor( |
2264 instruction_zone(), state_info.type(), state_info.bailout_id(), | 2466 instruction_zone(), state_info.type(), state_info.bailout_id(), |
2265 state_info.state_combine(), parameters, locals, stack, | 2467 state_info.state_combine(), parameters, locals, stack, |
2266 state_info.shared_info(), outer_state); | 2468 state_info.shared_info(), outer_state); |
2267 } | 2469 } |
2268 | 2470 |
2269 | 2471 |
2270 } // namespace compiler | 2472 } // namespace compiler |
2271 } // namespace internal | 2473 } // namespace internal |
2272 } // namespace v8 | 2474 } // namespace v8 |
OLD | NEW |