From 8b5a1e6c092a69a5d1217f8e16122ec16301dcdb Mon Sep 17 00:00:00 2001 From: Junliang Yan Date: Fri, 17 Aug 2018 12:13:45 -0400 Subject: [PATCH] deps: cherry-pick 9040405 from upstream V8 Original commit message: s390x: fix high 32-bit word corruption issue R=joransiu@ca.ibm.com Change-Id: I9a2cf0f3e4a33dc4b86c83acfefcd27968bbcdb4 Reviewed-on: https://chromium-review.googlesource.com/1176424 Reviewed-by: Joran Siu Commit-Queue: Junliang Yan Cr-Commit-Position: refs/heads/master@{#55143} Refs: v8/v8@ca95cd9 --- deps/v8/include/v8-version.h | 2 +- .../src/compiler/s390/instruction-selector-s390.cc | 12 ++++++------ deps/v8/src/s390/macro-assembler-s390.cc | 12 ++++++++++++ 3 files changed, 19 insertions(+), 7 deletions(-) diff --git a/deps/v8/include/v8-version.h b/deps/v8/include/v8-version.h index 0fcab08efa4b10..113e02667508ad 100644 --- a/deps/v8/include/v8-version.h +++ b/deps/v8/include/v8-version.h @@ -11,7 +11,7 @@ #define V8_MAJOR_VERSION 6 #define V8_MINOR_VERSION 2 #define V8_BUILD_NUMBER 414 -#define V8_PATCH_LEVEL 65 +#define V8_PATCH_LEVEL 66 // Use 1 for candidates and 0 otherwise. // (Boolean macro values are not supported by all preprocessors.) diff --git a/deps/v8/src/compiler/s390/instruction-selector-s390.cc b/deps/v8/src/compiler/s390/instruction-selector-s390.cc index 3ed0a34c720da6..793ec86b53cd9e 100644 --- a/deps/v8/src/compiler/s390/instruction-selector-s390.cc +++ b/deps/v8/src/compiler/s390/instruction-selector-s390.cc @@ -318,12 +318,12 @@ ArchOpcode SelectLoadOpcode(Node* node) { /* Float unary op*/ \ V(BitcastFloat32ToInt32) \ /* V(TruncateFloat64ToWord32) */ \ - /* V(RoundFloat64ToInt32) */ \ - /* V(TruncateFloat32ToInt32) */ \ - /* V(TruncateFloat32ToUint32) */ \ - /* V(TruncateFloat64ToUint32) */ \ - /* V(ChangeFloat64ToInt32) */ \ - /* V(ChangeFloat64ToUint32) */ \ + V(RoundFloat64ToInt32) \ + V(TruncateFloat32ToInt32) \ + V(TruncateFloat32ToUint32) \ + V(TruncateFloat64ToUint32) \ + V(ChangeFloat64ToInt32) \ + V(ChangeFloat64ToUint32) \ /* Word32 unary op */ \ V(Word32Clz) \ V(Word32Popcnt) \ diff --git a/deps/v8/src/s390/macro-assembler-s390.cc b/deps/v8/src/s390/macro-assembler-s390.cc index 931233b2d587bf..45331a6b991260 100644 --- a/deps/v8/src/s390/macro-assembler-s390.cc +++ b/deps/v8/src/s390/macro-assembler-s390.cc @@ -704,6 +704,9 @@ void TurboAssembler::ConvertDoubleToInt32(const Register dst, UNIMPLEMENTED(); break; } +#ifdef V8_TARGET_ARCH_S390X + lghi(dst, Operand::Zero()); +#endif cfdbr(m, dst, double_input); } @@ -728,6 +731,9 @@ void TurboAssembler::ConvertFloat32ToInt32(const Register result, UNIMPLEMENTED(); break; } +#ifdef V8_TARGET_ARCH_S390X + lghi(result, Operand::Zero()); +#endif cfebr(m, result, double_input); } @@ -752,6 +758,9 @@ void TurboAssembler::ConvertFloat32ToUnsignedInt32( UNIMPLEMENTED(); break; } +#ifdef V8_TARGET_ARCH_S390X + lghi(result, Operand::Zero()); +#endif clfebr(m, Condition(0), result, double_input); } @@ -824,6 +833,9 @@ void TurboAssembler::ConvertDoubleToUnsignedInt32( UNIMPLEMENTED(); break; } +#ifdef V8_TARGET_ARCH_S390X + lghi(dst, Operand::Zero()); +#endif clfdbr(m, Condition(0), dst, double_input); }