From 1a3dc02a18a9050877288a5867e44d9c47a53542 Mon Sep 17 00:00:00 2001 From: Tom Harley Date: Sat, 11 Jan 2020 02:53:36 +0000 Subject: Added int width specifiers The width of an int can be specified at the site of its creation. For example, the following function returns an int of width 2 bits and value 1: [def two_bit_int [] (2 1)] Ints can still be written the old way; in these cases the compiler looks for a default int bit-width (specified with the -w flag). If a default has not been defined, the compiler throws an error. --- llvm_codegen.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'llvm_codegen.h') diff --git a/llvm_codegen.h b/llvm_codegen.h index 7c97223..70d116d 100644 --- a/llvm_codegen.h +++ b/llvm_codegen.h @@ -9,8 +9,11 @@ typedef enum { SMART_BOX } boxing_rule_t; -void llvm_codegen_prologue(char *filename, boxing_rule_t boxing_rule); +void llvm_codegen_prologue(char *filename, boxing_rule_t boxing_rule, uint + default_bit_width); + void llvm_codegen(sexpr *ast); + int llvm_codegen_epilogue(char *output_filename, format_t format); #endif /* LLVM_CODEGEN_H */ -- cgit v1.2.1