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

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

Issue 18359004: MIPS: Refactoring and cleanup of control instructions. (Closed) Base URL: https://github.com/v8/v8.git@gbl
Patch Set: Created 7 years, 5 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 | src/mips/lithium-mips.h » ('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. 1 // Copyright 2012 the V8 project authors. All rights reserved.
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 2184 matching lines...) Expand 10 before | Expand all | Expand 10 after
2195 break; 2195 break;
2196 case Token::IN: 2196 case Token::IN:
2197 case Token::INSTANCEOF: 2197 case Token::INSTANCEOF:
2198 default: 2198 default:
2199 UNREACHABLE(); 2199 UNREACHABLE();
2200 } 2200 }
2201 return cond; 2201 return cond;
2202 } 2202 }
2203 2203
2204 2204
2205 void LCodeGen::DoCmpIDAndBranch(LCmpIDAndBranch* instr) { 2205 void LCodeGen::DoCompareNumericAndBranch(LCompareNumericAndBranch* instr) {
2206 LOperand* left = instr->left(); 2206 LOperand* left = instr->left();
2207 LOperand* right = instr->right(); 2207 LOperand* right = instr->right();
2208 Condition cond = TokenToCondition(instr->op(), false); 2208 Condition cond = TokenToCondition(instr->op(), false);
2209 2209
2210 if (left->IsConstantOperand() && right->IsConstantOperand()) { 2210 if (left->IsConstantOperand() && right->IsConstantOperand()) {
2211 // We can statically evaluate the comparison. 2211 // We can statically evaluate the comparison.
2212 double left_val = ToDouble(LConstantOperand::cast(left)); 2212 double left_val = ToDouble(LConstantOperand::cast(left));
2213 double right_val = ToDouble(LConstantOperand::cast(right)); 2213 double right_val = ToDouble(LConstantOperand::cast(right));
2214 int next_block = EvalComparison(instr->op(), left_val, right_val) ? 2214 int next_block = EvalComparison(instr->op(), left_val, right_val) ?
2215 instr->TrueDestination(chunk_) : instr->FalseDestination(chunk_); 2215 instr->TrueDestination(chunk_) : instr->FalseDestination(chunk_);
(...skipping 3705 matching lines...) Expand 10 before | Expand all | Expand 10 after
5921 __ Subu(scratch, result, scratch); 5921 __ Subu(scratch, result, scratch);
5922 __ lw(result, FieldMemOperand(scratch, 5922 __ lw(result, FieldMemOperand(scratch,
5923 FixedArray::kHeaderSize - kPointerSize)); 5923 FixedArray::kHeaderSize - kPointerSize));
5924 __ bind(&done); 5924 __ bind(&done);
5925 } 5925 }
5926 5926
5927 5927
5928 #undef __ 5928 #undef __
5929 5929
5930 } } // namespace v8::internal 5930 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « no previous file | src/mips/lithium-mips.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698