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/instruction.h" | 5 #include "src/compiler/instruction.h" |
6 #include "src/compiler/instruction-codes.h" | 6 #include "src/compiler/instruction-codes.h" |
7 #include "src/compiler/jump-threading.h" | 7 #include "src/compiler/jump-threading.h" |
8 #include "test/cctest/cctest.h" | 8 #include "test/cctest/cctest.h" |
9 | 9 |
10 namespace v8 { | 10 namespace v8 { |
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
50 return pos; | 50 return pos; |
51 } | 51 } |
52 void Nop() { | 52 void Nop() { |
53 Start(); | 53 Start(); |
54 sequence_.AddInstruction(Instruction::New(main_zone(), kArchNop)); | 54 sequence_.AddInstruction(Instruction::New(main_zone(), kArchNop)); |
55 } | 55 } |
56 void RedundantMoves() { | 56 void RedundantMoves() { |
57 Start(); | 57 Start(); |
58 sequence_.AddInstruction(Instruction::New(main_zone(), kArchNop)); | 58 sequence_.AddInstruction(Instruction::New(main_zone(), kArchNop)); |
59 int index = static_cast<int>(sequence_.instructions().size()) - 1; | 59 int index = static_cast<int>(sequence_.instructions().size()) - 1; |
60 AddGapMove(index, | 60 AddGapMove(index, AllocatedOperand(LocationOperand::REGISTER, |
61 AllocatedOperand(LocationOperand::REGISTER, kRepWord32, 13), | 61 MachineRepresentation::kWord32, 13), |
62 AllocatedOperand(LocationOperand::REGISTER, kRepWord32, 13)); | 62 AllocatedOperand(LocationOperand::REGISTER, |
| 63 MachineRepresentation::kWord32, 13)); |
63 } | 64 } |
64 void NonRedundantMoves() { | 65 void NonRedundantMoves() { |
65 Start(); | 66 Start(); |
66 sequence_.AddInstruction(Instruction::New(main_zone(), kArchNop)); | 67 sequence_.AddInstruction(Instruction::New(main_zone(), kArchNop)); |
67 int index = static_cast<int>(sequence_.instructions().size()) - 1; | 68 int index = static_cast<int>(sequence_.instructions().size()) - 1; |
68 AddGapMove(index, ConstantOperand(11), | 69 AddGapMove(index, ConstantOperand(11), |
69 AllocatedOperand(LocationOperand::REGISTER, kRepWord32, 11)); | 70 AllocatedOperand(LocationOperand::REGISTER, |
| 71 MachineRepresentation::kWord32, 11)); |
70 } | 72 } |
71 void Other() { | 73 void Other() { |
72 Start(); | 74 Start(); |
73 sequence_.AddInstruction(Instruction::New(main_zone(), 155)); | 75 sequence_.AddInstruction(Instruction::New(main_zone(), 155)); |
74 } | 76 } |
75 void End() { | 77 void End() { |
76 Start(); | 78 Start(); |
77 sequence_.EndBlock(current_->rpo_number()); | 79 sequence_.EndBlock(current_->rpo_number()); |
78 current_ = NULL; | 80 current_ = NULL; |
79 rpo_number_ = RpoNumber::FromInt(rpo_number_.ToInt() + 1); | 81 rpo_number_ = RpoNumber::FromInt(rpo_number_.ToInt() + 1); |
(...skipping 677 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
757 for (int k = 4; k < 5; k++) assembly[k]--; | 759 for (int k = 4; k < 5; k++) assembly[k]--; |
758 } | 760 } |
759 CheckAssemblyOrder(code, 5, assembly); | 761 CheckAssemblyOrder(code, 5, assembly); |
760 } | 762 } |
761 } | 763 } |
762 } | 764 } |
763 | 765 |
764 } // namespace compiler | 766 } // namespace compiler |
765 } // namespace internal | 767 } // namespace internal |
766 } // namespace v8 | 768 } // namespace v8 |
OLD | NEW |