From 09ac9faf59557bf92f69f74f02f5a3d5bb31944b Mon Sep 17 00:00:00 2001
From: grischka <grischka>
Date: Sat, 18 Jul 2009 22:06:07 +0200
Subject: [PATCH] win64: align jmp_buf

---
 tcc.h | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/tcc.h b/tcc.h
index 74761f0e..459e64dd 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;