codegen: a small improvement in do_bswap and do_brev
[ajla.git] / funct.h
blobbe23fc4ec93059f2a11f2220dee0572a28430593
1 /*
2 * Copyright (C) 2024 Mikulas Patocka
4 * This file is part of Ajla.
6 * Ajla is free software: you can redistribute it and/or modify it under the
7 * terms of the GNU General Public License as published by the Free Software
8 * Foundation, either version 3 of the License, or (at your option) any later
9 * version.
11 * Ajla is distributed in the hope that it will be useful, but WITHOUT ANY
12 * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
13 * A PARTICULAR PURPOSE. See the GNU General Public License for more details.
15 * You should have received a copy of the GNU General Public License along with
16 * Ajla. If not, see <https://www.gnu.org/licenses/>.
19 #ifndef AJLA_FUNCT_H
20 #define AJLA_FUNCT_H
22 #include "data.h"
24 #define function_build_internal_thunk name(function_build_internal_thunk)
25 #define function_evaluate_prepare name(function_evaluate_prepare)
26 #define function_evaluate_submit name(function_evaluate_submit)
27 #define function_return name(function_return)
28 #define function_call_internal name(function_call_internal)
29 #define function_init_common name(function_init_common)
31 pointer_t attr_fastcall function_build_internal_thunk(void *(*fn)(frame_s *fp, const code_t *ip, union internal_arg arguments[]), unsigned n_arguments, union internal_arg arguments[]);
33 struct execution_control *function_evaluate_prepare(ajla_error_t *mayfail);
34 void function_evaluate_submit(struct execution_control *ex, pointer_t ptr, void (*callback)(void *, pointer_t), void *callback_cookie);
36 void * attr_fastcall function_return(frame_s *fp, pointer_t ptr);
38 void * attr_fastcall function_call_internal(frame_s *fp, const code_t *ip);
40 void function_init_common(struct data *fn);
42 #endif