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