Permalink
Browse files

Zero-extend value passed to _image

  • Loading branch information...
1 parent 277981b commit dbb735c8be397ef6fb1f2869ec5f716a5189a051 @nickg committed Apr 11, 2012
Showing with 1 addition and 1 deletion.
  1. +1 −1 src/cgen.c
View
2 src/cgen.c
@@ -1000,7 +1000,7 @@ static LLVMValueRef cgen_fcall(tree_t t, struct cgen_ctx *ctx)
LLVMIntNE, ctx);
else if (icmp(builtin, "image")) {
LLVMValueRef iargs[] = {
- LLVMBuildIntCast(builder, args[0], LLVMInt64Type(), ""),
+ LLVMBuildZExtOrBitCast(builder, args[0], LLVMInt64Type(), ""),
llvm_int32(tree_index(tree_param(t, 0).value)),
LLVMBuildPointerCast(builder, mod_name,
LLVMPointerType(LLVMInt8Type(), 0), "")

0 comments on commit dbb735c

Please sign in to comment.