Fix implementation of BYTE

This commit is contained in:
chriseth
2021-08-09 19:14:14 +02:00
parent a356059461
commit f6789de9f8
2 changed files with 23 additions and 1 deletions
+18
View File
@@ -0,0 +1,18 @@
from rule import Rule
from opcodes import *
"""
byte(A, X) -> 0
given A >= WordSize / 8
"""
rule = Rule()
n_bits = 256
# Input vars
X = BitVec('X', n_bits)
A = BitVec('A', n_bits)
rule.require(A >= n_bits / 8)
rule.check(BYTE(A, X), 0)