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

Side by Side Diff: src/x64/lithium-codegen-x64.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/mips/lithium-codegen-mips.cc ('k') | src/x87/lithium-codegen-x87.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 #if V8_TARGET_ARCH_X64 7 #if V8_TARGET_ARCH_X64
8 8
9 #include "src/x64/lithium-codegen-x64.h" 9 #include "src/x64/lithium-codegen-x64.h"
10 #include "src/code-stubs.h" 10 #include "src/code-stubs.h"
(...skipping 2220 matching lines...) Expand 10 before | Expand all | Expand 10 after
2231 UNREACHABLE(); 2231 UNREACHABLE();
2232 } 2232 }
2233 return cond; 2233 return cond;
2234 } 2234 }
2235 2235
2236 2236
2237 void LCodeGen::DoCompareNumericAndBranch(LCompareNumericAndBranch* instr) { 2237 void LCodeGen::DoCompareNumericAndBranch(LCompareNumericAndBranch* instr) {
2238 LOperand* left = instr->left(); 2238 LOperand* left = instr->left();
2239 LOperand* right = instr->right(); 2239 LOperand* right = instr->right();
2240 bool is_unsigned = 2240 bool is_unsigned =
2241 instr->is_double() || instr->hydrogen()->CheckFlag(HInstruction::kUint32); 2241 instr->is_double() ||
2242 instr->hydrogen()->left()->CheckFlag(HInstruction::kUint32) ||
2243 instr->hydrogen()->right()->CheckFlag(HInstruction::kUint32);
2242 Condition cc = TokenToCondition(instr->op(), is_unsigned); 2244 Condition cc = TokenToCondition(instr->op(), is_unsigned);
2243 2245
2244 if (left->IsConstantOperand() && right->IsConstantOperand()) { 2246 if (left->IsConstantOperand() && right->IsConstantOperand()) {
2245 // We can statically evaluate the comparison. 2247 // We can statically evaluate the comparison.
2246 double left_val = ToDouble(LConstantOperand::cast(left)); 2248 double left_val = ToDouble(LConstantOperand::cast(left));
2247 double right_val = ToDouble(LConstantOperand::cast(right)); 2249 double right_val = ToDouble(LConstantOperand::cast(right));
2248 int next_block = EvalComparison(instr->op(), left_val, right_val) ? 2250 int next_block = EvalComparison(instr->op(), left_val, right_val) ?
2249 instr->TrueDestination(chunk_) : instr->FalseDestination(chunk_); 2251 instr->TrueDestination(chunk_) : instr->FalseDestination(chunk_);
2250 EmitGoto(next_block); 2252 EmitGoto(next_block);
2251 } else { 2253 } else {
(...skipping 3483 matching lines...) Expand 10 before | Expand all | Expand 10 after
5735 CallRuntime(Runtime::kHiddenPushBlockContext, 2, instr); 5737 CallRuntime(Runtime::kHiddenPushBlockContext, 2, instr);
5736 RecordSafepoint(Safepoint::kNoLazyDeopt); 5738 RecordSafepoint(Safepoint::kNoLazyDeopt);
5737 } 5739 }
5738 5740
5739 5741
5740 #undef __ 5742 #undef __
5741 5743
5742 } } // namespace v8::internal 5744 } } // namespace v8::internal
5743 5745
5744 #endif // V8_TARGET_ARCH_X64 5746 #endif // V8_TARGET_ARCH_X64
OLDNEW
« no previous file with comments | « src/mips/lithium-codegen-mips.cc ('k') | src/x87/lithium-codegen-x87.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698