Go to the documentation of this file.
29 #ifndef CHECKASM_PLATFORM_X86_32_H
30 #define CHECKASM_PLATFORM_X86_32_H
33 #include "checkasm/checkasm.h"
41 #if CHECKASM_HAVE_GENERIC
42 #define checked_call_fn(ret) \
43 _Generic((ret (*)(void)) NULL, \
44 float (*)(void): checkasm_checked_call_float, \
45 double (*)(void): checkasm_checked_call_float, \
46 default: checkasm_checked_call)
49 #define checked_call_fn(ret) checkasm_checked_call_float
52 #define checkasm_declare_impl(ret, ...) \
53 ret (*checked_call)(void *, __VA_ARGS__, int, int, int, int, int, int, int, int, \
54 int, int, int, int, int, int, int) \
55 = (ret (*)(void *, __VA_ARGS__, int, int, int, int, int, int, int, int, int, \
56 int, int, int, int, int, int))(void *) checked_call_fn(ret); \
57 int emms_needed = 0; \
60 #define checkasm_call_checked(func, ...) \
61 (checkasm_set_signal_handler_state(1), \
62 checked_call(func, __VA_ARGS__, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, \
64 checkasm_set_signal_handler_state(0)
66 #define checkasm_declare_emms(cpu_flags, ret, ...) \
67 checkasm_declare(ret, __VA_ARGS__); \
68 if (checkasm_get_cpu_flags() & (cpu_flags)) { \
69 checked_call = (ret (*)(void *, __VA_ARGS__, int, int, int, int, int, int, int, \
70 int, int, int, int, int, int, int, \
71 int))(void *) checkasm_checked_call_emms; \
75 #if defined(__GNUC__) || defined(__clang__)
76 #define checkasm_emms() __asm__ volatile("emms" ::: "memory")
78 #define checkasm_emms() checkasm_empty_mmx()
81 #define checkasm_clear_cpu_state() \
87 #define CHECKASM_ALIGNMENT 64
int(* func)(AVBPrint *dst, const char *in, const char *arg)
CHECKASM_API void checkasm_empty_mmx(void)
Platform and compiler attribute macros.
CHECKASM_API void checkasm_checked_call(void *func,...)
CHECKASM_API void checkasm_checked_call_float(void *func,...)
CHECKASM_API void checkasm_checked_call_emms(void *func,...)
#define CHECKASM_API
Symbol visibility attribute for public API functions.