From daab8f61297289697e9affe36450e12c57f2b094 Mon Sep 17 00:00:00 2001 From: Felix Morgner Date: Wed, 18 Feb 2026 09:13:46 +0100 Subject: refactor: extract error function --- src/error.S | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 src/error.S (limited to 'src/error.S') diff --git a/src/error.S b/src/error.S new file mode 100644 index 0000000..af441ce --- /dev/null +++ b/src/error.S @@ -0,0 +1,20 @@ +#include "helpers/function.S" + +.section .text + + //! @function _print_sdl_error(char const * format) + function_begin _print_sdl_error + + push %rdi + sub $8, %rsp + + call SDL_GetError@PLT + mov %rax, %rsi + + add $8, %rsp + pop %rdi + + call printf@PLT + + function_end + -- cgit v1.2.3