def le(a, b):
return SelectableInt((a <= b), bits=1)
+
+def length(a):
+ return len(a)
+
# For these tests I tried to find power instructions that would let me
# isolate each of these helper operations. So for instance, when I was
# testing the MASK() function, I chose rlwinm and rldicl because if I
+++ /dev/null
---- sprset.py.orig 2020-05-06 14:15:08.236887767 -0400
-+++ sprset.py 2020-05-06 14:15:51.757083567 -0400
-@@ -15,11 +15,11 @@
- if n in [13]:
- see(Book_III_p974)
- elif n in [808, 809, 810, 811]:
-- if eq(length(SPR(n)), 64):
-+ if eq(len(SPR(n)), 64):
- SPR[n] = RS
- else:
- SPR[n] = RS[32:64]
-- elif eq(length(SPR(n)), 64):
-+ elif eq(len(SPR(n)), 64):
- SPR[n] = RS
- else:
- SPR[n] = RS[32:64]
from soc.decoder.isa.caller import inject, instruction_info
from soc.decoder.helpers import (EXTS, EXTS64, EXTZ64, ROTL64, ROTL32, MASK,
- ne, eq, gt, ge, lt, le)
+ ne, eq, gt, ge, lt, le, length)
from soc.decoder.selectable_int import SelectableInt
from soc.decoder.selectable_int import selectconcat as concat
from soc.decoder.orderedset import OrderedSet