Align critical loops to 64 bytes using __align_loops attribute

This commit is contained in:
Andrea Mazzoleni 2026-10-05 11:32:55 +02:00
parent 91761768a0
commit ec71f519b0
6 changed files with 25 additions and 0 deletions

View file

@ -70,6 +70,22 @@
#define __noreturn __attribute__((noreturn))
#endif
#ifndef __aligned
#if defined(__GNUC__) || defined(__clang__)
#define __aligned(n) __attribute__((aligned(n)))
#else
#define __aligned(n)
#endif
#endif
#ifndef __aligned_loops
#if defined(__GNUC__) && !defined(__clang__)
#define __aligned_loops(n) __attribute__((optimize("align-loops=" #n)))
#else
#define __aligned_loops(n)
#endif
#endif
/**
* Architecture for inline assembly.
*/