From 3c612abe261c27528b02e582e6272998b792866f Mon Sep 17 00:00:00 2001 From: Christoffer Lerno Date: Wed, 30 Jun 2021 11:47:57 +0200 Subject: [PATCH] Add AARCH64 missing max size for return. Allow 1 character module names. --- src/compiler/target.c | 1 + src/utils/file_utils.c | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/compiler/target.c b/src/compiler/target.c index 24768dc32..608233806 100644 --- a/src/compiler/target.c +++ b/src/compiler/target.c @@ -1162,6 +1162,7 @@ void target_setup(BuildTarget *target) case ARCH_TYPE_ARM: case ARCH_TYPE_RISCV32: case ARCH_TYPE_RISCV64: + case ARCH_TYPE_AARCH64: platform_target.max_size_for_return = platform_target.width_pointer * 2 / 8; break; case ARCH_TYPE_PPC64: diff --git a/src/utils/file_utils.c b/src/utils/file_utils.c index 87a3203a5..ee93990ab 100644 --- a/src/utils/file_utils.c +++ b/src/utils/file_utils.c @@ -38,7 +38,7 @@ int filename_to_module(const char *path, char buffer[MAX_IDENTIFIER_LENGTH + 1]) if (path[i] == '.') last_dot = i; } int namelen = last_dot - last_slash - 1; - if (namelen < 2) return 0; + if (namelen < 1) return 0; if (namelen > MAX_IDENTIFIER_LENGTH) namelen = MAX_IDENTIFIER_LENGTH; for (int i = last_slash + 1; i < last_dot; i++) {