Skip to content
Tcl Source Code History Of Ticket 3059922
Login

History Of Ticket 3059922

Artifacts Associated With Ticket 3059922

  1. Ticket change [9576e32277] (rid 106160) by mescalinum on 2010-09-05 18:29:02:

    1. assignee initialized to: "hobbs"
    2. cmimetype initialized to: "text/plain"
    3. comment initialized to:
      mingw64 doesn't have SEH, and apparently amd64 arch (w64) doesn't need it.
      
    4. foundin initialized to: "None"
    5. is_private initialized to: "0"
    6. priority initialized to: "5 Medium"
    7. resolution initialized to: "None"
    8. status initialized to: "Open"
    9. submitter initialized to: "mescalinum"
    10. subsystem initialized to: "52. Portability Support"
    11. title initialized to: "fixes for mingw64 - gcc4.5.1 tdm64-1"
    12. type initialized to: "Patch"
  2. Add attachment "tcl8.5.8-mingw64-fix.diff" [46ad981376] (rid 99557) by mescalinum on 2010-09-06 01:29:03.

  3. Ticket change [9b65344dd1] (rid 111111) by mescalinum on 2010-09-06 01:29:03:

    1. icomment:
      
      
      File Added - 385692: tcl8.5.8-mingw64-fix.diff
      
      
      
    2. login: "mescalinum"
    3. mimetype: "text/plain"
    4. username: "mescalinum"
  4. Ticket change [d9ca9095dc] (rid 107671) by mescalinum on 2010-09-06 01:30:58:

    1. icomment:
      tested against tcl8.5.8 and tcl8.5.9rc4
      
      
    2. login: "mescalinum"
    3. mimetype: "text/plain"
    4. username: "mescalinum"
  5. Ticket change [e513e117ed] (rid 88072) by dgp on 2010-09-07 20:04:34:

    1. assignee changed to: "andreas_kupries"
    2. icomment:
      Andreas, is this configuration one of your test systems?
      
      Does this patch cause any trouble with your test systems?
      
      
    3. login: "dgp"
    4. mimetype: "text/plain"
    5. priority changed to: "9 Immediate"
    6. username: "dgp"
  6. Ticket change [5e59f37d43] (rid 115624) by nijtmans on 2010-09-07 21:42:05:

    1. icomment:
      This sounds to me that HAVE_NO_SEH is ill-determined
      in the configure script. It should not be necessary to
      test for _WIN64 separately.
      
      
    2. login: "nijtmans"
    3. mimetype: "text/plain"
    4. username: "nijtmans"
  7. Ticket change [46c4ad86b7] (rid 99570) by andreas_kupries on 2010-09-07 23:28:44:

    1. icomment:
      @dgp While we have a 64bit windows box we are using the C compiler of the platform SDK, not gcc. The mingw we are using, is only to run bash, configure, etc., and it is a 32bit version too, just checked with depends.exe, cputype is x86, not amd64. So, no, this is not one of our configurations.
      
      
      
    2. login: "andreas_kupries"
    3. mimetype: "text/plain"
    4. username: "andreas_kupries"
  8. Ticket change [b3b6b88ca8] (rid 124901) by andreas_kupries on 2010-09-07 23:28:45:

    1. assignee changed to: "dgp"
  9. Ticket change [5dbf486acf] (rid 115524) by dgp on 2010-09-08 00:02:50:

    1. assignee changed to: "andreas_kupries"
    2. icomment:
      nijtmans' comments sound right to me.
      Is it understood why HAVE_NO_SEH goes
      wrong on this platform?
      
      
    3. login: "dgp"
    4. mimetype: "text/plain"
    5. username: "dgp"
  10. Ticket change [e7d9b5f846] (rid 104542) by andreas_kupries on 2010-09-08 01:13:47:

    1. icomment:
      I have no understanding of SEH at all, except that I know that the acronym expands to 'structured exception handling'. I also seem to remember that Kevin talked about it at some point in some way, the exact nature of which I have forgotten (It was over a year ago at least, more likely over two years). Another person which might know it is David Gravereaux IIRC. tclguy less so actually, I believe.
      
      
      
    2. login: "andreas_kupries"
    3. mimetype: "text/plain"
    4. username: "andreas_kupries"
  11. Ticket change [636267aac5] (rid 92568) by mescalinum on 2010-09-08 02:17:51:

    1. icomment:
      excuse me I didn't state explicitly what the patch was going (trying) to correct, which is a compile failure on mingw w64, because it has no SEH, and the assembler workaround is valid only for x86 (pushl, movl, are not amd64 instructions).
      I think the macro HAVE_NO_SEH it's set correct.
      maybe the check should be #if defined(__MINGW32__) && defined(_AMD64) && defined(HAVE_NO_SEH)
      
      
    2. login: "mescalinum"
    3. mimetype: "text/plain"
    4. username: "mescalinum"
  12. Ticket change [4be56d2c31] (rid 126782) by nijtmans on 2010-09-08 02:20:57:

    1. icomment:
      I knew I saw it before: This is a duplicate
      of [Patch #1910041], which contains a
      better solution. See my remarks there.
      
      I cannot test it, but I think we should
      be grateful to Kai Tietz and NightStrike
      for providing such a complete solution.
      
      
    2. login: "nijtmans"
    3. mimetype: "text/plain"
    4. username: "nijtmans"
  13. Ticket change [1d3a6928d8] (rid 90768) by nijtmans on 2010-09-08 02:20:58:

    1. resolution changed to: "Duplicate"
  14. Ticket change [73185f135c] (rid 104986) by dgp on 2010-09-08 20:38:57:

    1. icomment:
      
      
      File Added - 386005: kai-update.patch
      
      
      
    2. login: "dgp"
    3. mimetype: "text/plain"
    4. username: "dgp"
  15. Add attachment "kai-update.patch" [1b2e659835] (rid 123101) by dgp on 2010-09-08 20:38:57.

  16. Ticket change [a4b9239ff8] (rid 110252) by dgp on 2010-09-08 20:40:12:

    1. icomment:
      
      Here's my updated version of Patch 1910041.
      It needs testing on the mingw/amd64 system,
      which I do not have.  mescalinum?  Can you
      give it a test?
      
      
      
    2. login: "dgp"
    3. mimetype: "text/plain"
    4. username: "dgp"
  17. Ticket change [9fa78851d8] (rid 96675) by mescalinum on 2010-09-08 20:55:23:

    1. icomment:
      @dgp: compiler output:
      gcc -c -O2 -fomit-frame-pointer -Wall  -I"./../generic" -DTCL_TOMMATH -DMP_PREC=4 -I"./../libtommath" -I"." -DPACKAGE_NAME=\"\" -DPACKAGE_TARNAME=\"\" -DPACKAGE_VERSION=\"\" -DPACKAGE_STRING=\"\" -DPACKAGE_BUGREPORT=\"\" -DSTDC_HEADERS=1 -DHAVE_NO_SEH=1 -DHAVE_NO_LPFN_DECLS=1 -DHAVE_ALLOCA_GCC_INLINE=1 -DHAVE_CAST_TO_UNION=1 -DTCL_CFGVAL_ENCODING=\"cp1252\" -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DTCL_CFG_OPTIMIZED=1 -DTCL_CFG_DEBUG=1   -DBUILD_tcl "tclWin32Dll.c" -o tclWin32Dll.o
      tclWin32Dll.c: In function 'TclWinCPUID':
      tclWin32Dll.c:1125:28: warning: unused variable 'registration'
      \Temp\cc2FmRDa.s: Assembler messages:
      \Temp\cc2FmRDa.s:61: Error: Incorrect register `%rax' used with `l' suffix
      make: *** [tclWin32Dll.o] Error 1
      
      
      
    2. login: "mescalinum"
    3. mimetype: "text/plain"
    4. username: "mescalinum"
  18. Ticket change [327ea788f2] (rid 93623) by dgp on 2010-09-08 21:01:02:

    1. icomment:
      
      Why are those lines being compiled?
      
      
    2. login: "dgp"
    3. mimetype: "text/plain"
    4. username: "dgp"
  19. Ticket change [4f2acac64b] (rid 125778) by dgp on 2010-09-08 21:03:53:

    1. icomment:
      
      I think I misread the message.
      
      If you change "movl" to "movq" on
      line 428, does it make things better?
      
      
      
    2. login: "dgp"
    3. mimetype: "text/plain"
    4. username: "dgp"
  20. Ticket change [d665843446] (rid 123798) by dgp on 2010-09-08 21:08:22:

    1. icomment:
      kennykb comments at 1910041 suggest
      the approach of the patch here is the better
      way to go.
      
      
      
    2. login: "dgp"
    3. mimetype: "text/plain"
    4. username: "dgp"
  21. Add attachment "3059922.patch" [cf14e4f238] (rid 112904) by dgp on 2010-09-08 21:24:48.

  22. Ticket change [02585b71e8] (rid 119629) by dgp on 2010-09-08 21:24:48:

    1. icomment:
      
      
      File Added - 386010: 3059922.patch
      
      
      
    2. login: "dgp"
    3. mimetype: "text/plain"
    4. username: "dgp"
  23. Ticket change [37eb7848d3] (rid 112113) by dgp on 2010-09-08 21:25:50:

    1. icomment:
      
      I believe the new attached patch 3059922.patch
      gets all the logic errors corrected, without adding
      new assembly.  Needs testing on all windows configurations.
      
      
    2. login: "dgp"
    3. mimetype: "text/plain"
    4. username: "dgp"
  24. Ticket change [52cee2a8d4] (rid 126381) by mescalinum on 2010-09-08 21:27:13:

    1. icomment:
      @dgp:
      > If you change "movl" to "movq" on
      > line 428, does it make things better?
      
      yep, that made the trick.
      
      there's still a linker error at the end:
      Creating library file: libtcl85.atclWin32Dll.o:tclWin32Dll.c:(.text+0xc4): undefined reference to `_Tcl_Finalize'
      tclWinChan.o:tclWinChan.c:(.text+0xa69): undefined reference to `_CloseHandle
      '
      collect2: ld returned 1 exit status
      make: *** [tcl85.dll] Error 1
      
      these functions are referenced from assembler. maybe needs a different syntax.
      
      
    2. login: "mescalinum"
    3. mimetype: "text/plain"
    4. username: "mescalinum"
  25. Ticket change [6d3ba6fd56] (rid 128657) by mescalinum on 2010-09-08 22:02:23:

    1. icomment:
      @dgp: yes, 3059922.patch is ok. tested with tcl8.5.9rc4
      
      
    2. login: "mescalinum"
    3. mimetype: "text/plain"
    4. username: "mescalinum"
  26. Ticket change [329f464e5a] (rid 93643) by dgp on 2010-09-08 22:49:28:

    1. icomment:
      committed to core-8-5-branch
      
      
    2. login: "dgp"
    3. mimetype: "text/plain"
    4. username: "dgp"
  27. Ticket change [fd7714a04a] (rid 108418) by dgp on 2010-09-09 04:03:01:

    1. assignee changed to: "dgp"
    2. closedate changed to: "2010-09-08T21:03:01"
    3. closer changed to: "dgp"
    4. icomment:
      
      
      allow_comments - 1
      
      ....and to HEAD
      
      
      
    5. login: "dgp"
    6. mimetype: "text/plain"
    7. resolution changed to: "Fixed"
    8. status changed to: "Closed"
    9. username: "dgp"
  28. Ticket change [3e1b434857] (rid 121209) by kennykb on 2010-09-09 08:55:27:

    1. icomment:
      The correct fix, in my arrogant opinion, is to use no SEH on 64-bitters.
      
      There's no need to protect CPUID, because all 64-bitters have it. There's also no need to *do* CPUID, because the 64-bit BIOSes have pretty well done away with the performance counter synchronisation issues that plague the 32-bitters.
      
      The remaining SEH calls in Tcl are all protecting against Windows operating system bugs that have been fixed for years - certainly prior to the release of any 64-bit version of Windows.
      
      So by all means fix the build if it's broken, but don't preserve the mess of assembly language code. It's not needed on Win64.
      
      
    2. login: "kennykb"
    3. mimetype: "text/plain"
    4. username: "kennykb"
  29. Ticket change [ba0807f4a2] (rid 129248) by nijtmans on 2010-12-14 18:46:04:

    1. icomment:
      
      
      allow_comments - 0
      
      When running the test suite on Tcl 8.6 (copmpiled with
      mingw-w64 for AMD64), I got the following
      test failure (see below). Either the test case
      should be disabled for Win64, or the cpuid
      should be implemented. I think that cpuid
      is useful for more than only the preformance
      counter, e.g. determining the number of
      available cores.
      
      Here is a patch (305992_2), which should
      work with both gcc and MSVC.  I definitely works
      with gcc, but I don't have a MSVC 64-bit 
      environment to test that part. The 64-bit
      assembler parts are basically the same as
      the 32-bit versions, only the SEH part is
      not needed here (as Kevin already noted)
      
      See attached patch (305992_2.patch).
      
      ==== platform-3.1 CPU ID on Windows FAILED
      ==== Contents of test case:
      
      set cpudata [testwincpuid 0]
      binary format iii  [lindex $cpudata 1]  [lindex $cpudata 3]  [lindex $cpudata 2] 
          
      ---- Test generated error; Return code was: 1
      ---- Return code should have been one of: 0 2
      ---- errorInfo: operation not available
          while executing
      "testwincpuid 0"
          ("uplevel" body line 2)
          invoked from within
      "uplevel 1 $script"
      ---- errorCode: NONE
      ==== platform-3.1 FAILED
      
      
      
    2. login: "nijtmans"
    3. mimetype: "text/plain"
    4. priority changed to: "5 Medium"
    5. status changed to: "Open"
    6. username: "nijtmans"
  30. Add attachment "3059922_2.patch" [37b70a9b95] (rid 112076) by nijtmans on 2010-12-14 18:47:04.

  31. Ticket change [3968575e0b] (rid 112383) by nijtmans on 2010-12-14 18:47:05:

    1. icomment:
      
      
      File Added - 396063: 3059922_2.patch
      
      
      
    2. login: "nijtmans"
    3. mimetype: "text/plain"
    4. username: "nijtmans"
  32. Ticket change [51cd860254] (rid 126192) by nijtmans on 2010-12-20 02:04:31:

    1. assignee changed to: "andreas_kupries"
    2. icomment:
      AMD inline assembler version put in HEAD.
      
      Investigated how to do the same in Win64/MSVC,
      it turns out that inline assembler is not supported
      any more, but in stead intrinsics should be used.
      
      Here is a patch (3059922_3.patch) doing this.
      Andreas, does this work on MSVC/64-bit? Or
      - in other words - does the platform-3.1
      test pass after this patch?
      
      Thanks, Andreas! (knowing you have a
      platform available.....)
      
      
    3. login: "nijtmans"
    4. mimetype: "text/plain"
    5. username: "nijtmans"
  33. Add attachment "3059922_3.patch" [6f6704d330] (rid 100312) by nijtmans on 2010-12-20 02:05:38.

  34. Ticket change [dd3a772a06] (rid 114629) by nijtmans on 2010-12-20 02:05:38:

    1. icomment:
      
      
      File Added - 396480: 3059922_3.patch
      
      
      
    2. login: "nijtmans"
    3. mimetype: "text/plain"
    4. username: "nijtmans"
  35. Ticket change [d02c830a4a] (rid 113120) by nijtmans on 2010-12-21 17:08:22:

    1. closedate changed to: "2010-12-21T10:08:22"
    2. closer changed to: "nijtmans"
    3. icomment:
      
      
      allow_comments - 1
      
      Andreas, never mind....
      
      VS10 has intrinsics for Win32 as well, so I was able to test this
      for Win32.
      
      Fixed in HEAD, now TclWinCPUID should work correct on all
      AMD64/i586 Windows version, both with GCC and MSVC
      
      
    4. login: "nijtmans"
    5. mimetype: "text/plain"
    6. status changed to: "Closed"
    7. username: "nijtmans"