Closed sfinktah closed 3 years ago
I've added my own algo, it walks the actual mask and not the whole reigster masks every time:
self.registers = []
maskIndex = 1
v = self.usedRegistersMask
while (v):
if (v & maskIndex):
self.registers.append(RegisterMasks[maskIndex])
v ^= maskIndex
maskIndex <<= 1
If you liked my last PR, you may want this as well. It just adds the pretty names in a list named 'registers'.
'registers': ['RM_AX', 'RM_CX'],