| 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 973 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 984 break; | 984 break; |
| 985 case kPPC_SubPair: | 985 case kPPC_SubPair: |
| 986 // i.InputRegister(0) ... left low word. | 986 // i.InputRegister(0) ... left low word. |
| 987 // i.InputRegister(1) ... left high word. | 987 // i.InputRegister(1) ... left high word. |
| 988 // i.InputRegister(2) ... right low word. | 988 // i.InputRegister(2) ... right low word. |
| 989 // i.InputRegister(3) ... right high word. | 989 // i.InputRegister(3) ... right high word. |
| 990 __ subc(i.OutputRegister(0), i.InputRegister(0), i.InputRegister(2)); | 990 __ subc(i.OutputRegister(0), i.InputRegister(0), i.InputRegister(2)); |
| 991 __ sube(i.OutputRegister(1), i.InputRegister(1), i.InputRegister(3)); | 991 __ sube(i.OutputRegister(1), i.InputRegister(1), i.InputRegister(3)); |
| 992 DCHECK_EQ(LeaveRC, i.OutputRCBit()); | 992 DCHECK_EQ(LeaveRC, i.OutputRCBit()); |
| 993 break; | 993 break; |
| 994 case kPPC_MulPair: |
| 995 // i.InputRegister(0) ... left low word. |
| 996 // i.InputRegister(1) ... left high word. |
| 997 // i.InputRegister(2) ... right low word. |
| 998 // i.InputRegister(3) ... right high word. |
| 999 __ mullw(i.TempRegister(0), i.InputRegister(0), i.InputRegister(3)); |
| 1000 __ mullw(i.TempRegister(1), i.InputRegister(2), i.InputRegister(1)); |
| 1001 __ add(i.TempRegister(0), i.TempRegister(0), i.TempRegister(1)); |
| 1002 __ mullw(i.OutputRegister(0), i.InputRegister(0), i.InputRegister(2)); |
| 1003 __ mulhwu(i.OutputRegister(1), i.InputRegister(0), i.InputRegister(2)); |
| 1004 __ add(i.OutputRegister(1), i.OutputRegister(1), i.TempRegister(0)); |
| 1005 break; |
| 994 case kPPC_ShiftLeftPair: | 1006 case kPPC_ShiftLeftPair: |
| 995 if (instr->InputAt(2)->IsImmediate()) { | 1007 if (instr->InputAt(2)->IsImmediate()) { |
| 996 __ ShiftLeftPair(i.OutputRegister(0), i.OutputRegister(1), | 1008 __ ShiftLeftPair(i.OutputRegister(0), i.OutputRegister(1), |
| 997 i.InputRegister(0), i.InputRegister(1), | 1009 i.InputRegister(0), i.InputRegister(1), |
| 998 i.InputInt32(2)); | 1010 i.InputInt32(2)); |
| 999 } else { | 1011 } else { |
| 1000 __ ShiftLeftPair(i.OutputRegister(0), i.OutputRegister(1), | 1012 __ ShiftLeftPair(i.OutputRegister(0), i.OutputRegister(1), |
| 1001 i.InputRegister(0), i.InputRegister(1), kScratchReg, | 1013 i.InputRegister(0), i.InputRegister(1), kScratchReg, |
| 1002 i.InputRegister(2)); | 1014 i.InputRegister(2)); |
| 1003 } | 1015 } |
| (...skipping 1007 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2011 padding_size -= v8::internal::Assembler::kInstrSize; | 2023 padding_size -= v8::internal::Assembler::kInstrSize; |
| 2012 } | 2024 } |
| 2013 } | 2025 } |
| 2014 } | 2026 } |
| 2015 | 2027 |
| 2016 #undef __ | 2028 #undef __ |
| 2017 | 2029 |
| 2018 } // namespace compiler | 2030 } // namespace compiler |
| 2019 } // namespace internal | 2031 } // namespace internal |
| 2020 } // namespace v8 | 2032 } // namespace v8 |
| OLD | NEW |