summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ChangeLog5
-rw-r--r--win/tclWin32Dll.c21
2 files changed, 23 insertions, 3 deletions
diff --git a/ChangeLog b/ChangeLog
index 92ba873..4321eac 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,10 @@
2010-12-20 Jan Nijtmans <nijtmans@users.sf.net>
+ * win/tclWin32Dll.c: [Patch 3059922]: fixes for mingw64 - gcc4.5.1
+ tdm64-1: completed for all environments.
+
+2010-12-20 Jan Nijtmans <nijtmans@users.sf.net>
+
* win/configure.in: Explicitely test for intrinsics support in compiler,
before assuming only MSVC has it.
* win/configure: (autoconf-2.59)
diff --git a/win/tclWin32Dll.c b/win/tclWin32Dll.c
index 1f06703..ac4a008 100644
--- a/win/tclWin32Dll.c
+++ b/win/tclWin32Dll.c
@@ -10,10 +10,13 @@
* See the file "license.terms" for information on usage and redistribution of
* this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tclWin32Dll.c,v 1.72 2010/12/19 18:14:47 nijtmans Exp $
+ * RCS: @(#) $Id: tclWin32Dll.c,v 1.73 2010/12/21 10:04:59 nijtmans Exp $
*/
#include "tclWinInt.h"
+#if defined(HAVE_INTRIN_H) || (defined(_MSC_VER) && defined(_WIN64))
+# include <intrin.h>
+#endif
/*
* The following data structures are used when loading the thunking library
@@ -720,7 +723,12 @@ TclWinCPUID(
{
int status = TCL_ERROR;
-#if defined(__GNUC__)
+#if defined(HAVE_INTRIN_H) && defined(_WIN64)
+
+ __cpuid(regsPtr, index);
+ status = TCL_OK;
+
+#elif defined(__GNUC__)
# if defined(_WIN64)
/*
* Execute the CPUID instruction with the given index, and store results
@@ -836,7 +844,13 @@ TclWinCPUID(
status = registration.status;
# endif /* !_WIN64 */
-#elif defined(_MSC_VER) && !defined(_WIN64)
+#elif defined(_MSC_VER)
+# if defined(_WIN64)
+
+ __cpuid(regsPtr, index);
+ status = TCL_OK;
+
+# else
/*
* Define a structure in the stack frame to hold the registers.
*/
@@ -883,6 +897,7 @@ TclWinCPUID(
/* do nothing */
}
+# endif
#else
/*
* Don't know how to do assembly code for this compiler and/or