| 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/base/adapters.h" | 5 #include "src/base/adapters.h" |
| 6 #include "src/base/bits.h" | 6 #include "src/base/bits.h" |
| 7 #include "src/compiler/instruction-selector-impl.h" | 7 #include "src/compiler/instruction-selector-impl.h" |
| 8 #include "src/compiler/node-matchers.h" | 8 #include "src/compiler/node-matchers.h" |
| 9 #include "src/compiler/node-properties.h" | 9 #include "src/compiler/node-properties.h" |
| 10 | 10 |
| (...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 152 case MachineRepresentation::kFloat64: | 152 case MachineRepresentation::kFloat64: |
| 153 opcode = kMipsLdc1; | 153 opcode = kMipsLdc1; |
| 154 break; | 154 break; |
| 155 case MachineRepresentation::kBit: // Fall through. | 155 case MachineRepresentation::kBit: // Fall through. |
| 156 case MachineRepresentation::kWord8: | 156 case MachineRepresentation::kWord8: |
| 157 opcode = load_rep.IsUnsigned() ? kMipsLbu : kMipsLb; | 157 opcode = load_rep.IsUnsigned() ? kMipsLbu : kMipsLb; |
| 158 break; | 158 break; |
| 159 case MachineRepresentation::kWord16: | 159 case MachineRepresentation::kWord16: |
| 160 opcode = load_rep.IsUnsigned() ? kMipsLhu : kMipsLh; | 160 opcode = load_rep.IsUnsigned() ? kMipsLhu : kMipsLh; |
| 161 break; | 161 break; |
| 162 case MachineRepresentation::kTaggedSigned: // Fall through. |
| 163 case MachineRepresentation::kTaggedPointer: // Fall through. |
| 162 case MachineRepresentation::kTagged: // Fall through. | 164 case MachineRepresentation::kTagged: // Fall through. |
| 163 case MachineRepresentation::kWord32: | 165 case MachineRepresentation::kWord32: |
| 164 opcode = kMipsLw; | 166 opcode = kMipsLw; |
| 165 break; | 167 break; |
| 166 case MachineRepresentation::kWord64: // Fall through. | 168 case MachineRepresentation::kWord64: // Fall through. |
| 167 case MachineRepresentation::kSimd128: // Fall through. | 169 case MachineRepresentation::kSimd128: // Fall through. |
| 168 case MachineRepresentation::kNone: | 170 case MachineRepresentation::kNone: |
| 169 UNREACHABLE(); | 171 UNREACHABLE(); |
| 170 return; | 172 return; |
| 171 } | 173 } |
| (...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 231 case MachineRepresentation::kFloat64: | 233 case MachineRepresentation::kFloat64: |
| 232 opcode = kMipsSdc1; | 234 opcode = kMipsSdc1; |
| 233 break; | 235 break; |
| 234 case MachineRepresentation::kBit: // Fall through. | 236 case MachineRepresentation::kBit: // Fall through. |
| 235 case MachineRepresentation::kWord8: | 237 case MachineRepresentation::kWord8: |
| 236 opcode = kMipsSb; | 238 opcode = kMipsSb; |
| 237 break; | 239 break; |
| 238 case MachineRepresentation::kWord16: | 240 case MachineRepresentation::kWord16: |
| 239 opcode = kMipsSh; | 241 opcode = kMipsSh; |
| 240 break; | 242 break; |
| 243 case MachineRepresentation::kTaggedSigned: // Fall through. |
| 244 case MachineRepresentation::kTaggedPointer: // Fall through. |
| 241 case MachineRepresentation::kTagged: // Fall through. | 245 case MachineRepresentation::kTagged: // Fall through. |
| 242 case MachineRepresentation::kWord32: | 246 case MachineRepresentation::kWord32: |
| 243 opcode = kMipsSw; | 247 opcode = kMipsSw; |
| 244 break; | 248 break; |
| 245 case MachineRepresentation::kWord64: // Fall through. | 249 case MachineRepresentation::kWord64: // Fall through. |
| 246 case MachineRepresentation::kSimd128: // Fall through. | 250 case MachineRepresentation::kSimd128: // Fall through. |
| 247 case MachineRepresentation::kNone: | 251 case MachineRepresentation::kNone: |
| 248 UNREACHABLE(); | 252 UNREACHABLE(); |
| 249 return; | 253 return; |
| 250 } | 254 } |
| (...skipping 695 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 946 | 950 |
| 947 ArchOpcode opcode = kArchNop; | 951 ArchOpcode opcode = kArchNop; |
| 948 switch (load_rep.representation()) { | 952 switch (load_rep.representation()) { |
| 949 case MachineRepresentation::kBit: // Fall through. | 953 case MachineRepresentation::kBit: // Fall through. |
| 950 case MachineRepresentation::kWord8: | 954 case MachineRepresentation::kWord8: |
| 951 UNREACHABLE(); | 955 UNREACHABLE(); |
| 952 break; | 956 break; |
| 953 case MachineRepresentation::kWord16: | 957 case MachineRepresentation::kWord16: |
| 954 opcode = load_rep.IsUnsigned() ? kMipsUlhu : kMipsUlh; | 958 opcode = load_rep.IsUnsigned() ? kMipsUlhu : kMipsUlh; |
| 955 break; | 959 break; |
| 960 case MachineRepresentation::kTaggedSigned: // Fall through. |
| 961 case MachineRepresentation::kTaggedPointer: // Fall through. |
| 956 case MachineRepresentation::kTagged: // Fall through. | 962 case MachineRepresentation::kTagged: // Fall through. |
| 957 case MachineRepresentation::kWord32: | 963 case MachineRepresentation::kWord32: |
| 958 opcode = kMipsUlw; | 964 opcode = kMipsUlw; |
| 959 break; | 965 break; |
| 960 case MachineRepresentation::kFloat32: | 966 case MachineRepresentation::kFloat32: |
| 961 opcode = kMipsUlwc1; | 967 opcode = kMipsUlwc1; |
| 962 break; | 968 break; |
| 963 case MachineRepresentation::kFloat64: | 969 case MachineRepresentation::kFloat64: |
| 964 opcode = kMipsUldc1; | 970 opcode = kMipsUldc1; |
| 965 break; | 971 break; |
| (...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1000 case MachineRepresentation::kFloat64: | 1006 case MachineRepresentation::kFloat64: |
| 1001 opcode = kMipsUsdc1; | 1007 opcode = kMipsUsdc1; |
| 1002 break; | 1008 break; |
| 1003 case MachineRepresentation::kBit: // Fall through. | 1009 case MachineRepresentation::kBit: // Fall through. |
| 1004 case MachineRepresentation::kWord8: | 1010 case MachineRepresentation::kWord8: |
| 1005 UNREACHABLE(); | 1011 UNREACHABLE(); |
| 1006 break; | 1012 break; |
| 1007 case MachineRepresentation::kWord16: | 1013 case MachineRepresentation::kWord16: |
| 1008 opcode = kMipsUsh; | 1014 opcode = kMipsUsh; |
| 1009 break; | 1015 break; |
| 1016 case MachineRepresentation::kTaggedSigned: // Fall through. |
| 1017 case MachineRepresentation::kTaggedPointer: // Fall through. |
| 1010 case MachineRepresentation::kTagged: // Fall through. | 1018 case MachineRepresentation::kTagged: // Fall through. |
| 1011 case MachineRepresentation::kWord32: | 1019 case MachineRepresentation::kWord32: |
| 1012 opcode = kMipsUsw; | 1020 opcode = kMipsUsw; |
| 1013 break; | 1021 break; |
| 1014 case MachineRepresentation::kWord64: // Fall through. | 1022 case MachineRepresentation::kWord64: // Fall through. |
| 1015 case MachineRepresentation::kSimd128: // Fall through. | 1023 case MachineRepresentation::kSimd128: // Fall through. |
| 1016 case MachineRepresentation::kNone: | 1024 case MachineRepresentation::kNone: |
| 1017 UNREACHABLE(); | 1025 UNREACHABLE(); |
| 1018 return; | 1026 return; |
| 1019 } | 1027 } |
| (...skipping 28 matching lines...) Expand all Loading... |
| 1048 case MachineRepresentation::kWord32: | 1056 case MachineRepresentation::kWord32: |
| 1049 opcode = kCheckedLoadWord32; | 1057 opcode = kCheckedLoadWord32; |
| 1050 break; | 1058 break; |
| 1051 case MachineRepresentation::kFloat32: | 1059 case MachineRepresentation::kFloat32: |
| 1052 opcode = kCheckedLoadFloat32; | 1060 opcode = kCheckedLoadFloat32; |
| 1053 break; | 1061 break; |
| 1054 case MachineRepresentation::kFloat64: | 1062 case MachineRepresentation::kFloat64: |
| 1055 opcode = kCheckedLoadFloat64; | 1063 opcode = kCheckedLoadFloat64; |
| 1056 break; | 1064 break; |
| 1057 case MachineRepresentation::kBit: // Fall through. | 1065 case MachineRepresentation::kBit: // Fall through. |
| 1066 case MachineRepresentation::kTaggedSigned: // Fall through. |
| 1067 case MachineRepresentation::kTaggedPointer: // Fall through. |
| 1058 case MachineRepresentation::kTagged: // Fall through. | 1068 case MachineRepresentation::kTagged: // Fall through. |
| 1059 case MachineRepresentation::kWord64: // Fall through. | 1069 case MachineRepresentation::kWord64: // Fall through. |
| 1060 case MachineRepresentation::kSimd128: // Fall through. | 1070 case MachineRepresentation::kSimd128: // Fall through. |
| 1061 case MachineRepresentation::kNone: | 1071 case MachineRepresentation::kNone: |
| 1062 UNREACHABLE(); | 1072 UNREACHABLE(); |
| 1063 return; | 1073 return; |
| 1064 } | 1074 } |
| 1065 InstructionOperand offset_operand = g.CanBeImmediate(offset, opcode) | 1075 InstructionOperand offset_operand = g.CanBeImmediate(offset, opcode) |
| 1066 ? g.UseImmediate(offset) | 1076 ? g.UseImmediate(offset) |
| 1067 : g.UseRegister(offset); | 1077 : g.UseRegister(offset); |
| (...skipping 564 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1632 DCHECK(IsMipsArchVariant(kLoongson) || IsMipsArchVariant(kMips32r1) || | 1642 DCHECK(IsMipsArchVariant(kLoongson) || IsMipsArchVariant(kMips32r1) || |
| 1633 IsMipsArchVariant(kMips32r2)); | 1643 IsMipsArchVariant(kMips32r2)); |
| 1634 return MachineOperatorBuilder::AlignmentRequirements:: | 1644 return MachineOperatorBuilder::AlignmentRequirements:: |
| 1635 NoUnalignedAccessSupport(); | 1645 NoUnalignedAccessSupport(); |
| 1636 } | 1646 } |
| 1637 } | 1647 } |
| 1638 | 1648 |
| 1639 } // namespace compiler | 1649 } // namespace compiler |
| 1640 } // namespace internal | 1650 } // namespace internal |
| 1641 } // namespace v8 | 1651 } // namespace v8 |
| OLD | NEW |