We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 41c9dce commit ed6c355Copy full SHA for ed6c355
riscvmodel/types.py
@@ -236,6 +236,11 @@ def __rshift__(self, other):
236
raise TypeError("unsupported operand type for Register >>: {}".format(other.__class__))
237
return new
238
239
+ def __invert__(self):
240
+ new = Register(self.bits)
241
+ new.set(self.value ^ self.mask)
242
+ return new
243
+
244
245
class RegisterFile(object):
246
def __init__(self, num: int, bits: int, immutable: list = {}):
0 commit comments