diff options
author | Jakob Kaivo <jkk@ung.org> | 2024-01-31 03:21:05 -0500 |
---|---|---|
committer | Jakob Kaivo <jkk@ung.org> | 2024-01-31 03:21:05 -0500 |
commit | 41d9176ee22c2cea7c7737d0aaf5dc0a56e5906d (patch) | |
tree | bcff476870100393887684a8d50f34a780ae3fcd | |
parent | f2d625756812464e15074a313abcc02d4bfdaf65 (diff) |
hack around GCC generating misaligned SSE code
-rw-r--r-- | src/stdio/printf.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/stdio/printf.c b/src/stdio/printf.c index 6f8746c8..973e5068 100644 --- a/src/stdio/printf.c +++ b/src/stdio/printf.c @@ -4,25 +4,26 @@ /** write formatted output **/ +/* TODO: FIXME! This is a terrible hack around GCC sucking. */ +__attribute__((noinline, target("no-sse"))) int printf(const char *format, ...) { - int ret = 0; - va_list ap; struct io_options opt = {0}; + va_list ap; SIGNAL_SAFE(0); opt.fnname = "printf"; opt.stream = stdout; va_start(ap, format); - ret = __printf(&opt, format, ap); + opt.ret = __printf(&opt, format, ap); va_end(ap); /* RETURN_SUCCESS(the number of characters written); RETURN_FAILURE(NEGATIVE); */ - return ret; + return opt.ret; } /*** |