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

Side by Side Diff: src/arm64/lithium-codegen-arm64.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 | « src/arm/lithium-codegen-arm.cc ('k') | src/hydrogen-uint32-analysis.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 #include "src/v8.h" 5 #include "src/v8.h"
6 6
7 #include "src/arm64/lithium-codegen-arm64.h" 7 #include "src/arm64/lithium-codegen-arm64.h"
8 #include "src/arm64/lithium-gap-resolver-arm64.h" 8 #include "src/arm64/lithium-gap-resolver-arm64.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 2452 matching lines...) Expand 10 before | Expand all | Expand 10 after
2463 __ Ldr(scratch, FieldMemOperand(value, HeapNumber::kValueOffset)); 2463 __ Ldr(scratch, FieldMemOperand(value, HeapNumber::kValueOffset));
2464 __ JumpIfMinusZero(scratch, instr->TrueLabel(chunk())); 2464 __ JumpIfMinusZero(scratch, instr->TrueLabel(chunk()));
2465 } 2465 }
2466 EmitGoto(instr->FalseDestination(chunk())); 2466 EmitGoto(instr->FalseDestination(chunk()));
2467 } 2467 }
2468 2468
2469 2469
2470 void LCodeGen::DoCompareNumericAndBranch(LCompareNumericAndBranch* instr) { 2470 void LCodeGen::DoCompareNumericAndBranch(LCompareNumericAndBranch* instr) {
2471 LOperand* left = instr->left(); 2471 LOperand* left = instr->left();
2472 LOperand* right = instr->right(); 2472 LOperand* right = instr->right();
2473 bool is_unsigned = instr->hydrogen()->CheckFlag(HInstruction::kUint32); 2473 bool is_unsigned =
2474 instr->hydrogen()->left()->CheckFlag(HInstruction::kUint32) ||
2475 instr->hydrogen()->right()->CheckFlag(HInstruction::kUint32);
2474 Condition cond = TokenToCondition(instr->op(), is_unsigned); 2476 Condition cond = TokenToCondition(instr->op(), is_unsigned);
2475 2477
2476 if (left->IsConstantOperand() && right->IsConstantOperand()) { 2478 if (left->IsConstantOperand() && right->IsConstantOperand()) {
2477 // We can statically evaluate the comparison. 2479 // We can statically evaluate the comparison.
2478 double left_val = ToDouble(LConstantOperand::cast(left)); 2480 double left_val = ToDouble(LConstantOperand::cast(left));
2479 double right_val = ToDouble(LConstantOperand::cast(right)); 2481 double right_val = ToDouble(LConstantOperand::cast(right));
2480 int next_block = EvalComparison(instr->op(), left_val, right_val) ? 2482 int next_block = EvalComparison(instr->op(), left_val, right_val) ?
2481 instr->TrueDestination(chunk_) : instr->FalseDestination(chunk_); 2483 instr->TrueDestination(chunk_) : instr->FalseDestination(chunk_);
2482 EmitGoto(next_block); 2484 EmitGoto(next_block);
2483 } else { 2485 } else {
(...skipping 3564 matching lines...) Expand 10 before | Expand all | Expand 10 after
6048 Handle<ScopeInfo> scope_info = instr->scope_info(); 6050 Handle<ScopeInfo> scope_info = instr->scope_info();
6049 __ Push(scope_info); 6051 __ Push(scope_info);
6050 __ Push(ToRegister(instr->function())); 6052 __ Push(ToRegister(instr->function()));
6051 CallRuntime(Runtime::kHiddenPushBlockContext, 2, instr); 6053 CallRuntime(Runtime::kHiddenPushBlockContext, 2, instr);
6052 RecordSafepoint(Safepoint::kNoLazyDeopt); 6054 RecordSafepoint(Safepoint::kNoLazyDeopt);
6053 } 6055 }
6054 6056
6055 6057
6056 6058
6057 } } // namespace v8::internal 6059 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/arm/lithium-codegen-arm.cc ('k') | src/hydrogen-uint32-analysis.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698