| OLD | NEW |
| 1 // Copyright 2015 the V8 project authors. All rights reserved. | 1 // Copyright 2015 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/code-generator.h" | 5 #include "src/compiler/code-generator.h" |
| 6 | 6 |
| 7 #include "src/compilation-info.h" | 7 #include "src/compilation-info.h" |
| 8 #include "src/compiler/code-generator-impl.h" | 8 #include "src/compiler/code-generator-impl.h" |
| 9 #include "src/compiler/gap-resolver.h" | 9 #include "src/compiler/gap-resolver.h" |
| 10 #include "src/compiler/node-matchers.h" | 10 #include "src/compiler/node-matchers.h" |
| (...skipping 1215 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1226 Operand(64 - i.InputInt32(1))); | 1226 Operand(64 - i.InputInt32(1))); |
| 1227 } | 1227 } |
| 1228 break; | 1228 break; |
| 1229 #endif | 1229 #endif |
| 1230 case kS390_Not32: | 1230 case kS390_Not32: |
| 1231 __ Not32(i.OutputRegister(), i.InputRegister(0)); | 1231 __ Not32(i.OutputRegister(), i.InputRegister(0)); |
| 1232 break; | 1232 break; |
| 1233 case kS390_Not64: | 1233 case kS390_Not64: |
| 1234 __ Not64(i.OutputRegister(), i.InputRegister(0)); | 1234 __ Not64(i.OutputRegister(), i.InputRegister(0)); |
| 1235 break; | 1235 break; |
| 1236 case kS390_RotLeftAndMask32: | |
| 1237 if (CpuFeatures::IsSupported(GENERAL_INSTR_EXT)) { | |
| 1238 int shiftAmount = i.InputInt32(1); | |
| 1239 int endBit = 63 - i.InputInt32(3); | |
| 1240 int startBit = 63 - i.InputInt32(2); | |
| 1241 __ rll(i.OutputRegister(), i.InputRegister(0), Operand(shiftAmount)); | |
| 1242 __ risbg(i.OutputRegister(), i.OutputRegister(), Operand(startBit), | |
| 1243 Operand(endBit), Operand::Zero(), true); | |
| 1244 } else { | |
| 1245 int shiftAmount = i.InputInt32(1); | |
| 1246 int clearBitLeft = 63 - i.InputInt32(2); | |
| 1247 int clearBitRight = i.InputInt32(3); | |
| 1248 __ rll(i.OutputRegister(), i.InputRegister(0), Operand(shiftAmount)); | |
| 1249 __ sllg(i.OutputRegister(), i.OutputRegister(), Operand(clearBitLeft)); | |
| 1250 __ srlg(i.OutputRegister(), i.OutputRegister(), | |
| 1251 Operand((clearBitLeft + clearBitRight))); | |
| 1252 __ sllg(i.OutputRegister(), i.OutputRegister(), Operand(clearBitRight)); | |
| 1253 } | |
| 1254 break; | |
| 1255 #if V8_TARGET_ARCH_S390X | 1236 #if V8_TARGET_ARCH_S390X |
| 1256 case kS390_RotLeftAndClear64: | 1237 case kS390_RotLeftAndClear64: |
| 1257 if (CpuFeatures::IsSupported(GENERAL_INSTR_EXT)) { | 1238 if (CpuFeatures::IsSupported(GENERAL_INSTR_EXT)) { |
| 1258 int shiftAmount = i.InputInt32(1); | 1239 int shiftAmount = i.InputInt32(1); |
| 1259 int endBit = 63 - shiftAmount; | 1240 int endBit = 63 - shiftAmount; |
| 1260 int startBit = 63 - i.InputInt32(2); | 1241 int startBit = 63 - i.InputInt32(2); |
| 1261 __ risbg(i.OutputRegister(), i.InputRegister(0), Operand(startBit), | 1242 __ risbg(i.OutputRegister(), i.InputRegister(0), Operand(startBit), |
| 1262 Operand(endBit), Operand(shiftAmount), true); | 1243 Operand(endBit), Operand(shiftAmount), true); |
| 1263 } else { | 1244 } else { |
| 1264 int shiftAmount = i.InputInt32(1); | 1245 int shiftAmount = i.InputInt32(1); |
| (...skipping 1306 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2571 padding_size -= 2; | 2552 padding_size -= 2; |
| 2572 } | 2553 } |
| 2573 } | 2554 } |
| 2574 } | 2555 } |
| 2575 | 2556 |
| 2576 #undef __ | 2557 #undef __ |
| 2577 | 2558 |
| 2578 } // namespace compiler | 2559 } // namespace compiler |
| 2579 } // namespace internal | 2560 } // namespace internal |
| 2580 } // namespace v8 | 2561 } // namespace v8 |
| OLD | NEW |