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

Side by Side Diff: src/arm/lithium-codegen-arm.cc

Issue 325133004: Fix unsigned comparisons. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Assert, don't print... Created 6 years, 6 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | src/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/v8.h" 5 #include "src/v8.h"
6 6
7 #include "src/arm/lithium-codegen-arm.h" 7 #include "src/arm/lithium-codegen-arm.h"
8 #include "src/arm/lithium-gap-resolver-arm.h" 8 #include "src/arm/lithium-gap-resolver-arm.h"
9 #include "src/code-stubs.h" 9 #include "src/code-stubs.h"
10 #include "src/stub-cache.h" 10 #include "src/stub-cache.h"
(...skipping 2353 matching lines...) Expand 10 before | Expand all | Expand 10 after
2364 default: 2364 default:
2365 UNREACHABLE(); 2365 UNREACHABLE();
2366 } 2366 }
2367 return cond; 2367 return cond;
2368 } 2368 }
2369 2369
2370 2370
2371 void LCodeGen::DoCompareNumericAndBranch(LCompareNumericAndBranch* instr) { 2371 void LCodeGen::DoCompareNumericAndBranch(LCompareNumericAndBranch* instr) {
2372 LOperand* left = instr->left(); 2372 LOperand* left = instr->left();
2373 LOperand* right = instr->right(); 2373 LOperand* right = instr->right();
2374 bool is_unsigned = instr->hydrogen()->CheckFlag(HInstruction::kUint32); 2374 bool is_unsigned =
2375 instr->hydrogen()->left()->CheckFlag(HInstruction::kUint32) ||
2376 instr->hydrogen()->right()->CheckFlag(HInstruction::kUint32);
2375 Condition cond = TokenToCondition(instr->op(), is_unsigned); 2377 Condition cond = TokenToCondition(instr->op(), is_unsigned);
2376 2378
2377 if (left->IsConstantOperand() && right->IsConstantOperand()) { 2379 if (left->IsConstantOperand() && right->IsConstantOperand()) {
2378 // We can statically evaluate the comparison. 2380 // We can statically evaluate the comparison.
2379 double left_val = ToDouble(LConstantOperand::cast(left)); 2381 double left_val = ToDouble(LConstantOperand::cast(left));
2380 double right_val = ToDouble(LConstantOperand::cast(right)); 2382 double right_val = ToDouble(LConstantOperand::cast(right));
2381 int next_block = EvalComparison(instr->op(), left_val, right_val) ? 2383 int next_block = EvalComparison(instr->op(), left_val, right_val) ?
2382 instr->TrueDestination(chunk_) : instr->FalseDestination(chunk_); 2384 instr->TrueDestination(chunk_) : instr->FalseDestination(chunk_);
2383 EmitGoto(next_block); 2385 EmitGoto(next_block);
2384 } else { 2386 } else {
(...skipping 3444 matching lines...) Expand 10 before | Expand all | Expand 10 after
5829 __ Push(scope_info); 5831 __ Push(scope_info);
5830 __ push(ToRegister(instr->function())); 5832 __ push(ToRegister(instr->function()));
5831 CallRuntime(Runtime::kHiddenPushBlockContext, 2, instr); 5833 CallRuntime(Runtime::kHiddenPushBlockContext, 2, instr);
5832 RecordSafepoint(Safepoint::kNoLazyDeopt); 5834 RecordSafepoint(Safepoint::kNoLazyDeopt);
5833 } 5835 }
5834 5836
5835 5837
5836 #undef __ 5838 #undef __
5837 5839
5838 } } // namespace v8::internal 5840 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « no previous file | src/arm64/lithium-codegen-arm64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698