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

Side by Side Diff: src/crankshaft/mips64/lithium-codegen-mips64.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/mips/lithium-codegen-mips.cc ('k') | src/crankshaft/ppc/lithium-codegen-ppc.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 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 #include "src/crankshaft/mips64/lithium-codegen-mips64.h" 5 #include "src/crankshaft/mips64/lithium-codegen-mips64.h"
6 6
7 #include "src/code-factory.h" 7 #include "src/code-factory.h"
8 #include "src/code-stubs.h" 8 #include "src/code-stubs.h"
9 #include "src/crankshaft/hydrogen-osr.h" 9 #include "src/crankshaft/hydrogen-osr.h"
10 #include "src/crankshaft/mips64/lithium-gap-resolver-mips64.h" 10 #include "src/crankshaft/mips64/lithium-gap-resolver-mips64.h"
(...skipping 2259 matching lines...) Expand 10 before | Expand all | Expand 10 after
2270 LOperand* right = instr->right(); 2270 LOperand* right = instr->right();
2271 bool is_unsigned = 2271 bool is_unsigned =
2272 instr->hydrogen()->left()->CheckFlag(HInstruction::kUint32) || 2272 instr->hydrogen()->left()->CheckFlag(HInstruction::kUint32) ||
2273 instr->hydrogen()->right()->CheckFlag(HInstruction::kUint32); 2273 instr->hydrogen()->right()->CheckFlag(HInstruction::kUint32);
2274 Condition cond = TokenToCondition(instr->op(), is_unsigned); 2274 Condition cond = TokenToCondition(instr->op(), is_unsigned);
2275 2275
2276 if (left->IsConstantOperand() && right->IsConstantOperand()) { 2276 if (left->IsConstantOperand() && right->IsConstantOperand()) {
2277 // We can statically evaluate the comparison. 2277 // We can statically evaluate the comparison.
2278 double left_val = ToDouble(LConstantOperand::cast(left)); 2278 double left_val = ToDouble(LConstantOperand::cast(left));
2279 double right_val = ToDouble(LConstantOperand::cast(right)); 2279 double right_val = ToDouble(LConstantOperand::cast(right));
2280 int next_block = EvalComparison(instr->op(), left_val, right_val) ? 2280 int next_block = Token::EvalComparison(instr->op(), left_val, right_val)
2281 instr->TrueDestination(chunk_) : instr->FalseDestination(chunk_); 2281 ? instr->TrueDestination(chunk_)
2282 : instr->FalseDestination(chunk_);
2282 EmitGoto(next_block); 2283 EmitGoto(next_block);
2283 } else { 2284 } else {
2284 if (instr->is_double()) { 2285 if (instr->is_double()) {
2285 // Compare left and right as doubles and load the 2286 // Compare left and right as doubles and load the
2286 // resulting flags into the normal status register. 2287 // resulting flags into the normal status register.
2287 FPURegister left_reg = ToDoubleRegister(left); 2288 FPURegister left_reg = ToDoubleRegister(left);
2288 FPURegister right_reg = ToDoubleRegister(right); 2289 FPURegister right_reg = ToDoubleRegister(right);
2289 2290
2290 // If a NaN is involved, i.e. the result is unordered, 2291 // If a NaN is involved, i.e. the result is unordered,
2291 // jump to false block label. 2292 // jump to false block label.
(...skipping 3541 matching lines...) Expand 10 before | Expand all | Expand 10 after
5833 __ Push(at, ToRegister(instr->function())); 5834 __ Push(at, ToRegister(instr->function()));
5834 CallRuntime(Runtime::kPushBlockContext, instr); 5835 CallRuntime(Runtime::kPushBlockContext, instr);
5835 RecordSafepoint(Safepoint::kNoLazyDeopt); 5836 RecordSafepoint(Safepoint::kNoLazyDeopt);
5836 } 5837 }
5837 5838
5838 5839
5839 #undef __ 5840 #undef __
5840 5841
5841 } // namespace internal 5842 } // namespace internal
5842 } // namespace v8 5843 } // namespace v8
OLDNEW
« no previous file with comments | « src/crankshaft/mips/lithium-codegen-mips.cc ('k') | src/crankshaft/ppc/lithium-codegen-ppc.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698