summaryrefslogtreecommitdiff
path: root/src/stdio
diff options
context:
space:
mode:
Diffstat (limited to 'src/stdio')
-rw-r--r--src/stdio/_stdio.h2
-rw-r--r--src/stdio/printf.c3
-rw-r--r--src/stdio/sprintf.c1
3 files changed, 4 insertions, 2 deletions
diff --git a/src/stdio/_stdio.h b/src/stdio/_stdio.h
index 3c8b7906..516ce659 100644
--- a/src/stdio/_stdio.h
+++ b/src/stdio/_stdio.h
@@ -20,6 +20,8 @@
#define f_is_open(s) (s && (s->bmode != 0))
+#define GCC_SSE_HACK __attribute__((noinline, target("no-sse")))
+
struct __FILE {
fpos_t pos;
diff --git a/src/stdio/printf.c b/src/stdio/printf.c
index 973e5068..03b6df2a 100644
--- a/src/stdio/printf.c
+++ b/src/stdio/printf.c
@@ -4,8 +4,7 @@
/** write formatted output **/
-/* TODO: FIXME! This is a terrible hack around GCC sucking. */
-__attribute__((noinline, target("no-sse")))
+GCC_SSE_HACK
int printf(const char *format, ...)
{
struct io_options opt = {0};
diff --git a/src/stdio/sprintf.c b/src/stdio/sprintf.c
index ab1729b2..5b1ad29f 100644
--- a/src/stdio/sprintf.c
+++ b/src/stdio/sprintf.c
@@ -4,6 +4,7 @@
/** write formatted output to a string **/
+GCC_SSE_HACK
int sprintf(char * restrict s, const char * restrict format, ...)
{
int ret = 0;