OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 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_X64_LITHIUM_CODEGEN_X64_H_ | 5 #ifndef V8_X64_LITHIUM_CODEGEN_X64_H_ |
6 #define V8_X64_LITHIUM_CODEGEN_X64_H_ | 6 #define V8_X64_LITHIUM_CODEGEN_X64_H_ |
7 | 7 |
8 #include "src/x64/lithium-x64.h" | 8 #include "src/x64/lithium-x64.h" |
9 | 9 |
10 #include "src/base/logging.h" | 10 #include "src/base/logging.h" |
(...skipping 188 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
199 int formal_parameter_count, | 199 int formal_parameter_count, |
200 int arity, | 200 int arity, |
201 LInstruction* instr, | 201 LInstruction* instr, |
202 RDIState rdi_state); | 202 RDIState rdi_state); |
203 | 203 |
204 void RecordSafepointWithLazyDeopt(LInstruction* instr, | 204 void RecordSafepointWithLazyDeopt(LInstruction* instr, |
205 SafepointMode safepoint_mode, | 205 SafepointMode safepoint_mode, |
206 int argc); | 206 int argc); |
207 void RegisterEnvironmentForDeoptimization(LEnvironment* environment, | 207 void RegisterEnvironmentForDeoptimization(LEnvironment* environment, |
208 Safepoint::DeoptMode mode); | 208 Safepoint::DeoptMode mode); |
209 void DeoptimizeIf(Condition cc, | 209 void DeoptimizeIf(Condition cc, LInstruction* instr, |
210 LEnvironment* environment, | |
211 Deoptimizer::BailoutType bailout_type); | 210 Deoptimizer::BailoutType bailout_type); |
212 void DeoptimizeIf(Condition cc, LEnvironment* environment); | 211 void DeoptimizeIf(Condition cc, LInstruction* instr); |
213 | 212 |
214 bool DeoptEveryNTimes() { | 213 bool DeoptEveryNTimes() { |
215 return FLAG_deopt_every_n_times != 0 && !info()->IsStub(); | 214 return FLAG_deopt_every_n_times != 0 && !info()->IsStub(); |
216 } | 215 } |
217 | 216 |
218 void AddToTranslation(LEnvironment* environment, | 217 void AddToTranslation(LEnvironment* environment, |
219 Translation* translation, | 218 Translation* translation, |
220 LOperand* op, | 219 LOperand* op, |
221 bool is_tagged, | 220 bool is_tagged, |
222 bool is_uint32, | 221 bool is_uint32, |
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
256 void RecordAndWritePosition(int position) OVERRIDE; | 255 void RecordAndWritePosition(int position) OVERRIDE; |
257 | 256 |
258 static Condition TokenToCondition(Token::Value op, bool is_unsigned); | 257 static Condition TokenToCondition(Token::Value op, bool is_unsigned); |
259 void EmitGoto(int block); | 258 void EmitGoto(int block); |
260 | 259 |
261 // EmitBranch expects to be the last instruction of a block. | 260 // EmitBranch expects to be the last instruction of a block. |
262 template<class InstrType> | 261 template<class InstrType> |
263 void EmitBranch(InstrType instr, Condition cc); | 262 void EmitBranch(InstrType instr, Condition cc); |
264 template<class InstrType> | 263 template<class InstrType> |
265 void EmitFalseBranch(InstrType instr, Condition cc); | 264 void EmitFalseBranch(InstrType instr, Condition cc); |
266 void EmitNumberUntagD( | 265 void EmitNumberUntagD(LNumberUntagD* instr, Register input, |
267 Register input, | 266 XMMRegister result, NumberUntagDMode mode); |
268 XMMRegister result, | |
269 bool allow_undefined_as_nan, | |
270 bool deoptimize_on_minus_zero, | |
271 LEnvironment* env, | |
272 NumberUntagDMode mode = NUMBER_CANDIDATE_IS_ANY_TAGGED); | |
273 | 267 |
274 // Emits optimized code for typeof x == "y". Modifies input register. | 268 // Emits optimized code for typeof x == "y". Modifies input register. |
275 // Returns the condition on which a final split to | 269 // Returns the condition on which a final split to |
276 // true and false label should be made, to optimize fallthrough. | 270 // true and false label should be made, to optimize fallthrough. |
277 Condition EmitTypeofIs(LTypeofIsAndBranch* instr, Register input); | 271 Condition EmitTypeofIs(LTypeofIsAndBranch* instr, Register input); |
278 | 272 |
279 // Emits optimized code for %_IsObject(x). Preserves input register. | 273 // Emits optimized code for %_IsObject(x). Preserves input register. |
280 // Returns the condition on which a final split to | 274 // Returns the condition on which a final split to |
281 // true and false label should be made, to optimize fallthrough. | 275 // true and false label should be made, to optimize fallthrough. |
282 Condition EmitIsObject(Register input, | 276 Condition EmitIsObject(Register input, |
(...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
400 Label entry_; | 394 Label entry_; |
401 Label exit_; | 395 Label exit_; |
402 Label done_; | 396 Label done_; |
403 Label* external_exit_; | 397 Label* external_exit_; |
404 int instruction_index_; | 398 int instruction_index_; |
405 }; | 399 }; |
406 | 400 |
407 } } // namespace v8::internal | 401 } } // namespace v8::internal |
408 | 402 |
409 #endif // V8_X64_LITHIUM_CODEGEN_X64_H_ | 403 #endif // V8_X64_LITHIUM_CODEGEN_X64_H_ |
OLD | NEW |