From 3d00af92d2993e5fbf237e2c81b499058c21a650 Mon Sep 17 00:00:00 2001 From: Jakob Kaivo Date: Wed, 29 May 2024 16:58:17 -0400 Subject: apply GCC_SSE_HACK more uniformly --- src/_safety.h | 2 ++ src/signal/sigaction.c | 1 + src/stdio/_stdio.h | 2 -- src/stdlib/__jkmalloc.c | 1 + 4 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/_safety.h b/src/_safety.h index 85637013..3fb3a66e 100644 --- a/src/_safety.h +++ b/src/_safety.h @@ -3,6 +3,8 @@ _Noreturn void __undefined(const char *, ...); +#define GCC_SSE_HACK __attribute__((noinline, target("no-sse"))) + #include #include #include diff --git a/src/signal/sigaction.c b/src/signal/sigaction.c index d4721538..3aa41b49 100644 --- a/src/signal/sigaction.c +++ b/src/signal/sigaction.c @@ -3,6 +3,7 @@ #include "_syscall.h" #include "_safety.h" +GCC_SSE_HACK int sigaction(int sig, const struct sigaction * restrict act, struct sigaction * restrict oact) { SIGNAL_SAFE(-1); diff --git a/src/stdio/_stdio.h b/src/stdio/_stdio.h index 6302ee83..80e25546 100644 --- a/src/stdio/_stdio.h +++ b/src/stdio/_stdio.h @@ -20,8 +20,6 @@ #define f_is_open(s) (s && (s->bmode != 0)) -#define GCC_SSE_HACK __attribute__((noinline, target("no-sse"))) - #define ORIENT_WIDE (1) #define ORIENT_BYTE (-1) diff --git a/src/stdlib/__jkmalloc.c b/src/stdlib/__jkmalloc.c index e21baffd..c7a5685b 100644 --- a/src/stdlib/__jkmalloc.c +++ b/src/stdlib/__jkmalloc.c @@ -182,6 +182,7 @@ static void __jk_sigaction(int sig, siginfo_t *si, void *addr) __jk_error(NULL, NULL, &src); } +GCC_SSE_HACK void* __jkmalloc(void *ptr, size_t alignment, size_t size1, size_t size2, const char *user) { static int sa_set = 0; -- cgit v1.2.1