aboutsummaryrefslogtreecommitdiff
path: root/src/codegen.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/codegen.c')
-rw-r--r--src/codegen.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/codegen.c b/src/codegen.c
index ff16b73..a744f31 100644
--- a/src/codegen.c
+++ b/src/codegen.c
@@ -216,7 +216,9 @@ codegentypedexpr(struct cgctx ctx, idx_t i, type_t type, LLVMValueRef *outv)
return ni;
}
case ASTBINADD:
+ case ASTBINAND:
case ASTBINDIV:
+ case ASTBINIOR:
case ASTBINMOD:
case ASTBINMUL:
case ASTBINSHL:
@@ -230,7 +232,9 @@ codegentypedexpr(struct cgctx ctx, idx_t i, type_t type, LLVMValueRef *outv)
const char *name;
} binoptbl[UINT8_MAX + 1] = {
['+'] = {{LLVMBuildAdd, LLVMBuildAdd}, "add"},
+ ['&'] = {{LLVMBuildAnd, LLVMBuildAnd}, "and"},
['*'] = {{LLVMBuildMul, LLVMBuildMul}, "mul"},
+ ['|'] = {{LLVMBuildOr, LLVMBuildOr}, "ior"},
['-'] = {{LLVMBuildSub, LLVMBuildSub}, "sub"},
['/'] = {{LLVMBuildUDiv, LLVMBuildSDiv}, "div"},
['%'] = {{LLVMBuildURem, LLVMBuildSRem}, "rem"},