Some commits in the way of cleaning up the Rust and generating module lists.

This commit is contained in:
2019-10-31 16:37:16 -04:00
parent 3b0bd25dfa
commit c52dadcf22
11 changed files with 203 additions and 116 deletions

View File

@@ -15,7 +15,9 @@ binaryOps :: File
binaryOps = File {
predicate = \ _ _ -> True,
outputName = "binary",
generator = declareBinaryOperators
isUnsigned = True,
generator = declareBinaryOperators,
testCase = Nothing
}
declareBinaryOperators :: Word -> SourceFile Span
@@ -81,7 +83,7 @@ declareBinaryOperators bitsize =
}
fn or_associative(a: $$struct_name, b: $$struct_name, c: $$struct_name) -> bool {
((&a | &b) & &c) == (&a | (&b | &c))
((&a | &b) | &c) == (&a | (&b | &c))
}
fn or_commutative(a: $$struct_name, b: $$struct_name) -> bool {
(&a | &b) == (&b | &a)