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

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

Issue 77053003: Remove the first_right_arg hack for HMod. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years, 1 month 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/x64/lithium-codegen-x64.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 1451 matching lines...) Expand 10 before | Expand all | Expand 10 after
1462 if (instr->HasPowerOf2Divisor()) { 1462 if (instr->HasPowerOf2Divisor()) {
1463 ASSERT(!right->CanBeZero()); 1463 ASSERT(!right->CanBeZero());
1464 LModI* mod = new(zone()) LModI(UseRegisterAtStart(left), 1464 LModI* mod = new(zone()) LModI(UseRegisterAtStart(left),
1465 UseOrConstant(right), 1465 UseOrConstant(right),
1466 NULL); 1466 NULL);
1467 LInstruction* result = DefineSameAsFirst(mod); 1467 LInstruction* result = DefineSameAsFirst(mod);
1468 return (left->CanBeNegative() && 1468 return (left->CanBeNegative() &&
1469 instr->CheckFlag(HValue::kBailoutOnMinusZero)) 1469 instr->CheckFlag(HValue::kBailoutOnMinusZero))
1470 ? AssignEnvironment(result) 1470 ? AssignEnvironment(result)
1471 : result; 1471 : result;
1472 } else if (instr->fixed_right_arg().has_value) {
1473 LModI* mod = new(zone()) LModI(UseRegister(left),
1474 UseRegisterAtStart(right),
1475 NULL);
1476 return AssignEnvironment(DefineSameAsFirst(mod));
1477 } else { 1472 } else {
1478 // The temporary operand is necessary to ensure that right is not 1473 // The temporary operand is necessary to ensure that right is not
1479 // allocated into edx. 1474 // allocated into edx.
1480 LModI* mod = new(zone()) LModI(UseFixed(left, rax), 1475 LModI* mod = new(zone()) LModI(UseFixed(left, rax),
1481 UseRegister(right), 1476 UseRegister(right),
1482 FixedTemp(rdx)); 1477 FixedTemp(rdx));
1483 LInstruction* result = DefineFixed(mod, rdx); 1478 LInstruction* result = DefineFixed(mod, rdx);
1484 return (right->CanBeZero() || 1479 return (right->CanBeZero() ||
1485 (left->RangeCanInclude(kMinInt) && 1480 (left->RangeCanInclude(kMinInt) &&
1486 right->RangeCanInclude(-1) && 1481 right->RangeCanInclude(-1) &&
(...skipping 1139 matching lines...) Expand 10 before | Expand all | Expand 10 after
2626 LInstruction* LChunkBuilder::DoLoadFieldByIndex(HLoadFieldByIndex* instr) { 2621 LInstruction* LChunkBuilder::DoLoadFieldByIndex(HLoadFieldByIndex* instr) {
2627 LOperand* object = UseRegister(instr->object()); 2622 LOperand* object = UseRegister(instr->object());
2628 LOperand* index = UseTempRegister(instr->index()); 2623 LOperand* index = UseTempRegister(instr->index());
2629 return DefineSameAsFirst(new(zone()) LLoadFieldByIndex(object, index)); 2624 return DefineSameAsFirst(new(zone()) LLoadFieldByIndex(object, index));
2630 } 2625 }
2631 2626
2632 2627
2633 } } // namespace v8::internal 2628 } } // namespace v8::internal
2634 2629
2635 #endif // V8_TARGET_ARCH_X64 2630 #endif // V8_TARGET_ARCH_X64
OLDNEW
« no previous file with comments | « src/x64/lithium-codegen-x64.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698