29#ifndef CHECKASM_PLATFORM_AARCH64_H
30#define CHECKASM_PLATFORM_AARCH64_H
33#include "checkasm/checkasm.h"
46#define IGNORED_FP_ARGS 8
48#if CHECKASM_HAVE_GENERIC
49 #define clobber_type(arg) \
50 _Generic((void (*)(void *, arg)) NULL, \
51 void (*)(void *, int32_t): clobber_mask |= 1 << mpos++, \
52 void (*)(void *, uint32_t): clobber_mask |= 1 << mpos++, \
53 void (*)(void *, float): mpos += (fp_args++ >= IGNORED_FP_ARGS), \
54 void (*)(void *, double): mpos += (fp_args++ >= IGNORED_FP_ARGS), \
57 #define init_clobber_mask(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, ...) \
58 unsigned clobber_mask = 0; \
60 int mpos = 0, fp_args = 0; \
79 #define init_clobber_mask(...) unsigned clobber_mask = 0
82#define checkasm_declare_impl(ret, ...) \
83 ret (*checked_call)(__VA_ARGS__, int64_t, int64_t, int64_t, int64_t, int64_t, \
84 int64_t, int64_t, int64_t, int64_t, int64_t, int64_t, int64_t, \
85 int64_t, int64_t, int64_t, int64_t, void *, unsigned) \
86 = (ret (*)(__VA_ARGS__, int64_t, int64_t, int64_t, int64_t, int64_t, int64_t, \
87 int64_t, int64_t, int64_t, int64_t, int64_t, int64_t, int64_t, \
88 int64_t, int64_t, int64_t, void *, \
89 unsigned))(void *) checkasm_checked_call; \
90 init_clobber_mask(__VA_ARGS__, void *, void *, void *, void *, void *, void *, \
91 void *, void *, void *, void *, void *, void *, void *, void *)
93#define checkasm_call_checked(func, ...) \
94 (checkasm_set_signal_handler_state(1), \
95 checked_call(__VA_ARGS__, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0, \
96 func, clobber_mask)); \
97 checkasm_set_signal_handler_state(0)
100#define CHECKASM_ALIGNMENT 16
int(* func)(AVBPrint *dst, const char *in, const char *arg)
Platform and compiler attribute macros.
#define CHECKASM_API
Symbol visibility attribute for public API functions.