From c1026498d833e069a79d4ae47c23653cd6120e09 Mon Sep 17 00:00:00 2001 From: Ryan Myers Date: Wed, 29 Sep 2021 09:43:52 -0400 Subject: [PATCH] Proper fix for score.py and static functions. It will ignore them now --- lib/src/libc/ll.c | 21 +++++++++++---------- lib/src/libc/rmonPrintf.c | 3 ++- tools/python/score.py | 7 ++----- 3 files changed, 15 insertions(+), 16 deletions(-) diff --git a/lib/src/libc/ll.c b/lib/src/libc/ll.c index 84e06840..14be7eb1 100644 --- a/lib/src/libc/ll.c +++ b/lib/src/libc/ll.c @@ -4,15 +4,8 @@ #include "types.h" #include "macros.h" -GLOBAL_ASM("lib/asm/non_matchings/unknown_0CF330/__ull_rshift.s") -GLOBAL_ASM("lib/asm/non_matchings/unknown_0CF330/__ull_rem.s") -GLOBAL_ASM("lib/asm/non_matchings/unknown_0CF330/__ull_div.s") -GLOBAL_ASM("lib/asm/non_matchings/unknown_0CF330/__ll_lshift.s") -GLOBAL_ASM("lib/asm/non_matchings/unknown_0CF330/__ll_div.s") -GLOBAL_ASM("lib/asm/non_matchings/unknown_0CF330/__ll_mul.s") -GLOBAL_ASM("lib/asm/non_matchings/unknown_0CF330/__ull_divremi.s") - -/* +#ifdef NON_MATCHING +//Thse need to be compiled with -mips3, and linked differently unsigned long long __ull_rshift(unsigned long long a0, unsigned long long a1) { return a0 >> a1; @@ -66,4 +59,12 @@ long long __ll_rshift(long long a0, long long a1) { return a0 >> a1; } -*/ +#else +GLOBAL_ASM("lib/asm/non_matchings/unknown_0CF330/__ull_rshift.s") +GLOBAL_ASM("lib/asm/non_matchings/unknown_0CF330/__ull_rem.s") +GLOBAL_ASM("lib/asm/non_matchings/unknown_0CF330/__ull_div.s") +GLOBAL_ASM("lib/asm/non_matchings/unknown_0CF330/__ll_lshift.s") +GLOBAL_ASM("lib/asm/non_matchings/unknown_0CF330/__ll_div.s") +GLOBAL_ASM("lib/asm/non_matchings/unknown_0CF330/__ll_mul.s") +GLOBAL_ASM("lib/asm/non_matchings/unknown_0CF330/__ull_divremi.s") +#endif diff --git a/lib/src/libc/rmonPrintf.c b/lib/src/libc/rmonPrintf.c index fb49c982..0ef8a92b 100644 --- a/lib/src/libc/rmonPrintf.c +++ b/lib/src/libc/rmonPrintf.c @@ -16,7 +16,8 @@ static void *is_proutSyncPrintf(void *str, const char *buf, size_t n) { /** * Like sprintf, but simpler. It just hardcodes NULL for the dst, - * and calls a function that just hardcodes a fake pointer + * and calls a function that just hardcodes a fake pointer. + * Could still be an earlier version of osSyncPrintf */ void rmonPrintf(const char *format, ...) { s32 written; diff --git a/tools/python/score.py b/tools/python/score.py index 1b9a3026..c2cb6e70 100644 --- a/tools/python/score.py +++ b/tools/python/score.py @@ -30,7 +30,7 @@ for folder in ASM_FOLDERS: BUILD_DIRECTORY = './build/us_1.0' SRC_DIRECTORY = './src' LIB_SRC_DIRECTORY = './lib/src' -FUNCTION_REGEX = r'(?:(\/[*][*!][*]*\n(?:[^/]*\n)+?\s*[*]\/\n)(?:\s*)*?)?(void|s64|s32|s16|s8|u64|u32|u16|u8|f32|f64)(?:\s|[*])*?([0-9A-Za-z_]+)\s*[(][^)]*[)]\s*{' +FUNCTION_REGEX = r'(?