Commit 12633d91 authored by Raphael Rieu-Helft's avatar Raphael Rieu-Helft

Update C driver

parent ae988660
......@@ -39,6 +39,32 @@ module mach.int.Int32
syntax val (>) "%1 > %2"
end
module mach.int.UInt32Gen
syntax type uint32 "uint32_t"
syntax converter max_uint32 "0xffffffff"
syntax converter length "32"
end
module mach.int.UInt32
syntax converter of_int "%1U"
syntax val (+) "%1 + %2"
syntax val (-) "%1 - %2"
syntax val (*) "%1 * %2"
syntax val (/) "%1 / %2"
syntax val (%) "%1 % %2"
syntax val (=) "%1 == %2"
syntax val (<=) "%1 <= %2"
syntax val (<) "%1 < %2"
syntax val (>=) "%1 >= %2"
syntax val (>) "%1 > %2"
end
module mach.int.UInt32GMP
prelude
......@@ -119,17 +145,6 @@ struct __lsld32_result lsld32(uint32_t x, uint32_t cnt)
syntax converter of_int "%1U"
syntax type uint32 "uint32_t"
syntax converter max_uint32 "0xffffffff"
syntax converter length "32"
syntax val add_with_carry "add32_with_carry"
syntax val sub_with_borrow "sub32_with_borrow"
syntax val mul_double "mul32_double"
syntax val add3 "add32_3"
syntax val lsld "lsld32"
syntax val (+) "%1 + %2"
syntax val (-) "%1 - %2"
syntax val (*) "%1 * %2"
......@@ -141,6 +156,12 @@ struct __lsld32_result lsld32(uint32_t x, uint32_t cnt)
syntax val (>=) "%1 >= %2"
syntax val (>) "%1 > %2"
syntax val add_with_carry "add32_with_carry"
syntax val sub_with_borrow "sub32_with_borrow"
syntax val mul_double "mul32_double"
syntax val add3 "add32_3"
syntax val lsld "lsld32"
syntax val add_mod "%1 + %2"
syntax val sub_mod "%1 - %2"
syntax val mul_mod "%1 * %2"
......@@ -158,6 +179,33 @@ struct __lsld32_result lsld32(uint32_t x, uint32_t cnt)
syntax val of_int32 "(uint32_t)%1"
end
module mach.int.UInt64Gen
syntax type uint64 "uint64_t"
syntax converter max_uint64 "0xffffffffffffffff"
syntax converter length "64"
end
module mach.int.UInt64
syntax converter of_int "%1ULL"
syntax val (+) "%1 + %2"
syntax val (-) "%1 - %2"
syntax val (*) "%1 * %2"
syntax val (/) "%1 / %2"
syntax val (%) "%1 % %2"
syntax val (=) "%1 == %2"
syntax val (<=) "%1 <= %2"
syntax val (<) "%1 < %2"
syntax val (>=) "%1 >= %2"
syntax val (>) "%1 > %2"
end
module mach.int.UInt64GMP
......@@ -257,18 +305,6 @@ struct __lsld64_result lsld64(uint64_t x, uint64_t cnt)
syntax converter of_int "%1ULL"
syntax type uint64 "uint64_t"
syntax converter max_uint64 "0xffffffffffffffff"
syntax converter length "64"
syntax val add_with_carry "add64_with_carry"
syntax val sub_with_borrow "sub64_with_borrow"
syntax val mul_double "mul64_double"
syntax val div2by1 "div64_2by1"
syntax val add3 "add64_3"
syntax val lsld "lsld64"
syntax val (+) "%1 + %2"
syntax val (-) "%1 - %2"
syntax val (*) "%1 * %2"
......@@ -280,6 +316,13 @@ struct __lsld64_result lsld64(uint64_t x, uint64_t cnt)
syntax val (>=) "%1 >= %2"
syntax val (>) "%1 > %2"
syntax val add_with_carry "add64_with_carry"
syntax val sub_with_borrow "sub64_with_borrow"
syntax val mul_double "mul64_double"
syntax val div2by1 "div64_2by1"
syntax val add3 "add64_3"
syntax val lsld "lsld64"
syntax val add_mod "%1 + %2"
syntax val sub_mod "%1 - %2"
syntax val mul_mod "%1 * %2"
......@@ -293,7 +336,6 @@ struct __lsld64_result lsld64(uint64_t x, uint64_t cnt)
syntax val of_int32 "(uint64_t)%1"
end
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment