Mercurial > pub > dyncall > dyncall
diff dyncallback/dyncall_args_x64.c @ 661:93ce63d72d59
- dyncallback code cleanup: removed unneeded headers
author | Tassilo Philipp |
---|---|
date | Thu, 14 Mar 2024 10:11:28 +0100 |
parents | b36a738c8975 |
children |
line wrap: on
line diff
--- a/dyncallback/dyncall_args_x64.c Tue Mar 12 23:32:12 2024 +0100 +++ b/dyncallback/dyncall_args_x64.c Thu Mar 14 10:11:28 2024 +0100 @@ -6,7 +6,7 @@ Description: Callback's Arguments VM - Implementation for x64 License: - Copyright (c) 2007-2022 Daniel Adler <dadler@uni-goettingen.de>, + Copyright (c) 2007-2024 Daniel Adler <dadler@uni-goettingen.de>, Tassilo Philipp <tphilipp@potion-studios.com> Permission to use, copy, modify, and distribute this software for any @@ -25,12 +25,31 @@ -#include "dyncall_args_x64.h" +#include "dyncall_args.h" +#include "dyncall_callvm_x64.h" /* reuse DCRegCount_x64 and DCRegData_x64_s */ +#include "dyncall_aggregate.h" #include <assert.h> #include <string.h> +struct DCArgs +{ + /* state */ + int64* stack_ptr; /* offset 0 */ + DCRegCount_x64 reg_count; /* offset 8, size:win 4, size:*nix 8 */ +#if defined(DC_WINDOWS) + int pad_w; /* alignment helper for win/x64 */ +#endif + int aggr_return_register; /* offset 16 */ + int pad; /* offset 20 */ + DCaggr** aggrs; /* offset 24 */ + + /* reg data */ + DCRegData_x64_s reg_data; /* offset 32 */ +}; + + static int64* arg_i64(DCArgs* args) { args->reg_count.i += (args->reg_count.i == args->aggr_return_register);