harec

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | README | LICENSE

commit c52c5f48e8937a8270326fa4aba85247bdcba1d8
parent 052ed3fd4642b0e6d2331307ad4d253a74509bae
Author: Drew DeVault <sir@cmpwn.com>
Date:   Sat, 10 Jul 2021 15:56:19 -0400

gen: set min size for memcpy to 128

Diffstat:
Msrc/gen.c | 4++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/gen.c b/src/gen.c @@ -42,7 +42,7 @@ gen_copy_array(struct gen_context *ctx, const struct type *atype = type_dealias(dest->type); assert(atype->storage == STORAGE_ARRAY); assert(atype->array.length != SIZE_UNDEFINED); - if (atype->array.length > 8) { + if (atype->size > 128) { gen_copy_memcpy(ctx, dest, src); return; } @@ -58,7 +58,7 @@ gen_copy_struct(struct gen_context *ctx, assert(dest->indirect); const struct type *stype = type_dealias(dest->type); assert(stype->storage == STORAGE_STRUCT); - if (stype->size > 32) { + if (stype->size > 128) { gen_copy_memcpy(ctx, dest, src); return; }