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

Unified Diff: src/arm/lithium-arm.cc

Issue 6164005: ARM: Implement DoDivI in the lithium code generator. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge/benchmarks
Patch Set: Adressed comments Created 9 years, 11 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | src/arm/lithium-codegen-arm.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/arm/lithium-arm.cc
diff --git a/src/arm/lithium-arm.cc b/src/arm/lithium-arm.cc
index 6e6f1fa1e13b95d82b1547824de6cb54cf7f4158..d63024a3b315182e900d224302f9b2b76d10b41b 100644
--- a/src/arm/lithium-arm.cc
+++ b/src/arm/lithium-arm.cc
@@ -1237,12 +1237,15 @@ LInstruction* LChunkBuilder::DoDiv(HDiv* instr) {
if (instr->representation().IsDouble()) {
return DoArithmeticD(Token::DIV, instr);
} else if (instr->representation().IsInteger32()) {
- // The temporary operand is necessary to ensure that right is not allocated
- // into edx.
- FixedTemp(r1);
+ // TODO(1042) The fixed register allocation
+ // is needed because we call GenericBinaryOpStub from
+ // the generated code, which requires registers r0
+ // and r1 to be used. We should remove that
+ // when we provide a native implementation.
LOperand* value = UseFixed(instr->left(), r0);
- LOperand* divisor = UseRegister(instr->right());
- return AssignEnvironment(DefineFixed(new LDivI(value, divisor), r0));
+ LOperand* divisor = UseFixed(instr->right(), r1);
+ return AssignEnvironment(AssignPointerMap(
+ DefineFixed(new LDivI(value, divisor), r0)));
} else {
return DoArithmeticT(Token::DIV, instr);
}
« no previous file with comments | « no previous file | src/arm/lithium-codegen-arm.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698