From b0d9782e13156abd5884fa73017a0286441202d1 Mon Sep 17 00:00:00 2001 From: Andrew Waterman Date: Mon, 18 Jul 2022 15:15:41 -0700 Subject: Fix load/store performance under clang Hopefully for the last time :-) --- riscv/common.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'riscv/common.h') diff --git a/riscv/common.h b/riscv/common.h index 002a83f..7d37001 100644 --- a/riscv/common.h +++ b/riscv/common.h @@ -8,11 +8,13 @@ # define unlikely(x) __builtin_expect(x, 0) # define NOINLINE __attribute__ ((noinline)) # define NORETURN __attribute__ ((noreturn)) +# define ALWAYS_INLINE __attribute__ ((always_inline)) #else # define likely(x) (x) # define unlikely(x) (x) # define NOINLINE # define NORETURN +# define ALWAYS_INLINE #endif #endif -- cgit v1.1 From fe6335701815b302de391aac7177091c2ca3eb2e Mon Sep 17 00:00:00 2001 From: Andrew Waterman Date: Thu, 22 Sep 2022 17:32:15 -0700 Subject: Add UNUSED macro for suppressing unused-parameter/variable warnings --- riscv/common.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'riscv/common.h') diff --git a/riscv/common.h b/riscv/common.h index 7d37001..a354ced 100644 --- a/riscv/common.h +++ b/riscv/common.h @@ -9,12 +9,14 @@ # define NOINLINE __attribute__ ((noinline)) # define NORETURN __attribute__ ((noreturn)) # define ALWAYS_INLINE __attribute__ ((always_inline)) +# define UNUSED __attribute__ ((unused)) #else # define likely(x) (x) # define unlikely(x) (x) # define NOINLINE # define NORETURN # define ALWAYS_INLINE +# define UNUSED #endif #endif -- cgit v1.1