Created
April 26, 2021 21:15
-
-
Save JohnnyonFlame/3d918d4bab6550a24357f22f0f298bd8 to your computer and use it in GitHub Desktop.
SSA ZExt/SExt flags calculator
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from itertools import product | |
def F(x): | |
# <zear> 0000.0xxx - Z && E | |
# <zear> 0000.1xxx - Z | |
# <pcercuei> 1111.0xxx - | |
# <pcercuei> 1111.1xxx - E | |
return ['ZE', 'Z ', ' ', ' E'][x] | |
bits = [0b00, 0b01, 0b10, 0b11] | |
for (Rs, Rt) in product(bits, repeat=2): | |
print(f"{F(Rs)} & {F(Rt)} = {F(Rs & Rt)[1] == 'E'}") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
or:
http://www.32x8.com/sop4_____A-B-C-D_____m_2-3-5-7-8-11-12-13-14-15___________option-0_____889788976078844592720