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

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

Issue 296453003: MIPS: Allow comparison in UINT32 mode. (Closed) Base URL: https://github.com/v8/v8.git@gbl
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
« no previous file with comments | « no previous file | no next file » | 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 2253 matching lines...) Expand 10 before | Expand all | Expand 10 after
2264 UNREACHABLE(); 2264 UNREACHABLE();
2265 } 2265 }
2266 return cond; 2266 return cond;
2267 } 2267 }
2268 2268
2269 2269
2270 void LCodeGen::DoCompareNumericAndBranch(LCompareNumericAndBranch* instr) { 2270 void LCodeGen::DoCompareNumericAndBranch(LCompareNumericAndBranch* instr) {
2271 LOperand* left = instr->left(); 2271 LOperand* left = instr->left();
2272 LOperand* right = instr->right(); 2272 LOperand* right = instr->right();
2273 bool is_unsigned = instr->hydrogen()->CheckFlag(HInstruction::kUint32); 2273 bool is_unsigned = instr->hydrogen()->CheckFlag(HInstruction::kUint32);
2274 Condition cc = TokenToCondition(instr->op(), is_unsigned); 2274 Condition cond = TokenToCondition(instr->op(), is_unsigned);
2275 2275
2276 if (left->IsConstantOperand() && right->IsConstantOperand()) { 2276 if (left->IsConstantOperand() && right->IsConstantOperand()) {
2277 // We can statically evaluate the comparison. 2277 // We can statically evaluate the comparison.
2278 double left_val = ToDouble(LConstantOperand::cast(left)); 2278 double left_val = ToDouble(LConstantOperand::cast(left));
2279 double right_val = ToDouble(LConstantOperand::cast(right)); 2279 double right_val = ToDouble(LConstantOperand::cast(right));
2280 int next_block = EvalComparison(instr->op(), left_val, right_val) ? 2280 int next_block = EvalComparison(instr->op(), left_val, right_val) ?
2281 instr->TrueDestination(chunk_) : instr->FalseDestination(chunk_); 2281 instr->TrueDestination(chunk_) : instr->FalseDestination(chunk_);
2282 EmitGoto(next_block); 2282 EmitGoto(next_block);
2283 } else { 2283 } else {
2284 if (instr->is_double()) { 2284 if (instr->is_double()) {
(...skipping 3632 matching lines...) Expand 10 before | Expand all | Expand 10 after
5917 __ lw(result, FieldMemOperand(scratch, 5917 __ lw(result, FieldMemOperand(scratch,
5918 FixedArray::kHeaderSize - kPointerSize)); 5918 FixedArray::kHeaderSize - kPointerSize));
5919 __ bind(deferred->exit()); 5919 __ bind(deferred->exit());
5920 __ bind(&done); 5920 __ bind(&done);
5921 } 5921 }
5922 5922
5923 5923
5924 #undef __ 5924 #undef __
5925 5925
5926 } } // namespace v8::internal 5926 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698