Better support for conversions between number types.

This commit is contained in:
2020-01-10 09:04:47 -10:00
parent 8c5f18cb7c
commit 4b8d0b3f09
14 changed files with 96 additions and 35 deletions

View File

@@ -28,8 +28,8 @@ binaryOps = File {
testCase = Just generateTests
}
declareBinaryOperators :: Word -> SourceFile Span
declareBinaryOperators bitsize =
declareBinaryOperators :: Word -> [Word] -> SourceFile Span
declareBinaryOperators bitsize _ =
let struct_name = mkIdent ("U" ++ show bitsize)
entries = bitsize `div` 64
andOps = generateBinOps "BitAnd" struct_name "bitand" BitAndOp entries