on master help sign in
Insert U, UL, and ULL suffixes in C
ae117aaDavid Raymond Christiansen
src/IRTS/CodegenC.hs+4−4
@@ -132,10 +132,10 @@ bcc i (ASSIGNCONST l c)
132 mkConst (Fl f) = "MKFLOAT(vm, " ++ show f ++ ")"
132 mkConst (Fl f) = "MKFLOAT(vm, " ++ show f ++ ")"
133 mkConst (Ch c) = "MKINT(" ++ show (fromEnum c) ++ ")"
133 mkConst (Ch c) = "MKINT(" ++ show (fromEnum c) ++ ")"
134 mkConst (Str s) = "MKSTR(vm, " ++ showCStr s ++ ")"
134 mkConst (Str s) = "MKSTR(vm, " ++ showCStr s ++ ")"
135− mkConst (B8 x) = "idris_b8const(vm, " ++ show x ++ ")"
135+ mkConst (B8 x) = "idris_b8const(vm, " ++ show x ++ "U)"
136− mkConst (B16 x) = "idris_b16const(vm, " ++ show x ++ ")"
136+ mkConst (B16 x) = "idris_b16const(vm, " ++ show x ++ "U)"
137− mkConst (B32 x) = "idris_b32const(vm, " ++ show x ++ ")"
137+ mkConst (B32 x) = "idris_b32const(vm, " ++ show x ++ "UL)"
138− mkConst (B64 x) = "idris_b64const(vm, " ++ show x ++ ")"
138+ mkConst (B64 x) = "idris_b64const(vm, " ++ show x ++ "ULL)"
139 mkConst _ = "MKINT(42424242)"
139 mkConst _ = "MKINT(42424242)"
140bcc i (UPDATE l r) = indent i ++ creg l ++ " = " ++ creg r ++ ";\n"
140bcc i (UPDATE l r) = indent i ++ creg l ++ " = " ++ creg r ++ ";\n"
141bcc i (MKCON l tag args)
141bcc i (MKCON l tag args)