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

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

Issue 1075903002: [turbofan] support small immediates (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 8 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
« no previous file with comments | « no previous file | src/compiler/instruction.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/code-stubs.h" 8 #include "src/code-stubs.h"
9 #include "src/compiler/code-generator.h" 9 #include "src/compiler/code-generator.h"
10 #include "src/compiler/instruction.h" 10 #include "src/compiler/instruction.h"
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after
93 return Register::FromAllocationIndex(RegisterOperand::cast(op)->index()); 93 return Register::FromAllocationIndex(RegisterOperand::cast(op)->index());
94 } 94 }
95 95
96 DoubleRegister ToDoubleRegister(InstructionOperand* op) { 96 DoubleRegister ToDoubleRegister(InstructionOperand* op) {
97 return DoubleRegister::FromAllocationIndex( 97 return DoubleRegister::FromAllocationIndex(
98 DoubleRegisterOperand::cast(op)->index()); 98 DoubleRegisterOperand::cast(op)->index());
99 } 99 }
100 100
101 Constant ToConstant(InstructionOperand* op) { 101 Constant ToConstant(InstructionOperand* op) {
102 if (op->IsImmediate()) { 102 if (op->IsImmediate()) {
103 return gen_->code()->GetImmediate(ImmediateOperand::cast(op)->index()); 103 return gen_->code()->GetImmediate(ImmediateOperand::cast(op));
104 } 104 }
105 return gen_->code()->GetConstant( 105 return gen_->code()->GetConstant(
106 ConstantOperand::cast(op)->virtual_register()); 106 ConstantOperand::cast(op)->virtual_register());
107 } 107 }
108 108
109 double ToDouble(InstructionOperand* op) { return ToConstant(op).ToFloat64(); } 109 double ToDouble(InstructionOperand* op) { return ToConstant(op).ToFloat64(); }
110 110
111 Handle<HeapObject> ToHeapObject(InstructionOperand* op) { 111 Handle<HeapObject> ToHeapObject(InstructionOperand* op) {
112 return ToConstant(op).ToHeapObject(); 112 return ToConstant(op).ToHeapObject();
113 } 113 }
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
151 #elif V8_TARGET_ARCH_IA32 || V8_TARGET_ARCH_X64 151 #elif V8_TARGET_ARCH_IA32 || V8_TARGET_ARCH_X64
152 masm->ud2(); 152 masm->ud2();
153 #endif 153 #endif
154 } 154 }
155 155
156 } // namespace compiler 156 } // namespace compiler
157 } // namespace internal 157 } // namespace internal
158 } // namespace v8 158 } // namespace v8
159 159
160 #endif // V8_COMPILER_CODE_GENERATOR_IMPL_H 160 #endif // V8_COMPILER_CODE_GENERATOR_IMPL_H
OLDNEW
« no previous file with comments | « no previous file | src/compiler/instruction.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698