From befb9b4a92a3a4932b6b6f4634a5c54f3eea3868 Mon Sep 17 00:00:00 2001 From: Andrea Mazzoleni Date: Thu, 16 Apr 2026 00:25:48 +0200 Subject: [PATCH] Fix RISC printf --- HISTORY | 13 +++++++++---- cmdline/speed.c | 11 ++++++----- 2 files changed, 15 insertions(+), 9 deletions(-) diff --git a/HISTORY b/HISTORY index 377263ab..796dd68b 100644 --- a/HISTORY +++ b/HISTORY @@ -4,10 +4,15 @@ SnapRAID HISTORY 14.3 2026/04 ============ * On ARM64 (AArch64), replaced the inline assembly implementation of - 128-bit multiplication with a uint128_t based version. - This avoids potential miscompilations observed with aggressive - compiler optimizations (e.g. -O2/-O3) on some toolchains (Apple - Silicon), while still generating optimal code on modern compilers. + 128-bit multiplication with a `__uint128_t`-based version. + This avoids potential miscompilations of the experimental MuseAir + hash observed with aggressive compiler optimizations (e.g. -O2/-O3) + on some toolchains (notably Apple Silicon), while still generating + optimal code on modern compilers. + * Fixed the speed computation of the undocumented -T option for the + recovery functions. The reported values are now comparable to those + of the generation functions. Note that the real speed is unchanged + from the previous version, only the way it is measured has changed. 14.2 2026/04 ============ diff --git a/cmdline/speed.c b/cmdline/speed.c index c5940573..600befbf 100644 --- a/cmdline/speed.c +++ b/cmdline/speed.c @@ -139,7 +139,7 @@ void speed(int period, int nd, int size) #elif defined(__powerpc__) printf("CPU 32-bit PowerPC\n"); #elif defined(__riscv) - printf("CPU RISC-V\n", + printf("CPU RISC-V\n"); #elif defined(__s390x__) printf("CPU 64-bit IBM Z / s390x\n"); #else @@ -151,9 +151,9 @@ void speed(int period, int nd, int size) printf("Memory is little-endian %d-bit\n", (int)sizeof(void*) * 8); #endif #if defined(__SIZEOF_INT128__) - printf("128-bit integers are supported\n"); + printf("128-bit integers are supported\n"); #else - printf("128-bit integers are not supported\n"); + printf("128-bit integers are not supported\n"); #endif #if HAVE_FUTIMENS @@ -739,7 +739,7 @@ void speed(int period, int nd, int size) SPEED_START { /* ensure to use same hardware in the delta step */ - raid_gen_ptr[0] = sizeof(void *) == 8 ? raid_gen1_int64 : raid_gen1_int32; + raid_gen_ptr[0] = sizeof(void*) == 8 ? raid_gen1_int64 : raid_gen1_int32; /* +1 to avoid GEN1 optimized case */ raid_rec1_int8(1, id, ip + 1, nd, size, v); } SPEED_STOP @@ -783,7 +783,7 @@ void speed(int period, int nd, int size) SPEED_START { /* ensure to use same hardware in the delta step */ - raid_gen_ptr[1] = sizeof(void *) == 8 ? raid_gen2_int64 : raid_gen2_int32; + raid_gen_ptr[1] = sizeof(void*) == 8 ? raid_gen2_int64 : raid_gen2_int32; /* +1 to avoid GEN2 optimized case */ raid_rec2_int8(2, id, ip + 1, nd, size, v); } SPEED_STOP @@ -1027,3 +1027,4 @@ void speed(int period, int nd, int size) free(v_alloc); free(v); } +