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

Unified Diff: src/compiler/s390/code-generator-s390.cc

Issue 1844563002: S390: Fix Div64 sequence + DLGR simulation (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 9 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/s390/simulator-s390.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/compiler/s390/code-generator-s390.cc
diff --git a/src/compiler/s390/code-generator-s390.cc b/src/compiler/s390/code-generator-s390.cc
index 22ec4e47fac5be057692c1387da29a5b6e737f42..699fcf9ee87ec1821c4c0b88f04037b61db43911 100644
--- a/src/compiler/s390/code-generator-s390.cc
+++ b/src/compiler/s390/code-generator-s390.cc
@@ -1107,6 +1107,10 @@ void CodeGenerator::AssembleArchInstruction(Instruction* instr) {
break;
#if V8_TARGET_ARCH_S390X
case kS390_Div64:
+ __ LoadRR(r1, i.InputRegister(0));
+ __ dsgr(r0, i.InputRegister(1)); // R1: Dividend
+ __ ltgr(i.OutputRegister(), r1); // Copy R1: Quotient to output
+ break;
#endif
case kS390_Div32:
__ LoadRR(r0, i.InputRegister(0));
@@ -1118,15 +1122,15 @@ void CodeGenerator::AssembleArchInstruction(Instruction* instr) {
case kS390_DivU64:
__ LoadRR(r1, i.InputRegister(0));
__ LoadImmP(r0, Operand::Zero());
- __ dlgr(r0, i.InputRegister(1)); // R0:R1 = R1 / divisor -
- __ ltgr(i.OutputRegister(), r1); // Copy remainder to output reg
+ __ dlgr(r0, i.InputRegister(1)); // R0:R1: Dividend
+ __ ltgr(i.OutputRegister(), r1); // Copy R1: Quotient to output
break;
#endif
case kS390_DivU32:
__ LoadRR(r0, i.InputRegister(0));
__ srdl(r0, Operand(32));
- __ dlr(r0, i.InputRegister(1)); // R0:R1 = R1 / divisor -
- __ ltr(i.OutputRegister(), r1); // Copy remainder to output reg
+ __ dlr(r0, i.InputRegister(1)); // R0:R1: Dividend
+ __ ltr(i.OutputRegister(), r1); // Copy R1: Quotient to output
break;
case kS390_DivFloat:
« no previous file with comments | « no previous file | src/s390/simulator-s390.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698