projects
/
ieee754fpu.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
40b7dae
)
delete dead code in fpbase.MultiShift.[lr]shift
author
Jacob Lifshay
<programmerjake@gmail.com>
Thu, 11 Jul 2019 10:16:05 +0000
(
03:16
-0700)
committer
Jacob Lifshay
<programmerjake@gmail.com>
Thu, 11 Jul 2019 10:16:05 +0000
(
03:16
-0700)
src/ieee754/fpcommon/fpbase.py
patch
|
blob
|
history
diff --git
a/src/ieee754/fpcommon/fpbase.py
b/src/ieee754/fpcommon/fpbase.py
index 71b2d9ecc58c81684029ae1b9a2b97b5868f7eb6..5e086fe1b65344f22d7994a348388cb99341c00c 100644
(file)
--- 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: