Tcl Source Code

Check-in [e6f01c28bd]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:[Bug 3601804]: platformCPUID segmentation fault on Darwin
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: e6f01c28bd802741f36af5c6f8f439032800a68d
User & Date: jan.nijtmans 2013-01-26 16:55:24
Context
2013-01-28
15:16
Improve code generation for some ensemble subcommands in cases where full compilation is impossible ... check-in: c8a255c3f3 user: dkf tags: trunk
00:57
merge trunk check-in: fbec850cdd user: dkf tags: dkf-bytecode-8.6-main
2013-01-26
20:06
merge trunk check-in: f330dcdf6f user: dgp tags: dgp-refactor
17:04
merge trunk check-in: e910becf4c user: jan.nijtmans tags: initsubsystems
16:55
[Bug 3601804]: platformCPUID segmentation fault on Darwin check-in: e6f01c28bd user: jan.nijtmans tags: trunk
16:53
[Bug 3601804]: platformCPUID segmentation fault on Darwin check-in: 2be066838a user: jan.nijtmans tags: core-8-5-branch
2013-01-25
18:47
remove unused code check-in: a55a37a15b user: mig tags: trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to ChangeLog.






1
2
3
4
5
6
7





2013-01-23  Donal K. Fellows  <[email protected]>

	* library/http/http.tcl (http::geturl): [Bug 2911139]: Do not do vwait
	for connect to avoid reentrancy problems (except when operating
	without a -command option). Internally, this means that all sockets
	created by the http package will always be operated in asynchronous
	mode.
>
>
>
>
>







1
2
3
4
5
6
7
8
9
10
11
12
2013-01-26  Jan Nijtmans  <[email protected]>

	* unix/tclUnixCompat.c: [Bug 3601804]: platformCPUID segmentation
	fault on Darwin.

2013-01-23  Donal K. Fellows  <[email protected]>

	* library/http/http.tcl (http::geturl): [Bug 2911139]: Do not do vwait
	for connect to avoid reentrancy problems (except when operating
	without a -command option). Internally, this means that all sockets
	created by the http package will always be operated in asynchronous
	mode.

Changes to unix/tclUnixCompat.c.

991
992
993
994
995
996
997







998
999
1000
1001
1002

1003
1004
1005
1006
1007
1008
1009
    unsigned int index,		/* Which CPUID value to retrieve. */
    unsigned int *regsPtr)	/* Registers after the CPUID. */
{
    int status = TCL_ERROR;

    /* See: <http://en.wikipedia.org/wiki/CPUID> */
#if defined(HAVE_CPUID)







    __asm__ __volatile__("mov %%ebx, %%esi     \n\t" /* save %ebx */
                 "cpuid            \n\t"
                 "xchg %%esi, %%ebx   \n\t" /* restore the old %ebx */
                 : "=a"(regsPtr[0]), "=S"(regsPtr[1]), "=c"(regsPtr[2]), "=d"(regsPtr[3])
                 : "a"(index));

    status = TCL_OK;
#endif
    return status;
}

/*
 * Local Variables:







>
>
>
>
>
>
>





>







991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
    unsigned int index,		/* Which CPUID value to retrieve. */
    unsigned int *regsPtr)	/* Registers after the CPUID. */
{
    int status = TCL_ERROR;

    /* See: <http://en.wikipedia.org/wiki/CPUID> */
#if defined(HAVE_CPUID)
#if defined(__x86_64__) || defined(_M_AMD64) || defined (_M_X64)
    __asm__ __volatile__("movq %%rbx, %%rsi     \n\t" /* save %rbx */
                 "cpuid            \n\t"
                 "xchgq %%rsi, %%rbx   \n\t" /* restore the old %rbx */
                 : "=a"(regsPtr[0]), "=S"(regsPtr[1]), "=c"(regsPtr[2]), "=d"(regsPtr[3])
                 : "a"(index));
#else
    __asm__ __volatile__("mov %%ebx, %%esi     \n\t" /* save %ebx */
                 "cpuid            \n\t"
                 "xchg %%esi, %%ebx   \n\t" /* restore the old %ebx */
                 : "=a"(regsPtr[0]), "=S"(regsPtr[1]), "=c"(regsPtr[2]), "=d"(regsPtr[3])
                 : "a"(index));
#endif
    status = TCL_OK;
#endif
    return status;
}

/*
 * Local Variables: