Skip to content
Snippets Groups Projects
Commit ebc36d2d authored by Frederik Hennig's avatar Frederik Hennig
Browse files

temporarily remove modulo_floor

parent df9b0a8e
No related branches found
No related tags found
No related merge requests found
Pipeline #64763 failed
...@@ -332,9 +332,8 @@ class FreezeExpressions: ...@@ -332,9 +332,8 @@ class FreezeExpressions:
return PsBitwiseOr(*args) return PsBitwiseOr(*args)
case integer_functions.int_power_of_2(): case integer_functions.int_power_of_2():
return PsLeftShift(PsExpression.make(PsConstant(1)), args[0]) return PsLeftShift(PsExpression.make(PsConstant(1)), args[0])
case integer_functions.modulo_floor():
return PsIntDiv(*args) * args[1]
# TODO: what exactly are the semantics? # TODO: what exactly are the semantics?
# case integer_functions.modulo_floor():
# case integer_functions.div_floor() # case integer_functions.div_floor()
# TODO: requires if *expression* # TODO: requires if *expression*
# case integer_functions.modulo_ceil(): # case integer_functions.modulo_ceil():
......
...@@ -132,7 +132,7 @@ def test_freeze_integer_functions(): ...@@ -132,7 +132,7 @@ def test_freeze_integer_functions():
asms = [ asms = [
Assignment(z, int_div(x, y)), Assignment(z, int_div(x, y)),
Assignment(z, int_power_of_2(x, y)), Assignment(z, int_power_of_2(x, y)),
Assignment(z, modulo_floor(x, y)), # Assignment(z, modulo_floor(x, y)),
] ]
fasms = [freeze(asm) for asm in asms] fasms = [freeze(asm) for asm in asms]
...@@ -140,7 +140,7 @@ def test_freeze_integer_functions(): ...@@ -140,7 +140,7 @@ def test_freeze_integer_functions():
should = [ should = [
PsDeclaration(z2, PsIntDiv(x2, y2)), PsDeclaration(z2, PsIntDiv(x2, y2)),
PsDeclaration(z2, PsLeftShift(PsExpression.make(PsConstant(1)), x2)), PsDeclaration(z2, PsLeftShift(PsExpression.make(PsConstant(1)), x2)),
PsDeclaration(z2, PsMul(PsIntDiv(x2, y2), y2)), # PsDeclaration(z2, PsMul(PsIntDiv(x2, y2), y2)),
] ]
for fasm, correct in zip(fasms, should): for fasm, correct in zip(fasms, should):
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment