| 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/code-generator.h" | 5 #include "src/compiler/code-generator.h" |
| 6 | 6 |
| 7 #include "src/ast/scopes.h" | 7 #include "src/ast/scopes.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 948 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 959 #endif | 959 #endif |
| 960 case kPPC_ShiftRightAlg32: | 960 case kPPC_ShiftRightAlg32: |
| 961 ASSEMBLE_BINOP_INT_RC(sraw, srawi); | 961 ASSEMBLE_BINOP_INT_RC(sraw, srawi); |
| 962 break; | 962 break; |
| 963 #if V8_TARGET_ARCH_PPC64 | 963 #if V8_TARGET_ARCH_PPC64 |
| 964 case kPPC_ShiftRightAlg64: | 964 case kPPC_ShiftRightAlg64: |
| 965 ASSEMBLE_BINOP_INT_RC(srad, sradi); | 965 ASSEMBLE_BINOP_INT_RC(srad, sradi); |
| 966 break; | 966 break; |
| 967 #endif | 967 #endif |
| 968 #if !V8_TARGET_ARCH_PPC64 | 968 #if !V8_TARGET_ARCH_PPC64 |
| 969 case kPPC_PairShiftLeft: | 969 case kPPC_ShiftLeftPair: |
| 970 if (instr->InputAt(2)->IsImmediate()) { | 970 if (instr->InputAt(2)->IsImmediate()) { |
| 971 __ PairShiftLeft(i.OutputRegister(0), i.OutputRegister(1), | 971 __ ShiftLeftPair(i.OutputRegister(0), i.OutputRegister(1), |
| 972 i.InputRegister(0), i.InputRegister(1), | 972 i.InputRegister(0), i.InputRegister(1), |
| 973 i.InputInt32(2)); | 973 i.InputInt32(2)); |
| 974 } else { | 974 } else { |
| 975 __ PairShiftLeft(i.OutputRegister(0), i.OutputRegister(1), | 975 __ ShiftLeftPair(i.OutputRegister(0), i.OutputRegister(1), |
| 976 i.InputRegister(0), i.InputRegister(1), kScratchReg, | 976 i.InputRegister(0), i.InputRegister(1), kScratchReg, |
| 977 i.InputRegister(2)); | 977 i.InputRegister(2)); |
| 978 } | 978 } |
| 979 break; | 979 break; |
| 980 case kPPC_ShiftRightPair: |
| 981 if (instr->InputAt(2)->IsImmediate()) { |
| 982 __ ShiftRightPair(i.OutputRegister(0), i.OutputRegister(1), |
| 983 i.InputRegister(0), i.InputRegister(1), |
| 984 i.InputInt32(2)); |
| 985 } else { |
| 986 __ ShiftRightPair(i.OutputRegister(0), i.OutputRegister(1), |
| 987 i.InputRegister(0), i.InputRegister(1), kScratchReg, |
| 988 i.InputRegister(2)); |
| 989 } |
| 990 break; |
| 991 case kPPC_ShiftRightAlgPair: |
| 992 if (instr->InputAt(2)->IsImmediate()) { |
| 993 __ ShiftRightAlgPair(i.OutputRegister(0), i.OutputRegister(1), |
| 994 i.InputRegister(0), i.InputRegister(1), |
| 995 i.InputInt32(2)); |
| 996 } else { |
| 997 __ ShiftRightAlgPair(i.OutputRegister(0), i.OutputRegister(1), |
| 998 i.InputRegister(0), i.InputRegister(1), |
| 999 kScratchReg, i.InputRegister(2)); |
| 1000 } |
| 1001 break; |
| 980 #endif | 1002 #endif |
| 981 case kPPC_RotRight32: | 1003 case kPPC_RotRight32: |
| 982 if (HasRegisterInput(instr, 1)) { | 1004 if (HasRegisterInput(instr, 1)) { |
| 983 __ subfic(kScratchReg, i.InputRegister(1), Operand(32)); | 1005 __ subfic(kScratchReg, i.InputRegister(1), Operand(32)); |
| 984 __ rotlw(i.OutputRegister(), i.InputRegister(0), kScratchReg, | 1006 __ rotlw(i.OutputRegister(), i.InputRegister(0), kScratchReg, |
| 985 i.OutputRCBit()); | 1007 i.OutputRCBit()); |
| 986 } else { | 1008 } else { |
| 987 int sh = i.InputInt32(1); | 1009 int sh = i.InputInt32(1); |
| 988 __ rotrwi(i.OutputRegister(), i.InputRegister(0), sh, i.OutputRCBit()); | 1010 __ rotrwi(i.OutputRegister(), i.InputRegister(0), sh, i.OutputRCBit()); |
| 989 } | 1011 } |
| (...skipping 974 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1964 padding_size -= v8::internal::Assembler::kInstrSize; | 1986 padding_size -= v8::internal::Assembler::kInstrSize; |
| 1965 } | 1987 } |
| 1966 } | 1988 } |
| 1967 } | 1989 } |
| 1968 | 1990 |
| 1969 #undef __ | 1991 #undef __ |
| 1970 | 1992 |
| 1971 } // namespace compiler | 1993 } // namespace compiler |
| 1972 } // namespace internal | 1994 } // namespace internal |
| 1973 } // namespace v8 | 1995 } // namespace v8 |
| OLD | NEW |