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

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

Issue 17552008: MIPS: Use AST's type field and merge types for unary, binary & compare ICs. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 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') | 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. 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 1422 matching lines...) Expand 10 before | Expand all | Expand 10 after
1433 ASSERT(right->representation().IsInteger32()); 1433 ASSERT(right->representation().IsInteger32());
1434 if (instr->HasPowerOf2Divisor()) { 1434 if (instr->HasPowerOf2Divisor()) {
1435 ASSERT(!right->CanBeZero()); 1435 ASSERT(!right->CanBeZero());
1436 LModI* mod = new(zone()) LModI(UseRegisterAtStart(left), 1436 LModI* mod = new(zone()) LModI(UseRegisterAtStart(left),
1437 UseOrConstant(right)); 1437 UseOrConstant(right));
1438 LInstruction* result = DefineAsRegister(mod); 1438 LInstruction* result = DefineAsRegister(mod);
1439 return (left->CanBeNegative() && 1439 return (left->CanBeNegative() &&
1440 instr->CheckFlag(HValue::kBailoutOnMinusZero)) 1440 instr->CheckFlag(HValue::kBailoutOnMinusZero))
1441 ? AssignEnvironment(result) 1441 ? AssignEnvironment(result)
1442 : result; 1442 : result;
1443 } else if (instr->fixed_right_arg().has_value) {
1444 LModI* mod = new(zone()) LModI(UseRegisterAtStart(left),
1445 UseRegisterAtStart(right));
1446 return AssignEnvironment(DefineAsRegister(mod));
1443 } else { 1447 } else {
1444 LModI* mod = new(zone()) LModI(UseRegister(left), 1448 LModI* mod = new(zone()) LModI(UseRegister(left),
1445 UseRegister(right), 1449 UseRegister(right),
1446 TempRegister(), 1450 TempRegister(),
1447 FixedTemp(f20), 1451 FixedTemp(f20),
1448 FixedTemp(f22)); 1452 FixedTemp(f22));
1449 LInstruction* result = DefineAsRegister(mod); 1453 LInstruction* result = DefineAsRegister(mod);
1450 return (right->CanBeZero() || 1454 return (right->CanBeZero() ||
1451 (left->RangeCanInclude(kMinInt) && 1455 (left->RangeCanInclude(kMinInt) &&
1452 right->RangeCanInclude(-1)) || 1456 right->RangeCanInclude(-1)) ||
(...skipping 1127 matching lines...) Expand 10 before | Expand all | Expand 10 after
2580 2584
2581 2585
2582 LInstruction* LChunkBuilder::DoLoadFieldByIndex(HLoadFieldByIndex* instr) { 2586 LInstruction* LChunkBuilder::DoLoadFieldByIndex(HLoadFieldByIndex* instr) {
2583 LOperand* object = UseRegister(instr->object()); 2587 LOperand* object = UseRegister(instr->object());
2584 LOperand* index = UseRegister(instr->index()); 2588 LOperand* index = UseRegister(instr->index());
2585 return DefineAsRegister(new(zone()) LLoadFieldByIndex(object, index)); 2589 return DefineAsRegister(new(zone()) LLoadFieldByIndex(object, index));
2586 } 2590 }
2587 2591
2588 2592
2589 } } // namespace v8::internal 2593 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/mips/lithium-codegen-mips.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698