From: Jacob Lifshay Date: Thu, 11 Jul 2019 10:16:05 +0000 (-0700) Subject: delete dead code in fpbase.MultiShift.[lr]shift X-Git-Tag: ls180-24jan2020~854 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=e40545119e70cdb3307b8160a8ed4786bfb88f63;p=ieee754fpu.git delete dead code in fpbase.MultiShift.[lr]shift --- diff --git a/src/ieee754/fpcommon/fpbase.py b/src/ieee754/fpcommon/fpbase.py index 71b2d9ec..5e086fe1 100644 --- a/src/ieee754/fpcommon/fpbase.py +++ b/src/ieee754/fpcommon/fpbase.py @@ -44,20 +44,10 @@ class MultiShift: def lshift(self, op, s): res = op << s return res[:len(op)] - res = op - for i in range(self.smax): - zeros = [0] * (1 << i) - res = Mux(s & (1 << i), Cat(zeros, res[0:-(1 << i)]), res) - return res def rshift(self, op, s): res = op >> s return res[:len(op)] - res = op - for i in range(self.smax): - zeros = [0] * (1 << i) - res = Mux(s & (1 << i), Cat(res[(1 << i):], zeros), res) - return res class FPNumBaseRecord: