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

Side by Side Diff: src/crankshaft/ppc/lithium-codegen-ppc.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
OLDNEW
1 // Copyright 2014 the V8 project authors. All rights reserved. 1 // Copyright 2014 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/ppc/lithium-codegen-ppc.h" 5 #include "src/crankshaft/ppc/lithium-codegen-ppc.h"
6 6
7 #include "src/base/bits.h" 7 #include "src/base/bits.h"
8 #include "src/code-factory.h" 8 #include "src/code-factory.h"
9 #include "src/code-stubs.h" 9 #include "src/code-stubs.h"
10 #include "src/crankshaft/hydrogen-osr.h" 10 #include "src/crankshaft/hydrogen-osr.h"
(...skipping 2277 matching lines...) Expand 10 before | Expand all | Expand 10 after
2288 LOperand* right = instr->right(); 2288 LOperand* right = instr->right();
2289 bool is_unsigned = 2289 bool is_unsigned =
2290 instr->hydrogen()->left()->CheckFlag(HInstruction::kUint32) || 2290 instr->hydrogen()->left()->CheckFlag(HInstruction::kUint32) ||
2291 instr->hydrogen()->right()->CheckFlag(HInstruction::kUint32); 2291 instr->hydrogen()->right()->CheckFlag(HInstruction::kUint32);
2292 Condition cond = TokenToCondition(instr->op()); 2292 Condition cond = TokenToCondition(instr->op());
2293 2293
2294 if (left->IsConstantOperand() && right->IsConstantOperand()) { 2294 if (left->IsConstantOperand() && right->IsConstantOperand()) {
2295 // We can statically evaluate the comparison. 2295 // We can statically evaluate the comparison.
2296 double left_val = ToDouble(LConstantOperand::cast(left)); 2296 double left_val = ToDouble(LConstantOperand::cast(left));
2297 double right_val = ToDouble(LConstantOperand::cast(right)); 2297 double right_val = ToDouble(LConstantOperand::cast(right));
2298 int next_block = EvalComparison(instr->op(), left_val, right_val) 2298 int next_block = Token::EvalComparison(instr->op(), left_val, right_val)
2299 ? instr->TrueDestination(chunk_) 2299 ? instr->TrueDestination(chunk_)
2300 : instr->FalseDestination(chunk_); 2300 : instr->FalseDestination(chunk_);
2301 EmitGoto(next_block); 2301 EmitGoto(next_block);
2302 } else { 2302 } else {
2303 if (instr->is_double()) { 2303 if (instr->is_double()) {
2304 // Compare left and right operands as doubles and load the 2304 // Compare left and right operands as doubles and load the
2305 // resulting flags into the normal status register. 2305 // resulting flags into the normal status register.
2306 __ fcmpu(ToDoubleRegister(left), ToDoubleRegister(right)); 2306 __ fcmpu(ToDoubleRegister(left), ToDoubleRegister(right));
2307 // If a NaN is involved, i.e. the result is unordered, 2307 // If a NaN is involved, i.e. the result is unordered,
2308 // jump to false block label. 2308 // jump to false block label.
(...skipping 3558 matching lines...) Expand 10 before | Expand all | Expand 10 after
5867 __ Push(scope_info); 5867 __ Push(scope_info);
5868 __ push(ToRegister(instr->function())); 5868 __ push(ToRegister(instr->function()));
5869 CallRuntime(Runtime::kPushBlockContext, instr); 5869 CallRuntime(Runtime::kPushBlockContext, instr);
5870 RecordSafepoint(Safepoint::kNoLazyDeopt); 5870 RecordSafepoint(Safepoint::kNoLazyDeopt);
5871 } 5871 }
5872 5872
5873 5873
5874 #undef __ 5874 #undef __
5875 } // namespace internal 5875 } // namespace internal
5876 } // namespace v8 5876 } // namespace v8
OLDNEW
« no previous file with comments | « src/crankshaft/mips64/lithium-codegen-mips64.cc ('k') | src/crankshaft/x64/lithium-codegen-x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698