Chromium Code Reviews

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

Issue 1839813006: S390: Fix Mod64/ModU64 sequence (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.
Jump to:
View side-by-side diff with in-line comments
« no previous file with comments | « no previous file | src/s390/disasm-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 699fcf9ee87ec1821c4c0b88f04037b61db43911..2759c50dbdd649e2a85b132a4796385c9569a03a 100644
--- a/src/compiler/s390/code-generator-s390.cc
+++ b/src/compiler/s390/code-generator-s390.cc
@@ -1165,10 +1165,15 @@ void CodeGenerator::AssembleArchInstruction(Instruction* instr) {
break;
#if V8_TARGET_ARCH_S390X
case kS390_Mod64:
- ASSEMBLE_MODULO(dr, srda);
+ __ LoadRR(r1, i.InputRegister(0));
+ __ dsgr(r0, i.InputRegister(1)); // R1: Dividend
+ __ ltgr(i.OutputRegister(), r0); // Copy R0: Remainder to output
break;
case kS390_ModU64:
- ASSEMBLE_MODULO(dlr, srdl);
+ __ LoadRR(r1, i.InputRegister(0));
+ __ LoadImmP(r0, Operand::Zero());
+ __ dlgr(r0, i.InputRegister(1)); // R0:R1: Dividend
+ __ ltgr(i.OutputRegister(), r0); // Copy R0: Remainder to output
break;
#endif
case kS390_AbsFloat:
« no previous file with comments | « no previous file | src/s390/disasm-s390.cc » ('j') | no next file with comments »

Powered by Google App Engine