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

Side by Side Diff: src/crankshaft/x64/lithium-codegen-x64.cc

Issue 1594443003: [parsing] Move EvalComparison out of the assembler. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@local_cleanup-source-position
Patch Set: Drop one more include. Created 4 years, 11 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 | « src/crankshaft/ppc/lithium-codegen-ppc.cc ('k') | src/crankshaft/x87/lithium-codegen-x87.cc » ('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 #if V8_TARGET_ARCH_X64 5 #if V8_TARGET_ARCH_X64
6 6
7 #include "src/crankshaft/x64/lithium-codegen-x64.h" 7 #include "src/crankshaft/x64/lithium-codegen-x64.h"
8 8
9 #include "src/base/bits.h" 9 #include "src/base/bits.h"
10 #include "src/code-factory.h" 10 #include "src/code-factory.h"
(...skipping 2190 matching lines...) Expand 10 before | Expand all | Expand 10 after
2201 bool is_unsigned = 2201 bool is_unsigned =
2202 instr->is_double() || 2202 instr->is_double() ||
2203 instr->hydrogen()->left()->CheckFlag(HInstruction::kUint32) || 2203 instr->hydrogen()->left()->CheckFlag(HInstruction::kUint32) ||
2204 instr->hydrogen()->right()->CheckFlag(HInstruction::kUint32); 2204 instr->hydrogen()->right()->CheckFlag(HInstruction::kUint32);
2205 Condition cc = TokenToCondition(instr->op(), is_unsigned); 2205 Condition cc = TokenToCondition(instr->op(), is_unsigned);
2206 2206
2207 if (left->IsConstantOperand() && right->IsConstantOperand()) { 2207 if (left->IsConstantOperand() && right->IsConstantOperand()) {
2208 // We can statically evaluate the comparison. 2208 // We can statically evaluate the comparison.
2209 double left_val = ToDouble(LConstantOperand::cast(left)); 2209 double left_val = ToDouble(LConstantOperand::cast(left));
2210 double right_val = ToDouble(LConstantOperand::cast(right)); 2210 double right_val = ToDouble(LConstantOperand::cast(right));
2211 int next_block = EvalComparison(instr->op(), left_val, right_val) ? 2211 int next_block = Token::EvalComparison(instr->op(), left_val, right_val)
2212 instr->TrueDestination(chunk_) : instr->FalseDestination(chunk_); 2212 ? instr->TrueDestination(chunk_)
2213 : instr->FalseDestination(chunk_);
2213 EmitGoto(next_block); 2214 EmitGoto(next_block);
2214 } else { 2215 } else {
2215 if (instr->is_double()) { 2216 if (instr->is_double()) {
2216 // Don't base result on EFLAGS when a NaN is involved. Instead 2217 // Don't base result on EFLAGS when a NaN is involved. Instead
2217 // jump to the false block. 2218 // jump to the false block.
2218 __ Ucomisd(ToDoubleRegister(left), ToDoubleRegister(right)); 2219 __ Ucomisd(ToDoubleRegister(left), ToDoubleRegister(right));
2219 __ j(parity_even, instr->FalseLabel(chunk_)); 2220 __ j(parity_even, instr->FalseLabel(chunk_));
2220 } else { 2221 } else {
2221 int32_t value; 2222 int32_t value;
2222 if (right->IsConstantOperand()) { 2223 if (right->IsConstantOperand()) {
(...skipping 3438 matching lines...) Expand 10 before | Expand all | Expand 10 after
5661 RecordSafepoint(Safepoint::kNoLazyDeopt); 5662 RecordSafepoint(Safepoint::kNoLazyDeopt);
5662 } 5663 }
5663 5664
5664 5665
5665 #undef __ 5666 #undef __
5666 5667
5667 } // namespace internal 5668 } // namespace internal
5668 } // namespace v8 5669 } // namespace v8
5669 5670
5670 #endif // V8_TARGET_ARCH_X64 5671 #endif // V8_TARGET_ARCH_X64
OLDNEW
« no previous file with comments | « src/crankshaft/ppc/lithium-codegen-ppc.cc ('k') | src/crankshaft/x87/lithium-codegen-x87.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698