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

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

Issue 1947263006: Version 5.1.281.30 (cherry-pick) (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@5.1
Patch Set: Created 4 years, 7 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 | « include/v8-version.h ('k') | src/crankshaft/s390/lithium-codegen-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 9ede84d4e2b039c74d3d13c6d37ab56488dada0e..7439008d8913b5c458355c92f0a7143577c3c182 100644
--- a/src/compiler/s390/code-generator-s390.cc
+++ b/src/compiler/s390/code-generator-s390.cc
@@ -813,7 +813,8 @@ void CodeGenerator::AssembleArchInstruction(Instruction* instr) {
break;
case kS390_ShiftLeft32:
if (HasRegisterInput(instr, 1)) {
- if (i.OutputRegister().is(i.InputRegister(1))) {
+ if (i.OutputRegister().is(i.InputRegister(1)) &&
+ !CpuFeatures::IsSupported(DISTINCT_OPS)) {
__ LoadRR(kScratchReg, i.InputRegister(1));
__ ShiftLeft(i.OutputRegister(), i.InputRegister(0), kScratchReg);
} else {
@@ -822,9 +823,7 @@ void CodeGenerator::AssembleArchInstruction(Instruction* instr) {
} else {
ASSEMBLE_BINOP(ShiftLeft, ShiftLeft);
}
-#if V8_TARGET_ARCH_S390X
- __ lgfr(i.OutputRegister(0), i.OutputRegister(0));
-#endif
+ __ LoadlW(i.OutputRegister(0), i.OutputRegister(0));
break;
#if V8_TARGET_ARCH_S390X
case kS390_ShiftLeft64:
@@ -833,7 +832,8 @@ void CodeGenerator::AssembleArchInstruction(Instruction* instr) {
#endif
case kS390_ShiftRight32:
if (HasRegisterInput(instr, 1)) {
- if (i.OutputRegister().is(i.InputRegister(1))) {
+ if (i.OutputRegister().is(i.InputRegister(1)) &&
+ !CpuFeatures::IsSupported(DISTINCT_OPS)) {
__ LoadRR(kScratchReg, i.InputRegister(1));
__ ShiftRight(i.OutputRegister(), i.InputRegister(0), kScratchReg);
} else {
@@ -842,9 +842,7 @@ void CodeGenerator::AssembleArchInstruction(Instruction* instr) {
} else {
ASSEMBLE_BINOP(ShiftRight, ShiftRight);
}
-#if V8_TARGET_ARCH_S390X
- __ lgfr(i.OutputRegister(0), i.OutputRegister(0));
-#endif
+ __ LoadlW(i.OutputRegister(0), i.OutputRegister(0));
break;
#if V8_TARGET_ARCH_S390X
case kS390_ShiftRight64:
@@ -853,7 +851,8 @@ void CodeGenerator::AssembleArchInstruction(Instruction* instr) {
#endif
case kS390_ShiftRightArith32:
if (HasRegisterInput(instr, 1)) {
- if (i.OutputRegister().is(i.InputRegister(1))) {
+ if (i.OutputRegister().is(i.InputRegister(1)) &&
+ !CpuFeatures::IsSupported(DISTINCT_OPS)) {
__ LoadRR(kScratchReg, i.InputRegister(1));
__ ShiftRightArith(i.OutputRegister(), i.InputRegister(0),
kScratchReg);
@@ -863,6 +862,7 @@ void CodeGenerator::AssembleArchInstruction(Instruction* instr) {
} else {
ASSEMBLE_BINOP(ShiftRightArith, ShiftRightArith);
}
+ __ LoadlW(i.OutputRegister(), i.OutputRegister());
break;
#if V8_TARGET_ARCH_S390X
case kS390_ShiftRightArith64:
@@ -1098,12 +1098,12 @@ void CodeGenerator::AssembleArchInstruction(Instruction* instr) {
case kS390_MulHigh32:
__ LoadRR(r1, i.InputRegister(0));
__ mr_z(r0, i.InputRegister(1));
- __ LoadRR(i.OutputRegister(), r0);
+ __ LoadW(i.OutputRegister(), r0);
break;
case kS390_MulHighU32:
__ LoadRR(r1, i.InputRegister(0));
__ mlr(r0, i.InputRegister(1));
- __ LoadRR(i.OutputRegister(), r0);
+ __ LoadlW(i.OutputRegister(), r0);
break;
case kS390_MulFloat:
// Ensure we don't clobber right
@@ -1136,7 +1136,8 @@ void CodeGenerator::AssembleArchInstruction(Instruction* instr) {
__ LoadRR(r0, i.InputRegister(0));
__ srda(r0, Operand(32));
__ dr(r0, i.InputRegister(1));
- __ ltr(i.OutputRegister(), r1);
+ __ LoadAndTestP_ExtendSrc(i.OutputRegister(),
+ r1); // Copy R1: Quotient to output
break;
#if V8_TARGET_ARCH_S390X
case kS390_DivU64:
@@ -1150,7 +1151,8 @@ void CodeGenerator::AssembleArchInstruction(Instruction* instr) {
__ LoadRR(r0, i.InputRegister(0));
__ srdl(r0, Operand(32));
__ dlr(r0, i.InputRegister(1)); // R0:R1: Dividend
- __ ltr(i.OutputRegister(), r1); // Copy R1: Quotient to output
+ __ LoadlW(i.OutputRegister(), r1); // Copy R1: Quotient to output
+ __ LoadAndTestP_ExtendSrc(r1, r1);
break;
case kS390_DivFloat:
@@ -1292,11 +1294,7 @@ void CodeGenerator::AssembleArchInstruction(Instruction* instr) {
} else {
__ AndP(r0, i.InputRegister(0), i.InputImmediate(1));
}
-#if V8_TARGET_ARCH_S390X
- // TODO(john.yan): use ltgfr here.
- __ lgfr(r0, r0);
- __ LoadAndTestP(r0, r0);
-#endif
+ __ LoadAndTestP_ExtendSrc(r0, r0);
break;
#if V8_TARGET_ARCH_S390X
case kS390_Tst64:
« no previous file with comments | « include/v8-version.h ('k') | src/crankshaft/s390/lithium-codegen-s390.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698