diff --git a/tcc.h b/tcc.h index 74761f0..459e64d 100644 --- a/tcc.h +++ b/tcc.h @@ -47,6 +47,9 @@ #define inline __inline #define inp next_inp #define dlclose FreeLibrary +#ifdef _MSC_VER +#define __aligned(n) __declspec(align(n)) +#endif #ifdef _WIN64 #define uplong unsigned long long #endif @@ -65,6 +68,10 @@ #define uplong unsigned long #endif +#ifndef __aligned +#define __aligned(n) __attribute__((aligned(n))) +#endif + #ifndef PAGESIZE #define PAGESIZE 4096 #endif @@ -473,6 +480,9 @@ struct TCCState { void *error_opaque; void (*error_func)(void *opaque, const char *msg); int error_set_jmp_enabled; +#ifdef _WIN64 + __aligned(16) +#endif jmp_buf error_jmp_buf; int nb_errors;