mirror of
https://github.com/odin-lang/Odin.git
synced 2026-04-21 05:45:19 +00:00
Change MAX_STORE_SIZE
This commit is contained in:
@@ -867,9 +867,9 @@ void lb_emit_store(lbProcedure *p, lbValue ptr, lbValue value) {
|
|||||||
GB_ASSERT_MSG(are_types_identical(ca, core_type(value.type)), "%s != %s", type_to_string(a), type_to_string(value.type));
|
GB_ASSERT_MSG(are_types_identical(ca, core_type(value.type)), "%s != %s", type_to_string(a), type_to_string(value.type));
|
||||||
}
|
}
|
||||||
|
|
||||||
enum {MAX_STORE_SIZE = 32};
|
enum {MAX_STORE_SIZE = 64};
|
||||||
|
|
||||||
if (LLVMIsALoadInst(value.value) && lb_sizeof(LLVMTypeOf(value.value)) > 32) {
|
if (LLVMIsALoadInst(value.value) && lb_sizeof(LLVMTypeOf(value.value)) > MAX_STORE_SIZE) {
|
||||||
LLVMValueRef dst_ptr = ptr.value;
|
LLVMValueRef dst_ptr = ptr.value;
|
||||||
LLVMValueRef src_ptr = LLVMGetOperand(value.value, 0);
|
LLVMValueRef src_ptr = LLVMGetOperand(value.value, 0);
|
||||||
src_ptr = LLVMBuildPointerCast(p->builder, src_ptr, LLVMTypeOf(dst_ptr), "");
|
src_ptr = LLVMBuildPointerCast(p->builder, src_ptr, LLVMTypeOf(dst_ptr), "");
|
||||||
|
|||||||
Reference in New Issue
Block a user