aboutsummaryrefslogtreecommitdiff
path: root/src/arch/neon.h
diff options
context:
space:
mode:
authorSebastiano Tronto <sebastiano@tronto.net>2025-03-25 18:35:47 +0100
committerSebastiano Tronto <sebastiano@tronto.net>2025-03-25 18:35:47 +0100
commit56048d13b73ec6e6a9c59d62e82f41e69a3994bd (patch)
tree49fc5d50e739a399897425756c08a73ba5924ddb /src/arch/neon.h
parent0f4931c8de298b0f97aba1757c9538f48adb30c6 (diff)
downloadnissy-core-56048d13b73ec6e6a9c59d62e82f41e69a3994bd.tar.gz
nissy-core-56048d13b73ec6e6a9c59d62e82f41e69a3994bd.zip
More safety with pointers using VLA function parameters
Diffstat (limited to 'src/arch/neon.h')
-rw-r--r--src/arch/neon.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/arch/neon.h b/src/arch/neon.h
index 19f6f9d..d5f5f8b 100644
--- a/src/arch/neon.h
+++ b/src/arch/neon.h
@@ -39,7 +39,7 @@ popcount_u32(uint32_t x)
39} 39}
40 40
41STATIC void 41STATIC void
42pieces(cube_t *cube, uint8_t c[static 8], uint8_t e[static 12]) 42pieces(cube_t cube[static 1], uint8_t c[static 8], uint8_t e[static 12])
43{ 43{
44 // First 8 bytes of the corner vector are copied from the c array 44 // First 8 bytes of the corner vector are copied from the c array
45 vst1_u8(c, cube->corner); 45 vst1_u8(c, cube->corner);
@@ -287,19 +287,19 @@ coord_esep(cube_t c)
287} 287}
288 288
289STATIC_INLINE void 289STATIC_INLINE void
290copy_corners(cube_t *dst, cube_t src) 290copy_corners(cube_t dst[static 1], cube_t src)
291{ 291{
292 dst->corner = src.corner; 292 dst->corner = src.corner;
293} 293}
294 294
295STATIC_INLINE void 295STATIC_INLINE void
296copy_edges(cube_t *dst, cube_t src) 296copy_edges(cube_t dst[static 1], cube_t src)
297{ 297{
298 dst->edge = src.edge; 298 dst->edge = src.edge;
299} 299}
300 300
301STATIC_INLINE void 301STATIC_INLINE void
302set_eo(cube_t *cube, int64_t eo) 302set_eo(cube_t cube[static 1], int64_t eo)
303{ 303{
304 // Temp array to store the NEON vector 304 // Temp array to store the NEON vector
305 uint8_t mem[16]; 305 uint8_t mem[16];

Generated with cgit - Back to sebastiano.tronto.net