From 001b48a5c61bf56ddf499f6a155b41bc1620e621 Mon Sep 17 00:00:00 2001 From: gingerBill Date: Mon, 5 Feb 2018 23:27:18 +0000 Subject: [PATCH] Change local variable alignment to 16 bytes for the time being --- src/ir.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/ir.cpp b/src/ir.cpp index fdb73926c..eb9ba8979 100644 --- a/src/ir.cpp +++ b/src/ir.cpp @@ -905,7 +905,9 @@ irValue *ir_instr_local(irProcedure *p, Entity *e, bool zero_initialized) { i->Local.entity = e; i->Local.type = make_type_pointer(p->module->allocator, e->type); i->Local.zero_initialized = zero_initialized; - i->Local.alignment = type_align_of(p->module->allocator, e->type); + // i->Local.alignment = type_align_of(p->module->allocator, e->type); + // TODO(bill): determine the correct alignment + i->Local.alignment = gb_max(16, type_align_of(p->module->allocator, e->type)); array_init(&i->Local.referrers, heap_allocator()); // TODO(bill): Replace heap allocator here ir_module_add_value(p->module, e, v); return v;