Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(160)

Side by Side Diff: src/compiler/code-generator-impl.h

Issue 436593002: [turbofan] Add Int32AddWithOverflow machine operator. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Add more tests. Created 6 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright 2013 the V8 project authors. All rights reserved. 1 // Copyright 2013 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 #ifndef V8_COMPILER_CODE_GENERATOR_IMPL_H_ 5 #ifndef V8_COMPILER_CODE_GENERATOR_IMPL_H_
6 #define V8_COMPILER_CODE_GENERATOR_IMPL_H_ 6 #define V8_COMPILER_CODE_GENERATOR_IMPL_H_
7 7
8 #include "src/compiler/code-generator.h" 8 #include "src/compiler/code-generator.h"
9 #include "src/compiler/common-operator.h" 9 #include "src/compiler/common-operator.h"
10 #include "src/compiler/generic-graph.h" 10 #include "src/compiler/generic-graph.h"
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
65 } 65 }
66 66
67 BasicBlock* InputBlock(int index) { 67 BasicBlock* InputBlock(int index) {
68 NodeId block_id = static_cast<NodeId>(instr_->InputAt(index)->index()); 68 NodeId block_id = static_cast<NodeId>(instr_->InputAt(index)->index());
69 // operand should be a block id. 69 // operand should be a block id.
70 ASSERT(block_id >= 0); 70 ASSERT(block_id >= 0);
71 ASSERT(block_id < gen_->schedule()->BasicBlockCount()); 71 ASSERT(block_id < gen_->schedule()->BasicBlockCount());
72 return gen_->schedule()->GetBlockById(block_id); 72 return gen_->schedule()->GetBlockById(block_id);
73 } 73 }
74 74
75 Register OutputRegister() { return ToRegister(instr_->Output()); } 75 Register OutputRegister(int index = 0) {
76 return ToRegister(instr_->OutputAt(index));
77 }
76 78
77 DoubleRegister OutputDoubleRegister() { 79 DoubleRegister OutputDoubleRegister() {
78 return ToDoubleRegister(instr_->Output()); 80 return ToDoubleRegister(instr_->Output());
79 } 81 }
80 82
81 Register TempRegister(int index) { return ToRegister(instr_->TempAt(index)); } 83 Register TempRegister(int index) { return ToRegister(instr_->TempAt(index)); }
82 84
83 Register ToRegister(InstructionOperand* op) { 85 Register ToRegister(InstructionOperand* op) {
84 ASSERT(op->IsRegister()); 86 ASSERT(op->IsRegister());
85 return Register::FromAllocationIndex(op->index()); 87 return Register::FromAllocationIndex(op->index());
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
121 #if V8_TARGET_ARCH_ARM64 || V8_TARGET_ARCH_ARM 123 #if V8_TARGET_ARCH_ARM64 || V8_TARGET_ARCH_ARM
122 masm->CheckConstPool(true, false); 124 masm->CheckConstPool(true, false);
123 #endif 125 #endif
124 } 126 }
125 127
126 } // namespace compiler 128 } // namespace compiler
127 } // namespace internal 129 } // namespace internal
128 } // namespace v8 130 } // namespace v8
129 131
130 #endif // V8_COMPILER_CODE_GENERATOR_IMPL_H 132 #endif // V8_COMPILER_CODE_GENERATOR_IMPL_H
OLDNEW
« no previous file with comments | « src/compiler/arm64/instruction-selector-arm64.cc ('k') | src/compiler/ia32/code-generator-ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698