From 3da900bf178eb45500dd774e6d22c99683e47d25 Mon Sep 17 00:00:00 2001 From: AlexPeshkoff Date: Mon, 19 Jun 2023 18:46:58 +0300 Subject: [PATCH] Fix for #7603: BIN_SHR on INT128 does not apply sign extension --- extern/ttmath/ttmathint.h | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/extern/ttmath/ttmathint.h b/extern/ttmath/ttmathint.h index 8ad0189f93..f9971bdee6 100644 --- a/extern/ttmath/ttmathint.h +++ b/extern/ttmath/ttmathint.h @@ -1797,6 +1797,24 @@ public: } + Int operator>>(int move) const + { + Int temp( *this ); + + temp.Rcr(move, UInt::IsTheHighestBitSet() ? 1 : 0); + + return temp; + } + + + UInt & operator>>=(int move) + { + UInt::Rcr(move, UInt::IsTheHighestBitSet() ? 1 : 0); + + return *this; + } + + /*! *