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

Side by Side Diff: src/crankshaft/arm/lithium-codegen-arm.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/assembler.cc ('k') | src/crankshaft/arm64/lithium-codegen-arm64.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/arm/lithium-codegen-arm.h" 5 #include "src/crankshaft/arm/lithium-codegen-arm.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/arm/lithium-gap-resolver-arm.h" 10 #include "src/crankshaft/arm/lithium-gap-resolver-arm.h"
(...skipping 2242 matching lines...) Expand 10 before | Expand all | Expand 10 after
2253 LOperand* right = instr->right(); 2253 LOperand* right = instr->right();
2254 bool is_unsigned = 2254 bool is_unsigned =
2255 instr->hydrogen()->left()->CheckFlag(HInstruction::kUint32) || 2255 instr->hydrogen()->left()->CheckFlag(HInstruction::kUint32) ||
2256 instr->hydrogen()->right()->CheckFlag(HInstruction::kUint32); 2256 instr->hydrogen()->right()->CheckFlag(HInstruction::kUint32);
2257 Condition cond = TokenToCondition(instr->op(), is_unsigned); 2257 Condition cond = TokenToCondition(instr->op(), is_unsigned);
2258 2258
2259 if (left->IsConstantOperand() && right->IsConstantOperand()) { 2259 if (left->IsConstantOperand() && right->IsConstantOperand()) {
2260 // We can statically evaluate the comparison. 2260 // We can statically evaluate the comparison.
2261 double left_val = ToDouble(LConstantOperand::cast(left)); 2261 double left_val = ToDouble(LConstantOperand::cast(left));
2262 double right_val = ToDouble(LConstantOperand::cast(right)); 2262 double right_val = ToDouble(LConstantOperand::cast(right));
2263 int next_block = EvalComparison(instr->op(), left_val, right_val) ? 2263 int next_block = Token::EvalComparison(instr->op(), left_val, right_val)
2264 instr->TrueDestination(chunk_) : instr->FalseDestination(chunk_); 2264 ? instr->TrueDestination(chunk_)
2265 : instr->FalseDestination(chunk_);
2265 EmitGoto(next_block); 2266 EmitGoto(next_block);
2266 } else { 2267 } else {
2267 if (instr->is_double()) { 2268 if (instr->is_double()) {
2268 // Compare left and right operands as doubles and load the 2269 // Compare left and right operands as doubles and load the
2269 // resulting flags into the normal status register. 2270 // resulting flags into the normal status register.
2270 __ VFPCompareAndSetFlags(ToDoubleRegister(left), ToDoubleRegister(right)); 2271 __ VFPCompareAndSetFlags(ToDoubleRegister(left), ToDoubleRegister(right));
2271 // If a NaN is involved, i.e. the result is unordered (V set), 2272 // If a NaN is involved, i.e. the result is unordered (V set),
2272 // jump to false block label. 2273 // jump to false block label.
2273 __ b(vs, instr->FalseLabel(chunk_)); 2274 __ b(vs, instr->FalseLabel(chunk_));
2274 } else { 2275 } else {
(...skipping 3323 matching lines...) Expand 10 before | Expand all | Expand 10 after
5598 __ push(ToRegister(instr->function())); 5599 __ push(ToRegister(instr->function()));
5599 CallRuntime(Runtime::kPushBlockContext, instr); 5600 CallRuntime(Runtime::kPushBlockContext, instr);
5600 RecordSafepoint(Safepoint::kNoLazyDeopt); 5601 RecordSafepoint(Safepoint::kNoLazyDeopt);
5601 } 5602 }
5602 5603
5603 5604
5604 #undef __ 5605 #undef __
5605 5606
5606 } // namespace internal 5607 } // namespace internal
5607 } // namespace v8 5608 } // namespace v8
OLDNEW
« no previous file with comments | « src/assembler.cc ('k') | src/crankshaft/arm64/lithium-codegen-arm64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698