diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/error.S | 20 | ||||
| -rw-r--r-- | src/main.S | 17 |
2 files changed, 20 insertions, 17 deletions
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 + @@ -16,22 +16,6 @@ .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 - function_begin main define_local window_handle, 8 @@ -75,7 +59,6 @@ call SDL_Quit@PLT - .Lsuccess: lea greeting(%rip), %rdi xor %rax, %rax call printf@PLT |
