variants which was easier than expected, whew
def bmask(mode, RA, RB=None, zero=False):
RT = RA if RB is not None and not zero else 0
mask = RB if RB is not None else 0xffffffffffffffff
+ RA = RA & mask
a1 = RA if mode&1 else ~RA
mode2 = (mode >> 1) & 0b11
if mode2 == 0:
RT = a1 ^ a2
return RT & mask
-SBF = 0b001110
+SBF = 0b01010
+SOF = 0b01001
+SIF = 0b10000 # 10011 also works no idea why yet
if __name__ == '__main__':
for SBF in range(32):
RT = sif(v3)
print(bin(v3), bin(v2), bin(RT))
v3 = 0b10010101 # vmsif.m v2, v3
- v2 = 0b00000000 # v2
+ v2 = 0b00000001 # v2
RT = sif(v3)
print(bin(v3), bin(v2), bin(RT))
v3 = 0b00000000 # vmsif.m v2, v3