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

Side by Side Diff: src/mips/lithium-codegen-mips.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/ia32/lithium-codegen-ia32.cc ('k') | src/x64/lithium-codegen-x64.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.7 1 // Copyright 2012 the V8 project authors. All rights reserved.7
2 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 2261 matching lines...) Expand 10 before | Expand all | Expand 10 after
2272 default: 2272 default:
2273 UNREACHABLE(); 2273 UNREACHABLE();
2274 } 2274 }
2275 return cond; 2275 return cond;
2276 } 2276 }
2277 2277
2278 2278
2279 void LCodeGen::DoCompareNumericAndBranch(LCompareNumericAndBranch* instr) { 2279 void LCodeGen::DoCompareNumericAndBranch(LCompareNumericAndBranch* instr) {
2280 LOperand* left = instr->left(); 2280 LOperand* left = instr->left();
2281 LOperand* right = instr->right(); 2281 LOperand* right = instr->right();
2282 bool is_unsigned = instr->hydrogen()->CheckFlag(HInstruction::kUint32); 2282 bool is_unsigned =
2283 instr->hydrogen()->left()->CheckFlag(HInstruction::kUint32) ||
2284 instr->hydrogen()->right()->CheckFlag(HInstruction::kUint32);
2283 Condition cond = TokenToCondition(instr->op(), is_unsigned); 2285 Condition cond = TokenToCondition(instr->op(), is_unsigned);
2284 2286
2285 if (left->IsConstantOperand() && right->IsConstantOperand()) { 2287 if (left->IsConstantOperand() && right->IsConstantOperand()) {
2286 // We can statically evaluate the comparison. 2288 // We can statically evaluate the comparison.
2287 double left_val = ToDouble(LConstantOperand::cast(left)); 2289 double left_val = ToDouble(LConstantOperand::cast(left));
2288 double right_val = ToDouble(LConstantOperand::cast(right)); 2290 double right_val = ToDouble(LConstantOperand::cast(right));
2289 int next_block = EvalComparison(instr->op(), left_val, right_val) ? 2291 int next_block = EvalComparison(instr->op(), left_val, right_val) ?
2290 instr->TrueDestination(chunk_) : instr->FalseDestination(chunk_); 2292 instr->TrueDestination(chunk_) : instr->FalseDestination(chunk_);
2291 EmitGoto(next_block); 2293 EmitGoto(next_block);
2292 } else { 2294 } else {
(...skipping 3592 matching lines...) Expand 10 before | Expand all | Expand 10 after
5885 __ li(at, scope_info); 5887 __ li(at, scope_info);
5886 __ Push(at, ToRegister(instr->function())); 5888 __ Push(at, ToRegister(instr->function()));
5887 CallRuntime(Runtime::kHiddenPushBlockContext, 2, instr); 5889 CallRuntime(Runtime::kHiddenPushBlockContext, 2, instr);
5888 RecordSafepoint(Safepoint::kNoLazyDeopt); 5890 RecordSafepoint(Safepoint::kNoLazyDeopt);
5889 } 5891 }
5890 5892
5891 5893
5892 #undef __ 5894 #undef __
5893 5895
5894 } } // namespace v8::internal 5896 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/ia32/lithium-codegen-ia32.cc ('k') | src/x64/lithium-codegen-x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698