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

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

Issue 2431093004: PPC/s390: [wasm] Trim graph before scheduling. (Closed)
Patch Set: Created 4 years, 2 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 | « src/compiler/ppc/instruction-selector-ppc.cc ('k') | src/compiler/s390/instruction-selector-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 284c3fc6e35807ee9893ce92e9e5f2bde8228e30..0074f7b9943e3e86ec236652656a5e9f86caec72 100644
--- a/src/compiler/s390/code-generator-s390.cc
+++ b/src/compiler/s390/code-generator-s390.cc
@@ -1159,39 +1159,46 @@ CodeGenerator::CodeGenResult CodeGenerator::AssembleArchInstruction(
__ lr(i.OutputRegister(0), r1);
__ srag(i.OutputRegister(1), r1, Operand(32));
break;
- case kS390_ShiftLeftPair:
+ case kS390_ShiftLeftPair: {
+ Register second_output =
+ instr->OutputCount() >= 2 ? i.OutputRegister(1) : i.TempRegister(0);
if (instr->InputAt(2)->IsImmediate()) {
- __ ShiftLeftPair(i.OutputRegister(0), i.OutputRegister(1),
- i.InputRegister(0), i.InputRegister(1),
- i.InputInt32(2));
+ __ ShiftLeftPair(i.OutputRegister(0), second_output, i.InputRegister(0),
+ i.InputRegister(1), i.InputInt32(2));
} else {
- __ ShiftLeftPair(i.OutputRegister(0), i.OutputRegister(1),
- i.InputRegister(0), i.InputRegister(1), kScratchReg,
- i.InputRegister(2));
+ __ ShiftLeftPair(i.OutputRegister(0), second_output, i.InputRegister(0),
+ i.InputRegister(1), kScratchReg, i.InputRegister(2));
}
break;
- case kS390_ShiftRightPair:
+ }
+ case kS390_ShiftRightPair: {
+ Register second_output =
+ instr->OutputCount() >= 2 ? i.OutputRegister(1) : i.TempRegister(0);
if (instr->InputAt(2)->IsImmediate()) {
- __ ShiftRightPair(i.OutputRegister(0), i.OutputRegister(1),
+ __ ShiftRightPair(i.OutputRegister(0), second_output,
i.InputRegister(0), i.InputRegister(1),
i.InputInt32(2));
} else {
- __ ShiftRightPair(i.OutputRegister(0), i.OutputRegister(1),
+ __ ShiftRightPair(i.OutputRegister(0), second_output,
i.InputRegister(0), i.InputRegister(1), kScratchReg,
i.InputRegister(2));
}
break;
- case kS390_ShiftRightArithPair:
+ }
+ case kS390_ShiftRightArithPair: {
+ Register second_output =
+ instr->OutputCount() >= 2 ? i.OutputRegister(1) : i.TempRegister(0);
if (instr->InputAt(2)->IsImmediate()) {
- __ ShiftRightArithPair(i.OutputRegister(0), i.OutputRegister(1),
+ __ ShiftRightArithPair(i.OutputRegister(0), second_output,
i.InputRegister(0), i.InputRegister(1),
i.InputInt32(2));
} else {
- __ ShiftRightArithPair(i.OutputRegister(0), i.OutputRegister(1),
+ __ ShiftRightArithPair(i.OutputRegister(0), second_output,
i.InputRegister(0), i.InputRegister(1),
kScratchReg, i.InputRegister(2));
}
break;
+ }
#endif
case kS390_RotRight32:
if (HasRegisterInput(instr, 1)) {
« no previous file with comments | « src/compiler/ppc/instruction-selector-ppc.cc ('k') | src/compiler/s390/instruction-selector-s390.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698