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 911 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
922 break; | 922 break; |
923 #endif | 923 #endif |
924 case kPPC_ShiftRightAlg32: | 924 case kPPC_ShiftRightAlg32: |
925 ASSEMBLE_BINOP_INT_RC(sraw, srawi); | 925 ASSEMBLE_BINOP_INT_RC(sraw, srawi); |
926 break; | 926 break; |
927 #if V8_TARGET_ARCH_PPC64 | 927 #if V8_TARGET_ARCH_PPC64 |
928 case kPPC_ShiftRightAlg64: | 928 case kPPC_ShiftRightAlg64: |
929 ASSEMBLE_BINOP_INT_RC(srad, sradi); | 929 ASSEMBLE_BINOP_INT_RC(srad, sradi); |
930 break; | 930 break; |
931 #endif | 931 #endif |
| 932 #if !V8_TARGET_ARCH_PPC64 |
| 933 case kPPC_PairShiftLeft: |
| 934 if (instr->InputAt(2)->IsImmediate()) { |
| 935 __ PairShiftLeft(i.OutputRegister(0), i.OutputRegister(1), |
| 936 i.InputRegister(0), i.InputRegister(1), |
| 937 i.InputInt32(2)); |
| 938 } else { |
| 939 __ PairShiftLeft(i.OutputRegister(0), i.OutputRegister(1), |
| 940 i.InputRegister(0), i.InputRegister(1), kScratchReg, |
| 941 i.InputRegister(2)); |
| 942 } |
| 943 break; |
| 944 #endif |
932 case kPPC_RotRight32: | 945 case kPPC_RotRight32: |
933 if (HasRegisterInput(instr, 1)) { | 946 if (HasRegisterInput(instr, 1)) { |
934 __ subfic(kScratchReg, i.InputRegister(1), Operand(32)); | 947 __ subfic(kScratchReg, i.InputRegister(1), Operand(32)); |
935 __ rotlw(i.OutputRegister(), i.InputRegister(0), kScratchReg, | 948 __ rotlw(i.OutputRegister(), i.InputRegister(0), kScratchReg, |
936 i.OutputRCBit()); | 949 i.OutputRCBit()); |
937 } else { | 950 } else { |
938 int sh = i.InputInt32(1); | 951 int sh = i.InputInt32(1); |
939 __ rotrwi(i.OutputRegister(), i.InputRegister(0), sh, i.OutputRCBit()); | 952 __ rotrwi(i.OutputRegister(), i.InputRegister(0), sh, i.OutputRCBit()); |
940 } | 953 } |
941 break; | 954 break; |
(...skipping 969 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1911 padding_size -= v8::internal::Assembler::kInstrSize; | 1924 padding_size -= v8::internal::Assembler::kInstrSize; |
1912 } | 1925 } |
1913 } | 1926 } |
1914 } | 1927 } |
1915 | 1928 |
1916 #undef __ | 1929 #undef __ |
1917 | 1930 |
1918 } // namespace compiler | 1931 } // namespace compiler |
1919 } // namespace internal | 1932 } // namespace internal |
1920 } // namespace v8 | 1933 } // namespace v8 |
OLD | NEW |