OLD | NEW |
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 #include "src/crankshaft/arm64/lithium-codegen-arm64.h" | 5 #include "src/crankshaft/arm64/lithium-codegen-arm64.h" |
6 | 6 |
7 #include "src/arm64/frames-arm64.h" | 7 #include "src/arm64/frames-arm64.h" |
8 #include "src/base/bits.h" | 8 #include "src/base/bits.h" |
9 #include "src/code-factory.h" | 9 #include "src/code-factory.h" |
10 #include "src/code-stubs.h" | 10 #include "src/code-stubs.h" |
(...skipping 2342 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2353 LOperand* right = instr->right(); | 2353 LOperand* right = instr->right(); |
2354 bool is_unsigned = | 2354 bool is_unsigned = |
2355 instr->hydrogen()->left()->CheckFlag(HInstruction::kUint32) || | 2355 instr->hydrogen()->left()->CheckFlag(HInstruction::kUint32) || |
2356 instr->hydrogen()->right()->CheckFlag(HInstruction::kUint32); | 2356 instr->hydrogen()->right()->CheckFlag(HInstruction::kUint32); |
2357 Condition cond = TokenToCondition(instr->op(), is_unsigned); | 2357 Condition cond = TokenToCondition(instr->op(), is_unsigned); |
2358 | 2358 |
2359 if (left->IsConstantOperand() && right->IsConstantOperand()) { | 2359 if (left->IsConstantOperand() && right->IsConstantOperand()) { |
2360 // We can statically evaluate the comparison. | 2360 // We can statically evaluate the comparison. |
2361 double left_val = ToDouble(LConstantOperand::cast(left)); | 2361 double left_val = ToDouble(LConstantOperand::cast(left)); |
2362 double right_val = ToDouble(LConstantOperand::cast(right)); | 2362 double right_val = ToDouble(LConstantOperand::cast(right)); |
2363 int next_block = EvalComparison(instr->op(), left_val, right_val) ? | 2363 int next_block = Token::EvalComparison(instr->op(), left_val, right_val) |
2364 instr->TrueDestination(chunk_) : instr->FalseDestination(chunk_); | 2364 ? instr->TrueDestination(chunk_) |
| 2365 : instr->FalseDestination(chunk_); |
2365 EmitGoto(next_block); | 2366 EmitGoto(next_block); |
2366 } else { | 2367 } else { |
2367 if (instr->is_double()) { | 2368 if (instr->is_double()) { |
2368 __ Fcmp(ToDoubleRegister(left), ToDoubleRegister(right)); | 2369 __ Fcmp(ToDoubleRegister(left), ToDoubleRegister(right)); |
2369 | 2370 |
2370 // If a NaN is involved, i.e. the result is unordered (V set), | 2371 // If a NaN is involved, i.e. the result is unordered (V set), |
2371 // jump to false block label. | 2372 // jump to false block label. |
2372 __ B(vs, instr->FalseLabel(chunk_)); | 2373 __ B(vs, instr->FalseLabel(chunk_)); |
2373 EmitBranch(instr, cond); | 2374 EmitBranch(instr, cond); |
2374 } else { | 2375 } else { |
(...skipping 3404 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5779 Handle<ScopeInfo> scope_info = instr->scope_info(); | 5780 Handle<ScopeInfo> scope_info = instr->scope_info(); |
5780 __ Push(scope_info); | 5781 __ Push(scope_info); |
5781 __ Push(ToRegister(instr->function())); | 5782 __ Push(ToRegister(instr->function())); |
5782 CallRuntime(Runtime::kPushBlockContext, instr); | 5783 CallRuntime(Runtime::kPushBlockContext, instr); |
5783 RecordSafepoint(Safepoint::kNoLazyDeopt); | 5784 RecordSafepoint(Safepoint::kNoLazyDeopt); |
5784 } | 5785 } |
5785 | 5786 |
5786 | 5787 |
5787 } // namespace internal | 5788 } // namespace internal |
5788 } // namespace v8 | 5789 } // namespace v8 |
OLD | NEW |