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

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

Issue 288383002: Allow comparison in UINT32 mode. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 7 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 2259 matching lines...) Expand 10 before | Expand all | Expand 10 after
2270 default: 2270 default:
2271 UNREACHABLE(); 2271 UNREACHABLE();
2272 } 2272 }
2273 return cond; 2273 return cond;
2274 } 2274 }
2275 2275
2276 2276
2277 void LCodeGen::DoCompareNumericAndBranch(LCompareNumericAndBranch* instr) { 2277 void LCodeGen::DoCompareNumericAndBranch(LCompareNumericAndBranch* instr) {
2278 LOperand* left = instr->left(); 2278 LOperand* left = instr->left();
2279 LOperand* right = instr->right(); 2279 LOperand* right = instr->right();
2280 Condition cond = TokenToCondition(instr->op(), false); 2280 bool is_unsigned = instr->hydrogen()->CheckFlag(HInstruction::kUint32);
2281 Condition cc = TokenToCondition(instr->op(), is_unsigned);
2281 2282
2282 if (left->IsConstantOperand() && right->IsConstantOperand()) { 2283 if (left->IsConstantOperand() && right->IsConstantOperand()) {
2283 // We can statically evaluate the comparison. 2284 // We can statically evaluate the comparison.
2284 double left_val = ToDouble(LConstantOperand::cast(left)); 2285 double left_val = ToDouble(LConstantOperand::cast(left));
2285 double right_val = ToDouble(LConstantOperand::cast(right)); 2286 double right_val = ToDouble(LConstantOperand::cast(right));
2286 int next_block = EvalComparison(instr->op(), left_val, right_val) ? 2287 int next_block = EvalComparison(instr->op(), left_val, right_val) ?
2287 instr->TrueDestination(chunk_) : instr->FalseDestination(chunk_); 2288 instr->TrueDestination(chunk_) : instr->FalseDestination(chunk_);
2288 EmitGoto(next_block); 2289 EmitGoto(next_block);
2289 } else { 2290 } else {
2290 if (instr->is_double()) { 2291 if (instr->is_double()) {
(...skipping 3632 matching lines...) Expand 10 before | Expand all | Expand 10 after
5923 __ lw(result, FieldMemOperand(scratch, 5924 __ lw(result, FieldMemOperand(scratch,
5924 FixedArray::kHeaderSize - kPointerSize)); 5925 FixedArray::kHeaderSize - kPointerSize));
5925 __ bind(deferred->exit()); 5926 __ bind(deferred->exit());
5926 __ bind(&done); 5927 __ bind(&done);
5927 } 5928 }
5928 5929
5929 5930
5930 #undef __ 5931 #undef __
5931 5932
5932 } } // namespace v8::internal 5933 } } // 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