aboutsummaryrefslogtreecommitdiff
path: root/src/stage1/codegen.cpp
diff options
context:
space:
mode:
authorAndrew Kelley <andrew@ziglang.org>2021-05-06 12:50:34 -0400
committerGitHub <noreply@github.com>2021-05-06 12:50:34 -0400
commit530e67cb868fbd24900d48eee891efa1aa135096 (patch)
treeeb6c40f94b148d83143992cc3868af100c22af9c /src/stage1/codegen.cpp
parent96e593145dcdb53ca02f2a365abc68415c4302b6 (diff)
parentafbcb6209dbe6812679324aab564884085b8cf44 (diff)
downloadzig-530e67cb868fbd24900d48eee891efa1aa135096.tar.gz
zig-530e67cb868fbd24900d48eee891efa1aa135096.zip
Merge pull request #8683 from LemonBoy/thumblinux
Initial bringup for Linux/Thumb2
Diffstat (limited to 'src/stage1/codegen.cpp')
-rw-r--r--src/stage1/codegen.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/stage1/codegen.cpp b/src/stage1/codegen.cpp
index ede15e4394..015a64f68a 100644
--- a/src/stage1/codegen.cpp
+++ b/src/stage1/codegen.cpp
@@ -4880,6 +4880,9 @@ static LLVMValueRef ir_render_asm_gen(CodeGen *g, IrExecutableGen *executable, I
type_ref = get_llvm_type(g, wider_type);
value_ref = gen_widen_or_shorten(g, false, type, wider_type, value_ref);
}
+ } else if (handle_is_ptr(g, type)) {
+ ZigType *gen_type = get_pointer_to_type(g, type, true);
+ type_ref = get_llvm_type(g, gen_type);
}
param_types[param_index] = type_ref;
@@ -9296,7 +9299,6 @@ static void init(CodeGen *g) {
char *layout_str = LLVMCopyStringRepOfTargetData(g->target_data_ref);
LLVMSetDataLayout(g->module, layout_str);
-
assert(g->pointer_size_bytes == LLVMPointerSize(g->target_data_ref));
g->is_big_endian = (LLVMByteOrder(g->target_data_ref) == LLVMBigEndian);