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/arm/macro-assembler-arm.h" | 7 #include "src/arm/macro-assembler-arm.h" |
8 #include "src/ast/scopes.h" | 8 #include "src/ast/scopes.h" |
9 #include "src/compiler/code-generator-impl.h" | 9 #include "src/compiler/code-generator-impl.h" |
10 #include "src/compiler/gap-resolver.h" | 10 #include "src/compiler/gap-resolver.h" |
(...skipping 791 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
802 // i.InputRegister(0) ... left low word. | 802 // i.InputRegister(0) ... left low word. |
803 // i.InputRegister(1) ... left high word. | 803 // i.InputRegister(1) ... left high word. |
804 // i.InputRegister(2) ... right low word. | 804 // i.InputRegister(2) ... right low word. |
805 // i.InputRegister(3) ... right high word. | 805 // i.InputRegister(3) ... right high word. |
806 __ sub(i.OutputRegister(0), i.InputRegister(0), i.InputRegister(2), | 806 __ sub(i.OutputRegister(0), i.InputRegister(0), i.InputRegister(2), |
807 SBit::SetCC); | 807 SBit::SetCC); |
808 __ sbc(i.OutputRegister(1), i.InputRegister(1), | 808 __ sbc(i.OutputRegister(1), i.InputRegister(1), |
809 Operand(i.InputRegister(3))); | 809 Operand(i.InputRegister(3))); |
810 DCHECK_EQ(LeaveCC, i.OutputSBit()); | 810 DCHECK_EQ(LeaveCC, i.OutputSBit()); |
811 break; | 811 break; |
812 case kArmMulPair: | |
813 // i.InputRegister(0) ... left low word. | |
814 // i.InputRegister(1) ... left high word. | |
815 // i.InputRegister(2) ... right low word. | |
816 // i.InputRegister(3) ... right high word. | |
817 __ mul(i.TempRegister(0), i.InputRegister(0), i.InputRegister(3)); | |
818 __ mul(i.TempRegister(1), i.InputRegister(2), i.InputRegister(1)); | |
819 __ add(i.TempRegister(0), i.TempRegister(0), i.TempRegister(1)); | |
820 __ umull(i.OutputRegister(0), i.OutputRegister(1), i.InputRegister(0), | |
821 i.InputRegister(2)); | |
822 __ add(i.OutputRegister(1), i.OutputRegister(1), i.TempRegister(0)); | |
martyn.capewell
2016/03/17 18:20:29
I think if you use multiply-accumulates here, you
martyn.capewell
2016/03/18 11:42:49
A bit more thought gives:
__ umull(i.OutputRegis
ahaas
2016/03/29 11:11:50
Done. It was necessary for this change to use a un
| |
823 break; | |
812 case kArmLslPair: | 824 case kArmLslPair: |
813 if (instr->InputAt(2)->IsImmediate()) { | 825 if (instr->InputAt(2)->IsImmediate()) { |
814 __ LslPair(i.OutputRegister(0), i.OutputRegister(1), i.InputRegister(0), | 826 __ LslPair(i.OutputRegister(0), i.OutputRegister(1), i.InputRegister(0), |
815 i.InputRegister(1), i.InputInt32(2)); | 827 i.InputRegister(1), i.InputInt32(2)); |
816 } else { | 828 } else { |
817 __ LslPair(i.OutputRegister(0), i.OutputRegister(1), i.InputRegister(0), | 829 __ LslPair(i.OutputRegister(0), i.OutputRegister(1), i.InputRegister(0), |
818 i.InputRegister(1), kScratchReg, i.InputRegister(2)); | 830 i.InputRegister(1), kScratchReg, i.InputRegister(2)); |
819 } | 831 } |
820 break; | 832 break; |
821 case kArmLsrPair: | 833 case kArmLsrPair: |
(...skipping 745 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1567 padding_size -= v8::internal::Assembler::kInstrSize; | 1579 padding_size -= v8::internal::Assembler::kInstrSize; |
1568 } | 1580 } |
1569 } | 1581 } |
1570 } | 1582 } |
1571 | 1583 |
1572 #undef __ | 1584 #undef __ |
1573 | 1585 |
1574 } // namespace compiler | 1586 } // namespace compiler |
1575 } // namespace internal | 1587 } // namespace internal |
1576 } // namespace v8 | 1588 } // namespace v8 |
OLD | NEW |