www.digitalmars.com         C & C++   DMDScript  

D.gnu - MinGW GCC-4.6.1 GDC r9841510e8ba6 32 and 64-bit

reply Daniel Green <venix1 gmail.com> writes:
Please post all issues in D.gnu or on GDC's site 
https://bitbucket.org/goshawk/gdc

Posted updated binaries for MinGW32 and MinGW64.
  * Requires TDM GCC 4.6.1 32 or 64-bit edition.
  * GDC revision 9841510e8ba6.
  * Contains modified binutils and runtime files for TLS.
  * 7-zip format:  http://7-zip.org
  * Includes D1 and D2.
    * -v2(default) targets D2.
    * -v1 targets D1.

32-bit release

https://bitbucket.org/goshawk/gdc/downloads/gcc-4.6.1-tdm-1-gdc-9841510e8ba6-20120109.7z

64-bit release

MinGW64 has issues that are being worked out.


Downloads at https://bitbucket.org/goshawk/gdc/downloads

All patches, source files and build scripts can be found at 
https://bitbucket.org/venix1/mingw-gdc/



Ran this build through the DMD v2.057 testsuite.
The following are the tests the failed and a brief description of why.



DISABLED_SH_TESTS += test39



DISABLED_TESTS += testmath


DISABLED_TESTS += test22


DISABLED_TESTS += testsocket
Note that phobos has a dependency on ws2_32.  So using sockets requires 
-lgphobos2 -lws2_32


DISABLED_TESTS += iasm constfold test42 inner ctorpowtests eh bitops 
testformat
DISABLED_TESTS += test4 testcontracts xtest46 sdtor argufilem


DISABLED_TESTS += hello-profile cov2 a20 sieve

Am I correct in assuming that DMD passes all the tests in the testsuite 
when it is tagged for release?
Jan 09 2012
next sibling parent Robert Clipsham <robert octarineparrot.com> writes:
On 09/01/2012 19:56, Daniel Green wrote:
 Am I correct in assuming that DMD passes all the tests in the testsuite
 when it is tagged for release?
Yes, as well as all druntime and phobos unittests (and regression testing of a few projects that people do of their own accord when a beta is announced). -- Robert http://octarineparrot.com/
Jan 09 2012
prev sibling next sibling parent reply Manu <turkeyman gmail.com> writes:
On 9 January 2012 21:56, Daniel Green <venix1 gmail.com> wrote:

 Please post all issues in D.gnu or on GDC's site
 https://bitbucket.org/goshawk/**gdc <https://bitbucket.org/goshawk/gdc>

 Posted updated binaries for MinGW32 and MinGW64.
  * Requires TDM GCC 4.6.1 32 or 64-bit edition.
  * GDC revision 9841510e8ba6.
  * Contains modified binutils and runtime files for TLS.
  * 7-zip format:  http://7-zip.org
  * Includes D1 and D2.
   * -v2(default) targets D2.
   * -v1 targets D1.

 32-bit release

 https://bitbucket.org/goshawk/**gdc/downloads/gcc-4.6.1-tdm-1-**
 gdc-9841510e8ba6-20120109.7z<https://bitbucket.org/goshawk/gdc/downloads/gcc-4.6.1-tdm-1-gdc-9841510e8ba6-20120109.7z>

 64-bit release

 MinGW64 has issues that are being worked out.


 Downloads at https://bitbucket.org/goshawk/**gdc/downloads<https://bitbucket.org/goshawk/gdc/downloads>

 All patches, source files and build scripts can be found at
 https://bitbucket.org/venix1/**mingw-gdc/<https://bitbucket.org/venix1/mingw-gdc/>



 Ran this build through the DMD v2.057 testsuite.
 The following are the tests the failed and a brief description of why.



 DISABLED_SH_TESTS += test39



 DISABLED_TESTS += testmath


 DISABLED_TESTS += test22


 DISABLED_TESTS += testsocket
 Note that phobos has a dependency on ws2_32.  So using sockets requires
 -lgphobos2 -lws2_32


 DISABLED_TESTS += iasm constfold test42 inner ctorpowtests eh bitops
 testformat
 DISABLED_TESTS += test4 testcontracts xtest46 sdtor argufilem


 DISABLED_TESTS += hello-profile cov2 a20 sieve

 Am I correct in assuming that DMD passes all the tests in the testsuite
 when it is tagged for release?
Awww damn it! I was all excited, thought you'd saved me the pain... until I realised this isn't the latest version :(
Jan 09 2012
parent reply Daniel Green <venix1 gmail.com> writes:
On 1/9/2012 4:35 PM, Manu wrote:
 Awww damn it! I was all excited, thought you'd saved me the pain...
 until I realised this isn't the latest version :(
GDC is under active development. It may no longer be the tip, but it's only a few revisions from it.
Jan 09 2012
next sibling parent Iain Buclaw <ibuclaw ubuntu.com> writes:
On 9 January 2012 23:37, Daniel Green <venix1 gmail.com> wrote:
 On 1/9/2012 4:35 PM, Manu wrote:
 Awww damn it! I was all excited, thought you'd saved me the pain...
 until I realised this isn't the latest version :(
GDC is under active development. =A0It may no longer be the tip, but it's=
only
 a few revisions from it.
^Manu got an itchy knees to try out vector support. ;) --=20 Iain Buclaw *(p < e ? p++ : p) =3D (c & 0x0f) + '0';
Jan 09 2012
prev sibling next sibling parent Manu <turkeyman gmail.com> writes:
On 10 January 2012 01:37, Daniel Green <venix1 gmail.com> wrote:

 On 1/9/2012 4:35 PM, Manu wrote:

 Awww damn it! I was all excited, thought you'd saved me the pain...
 until I realised this isn't the latest version :(
GDC is under active development. It may no longer be the tip, but it's only a few revisions from it.
I was after the vector support. But it's okay, I successfully managed to build a working MinGW build from windows myself, which usually seems to cause me a massive pain in the arse! :)
Jan 09 2012
prev sibling next sibling parent Artur Skawina <art.08.09 gmail.com> writes:
On 01/10/12 00:43, Iain Buclaw wrote:
 ^Manu got an itchy knees to try out vector support. ;)
 
BTW, how are vector literals supposed to work in D? Turns out i was right to be worried about ebp - see the vtst() function below... -------------------------------------- alias __vector(int[4]) i4; i4 vadd(i4 a, i4 b) { return a+b;} i4 vtst(i4 a, i4 b) { return a*b+a-b;} i4 vvvv() { i4 a = void; i4 b = void; return vadd(a, b); } -------------------------------------- 00000000 <_D5vect14vaddFNhG4iNhG4iZNhG4i>: 0: 55 push %ebp 1: 66 0f fe c1 paddd %xmm1,%xmm0 5: 89 e5 mov %esp,%ebp 7: 5d pop %ebp 8: c3 ret 00000010 <_D5vect14vtstFNhG4iNhG4iZNhG4i>: 10: 66 0f 6f d0 movdqa %xmm0,%xmm2 14: 66 0f 38 40 c1 pmulld %xmm1,%xmm0 19: 55 push %ebp 1a: 89 e5 mov %esp,%ebp 1c: 5d pop %ebp 1d: 66 0f fe c2 paddd %xmm2,%xmm0 21: 66 0f fa c1 psubd %xmm1,%xmm0 25: c3 ret 00000030 <_D5vect14vvvvFZNhG4i>: 30: 55 push %ebp 31: 66 0f ef c0 pxor %xmm0,%xmm0 35: 89 e5 mov %esp,%ebp 37: 5d pop %ebp 38: c3 ret ----------------------------------------- The "extern(C)" hack works, and result in eg: -------------------------------------------------- 00000010 <vtst>: 10: 66 0f 6f d0 movdqa %xmm0,%xmm2 14: 66 0f 38 40 c1 pmulld %xmm1,%xmm0 19: 66 0f fe c2 paddd %xmm2,%xmm0 1d: 66 0f fa c1 psubd %xmm1,%xmm0 21: c3 ret -------------------------------------------------- but marking large parts of D code that way seems wrong... I'm going to assume the vvvv() transformation is an optimization. :) artur
Jan 09 2012
prev sibling next sibling parent reply Andrej Mitrovic <andrej.mitrovich gmail.com> writes:
 Turns out i was right to be worried about ebp - see the vtst()
 function below...
On DMD head I get an ICE, yay! Internal error: backend/cod3.c 446
Jan 09 2012
parent "Trass3r" <un known.com> writes:
On Tuesday, 10 January 2012 at 01:52:57 UTC, Andrej Mitrovic 
wrote:
 Turns out i was right to be worried about ebp - see the vtst()
 function below...
On DMD head I get an ICE, yay! Internal error: backend/cod3.c 446
Like this?: http://d.puremagic.com/issues/show_bug.cgi?id=7254
Jan 09 2012
prev sibling parent Iain Buclaw <ibuclaw ubuntu.com> writes:
On 10 January 2012 00:46, Artur Skawina <art.08.09 gmail.com> wrote:
 On 01/10/12 00:43, Iain Buclaw wrote:
 ^Manu got an itchy knees to try out vector support. ;)
BTW, how are vector literals supposed to work in D? Turns out i was right to be worried about ebp - see the vtst() function below... --------------------------------------
Once I've refactored a few things, I will get onto this so that have better control over what functions are forced to have a frame pointer (ie: extern(D) with inline asm are the only ones really needed). -- Iain Buclaw *(p < e ? p++ : p) = (c & 0x0f) + '0';
Jan 09 2012
prev sibling parent reply Daniel Green <venix1 gmail.com> writes:
64-bit is ready.

64-Bit Binary

https://bitbucket.org/goshawk/gdc/downloads/gcc-4.6.1-tdm64-1-gdc-9841510e8ba6-20120109.7z


Running the testsuite had additional failures.


DISABLED_TESTS += test34 variadic



DISABLED_TESTS += dhry

DISABLED_TESTS += test8 testaa testzip

---



DISABLED_SH_TESTS += test39



DISABLED_TESTS += testmath


DISABLED_TESTS += test22


DISABLED_TESTS += testsocket

---


DISABLED_TESTS += iasm constfold test42 inner ctorpowtests eh bitops 
testformat
DISABLED_TESTS += test4 testcontracts xtest46 sdtor argufilem


DISABLED_TESTS += hello-profile cov2 a20 sieve
Jan 09 2012
parent reply =?ISO-8859-1?Q?S=F6nke_Ludwig?= writes:
Am 10.01.2012 06:02, schrieb Daniel Green:
 64-bit is ready.
 
 64-Bit Binary
 
 https://bitbucket.org/goshawk/gdc/downloads/gcc-4.6.1-tdm64-1-gdc-9841510e8ba6-20120109.7z
Since some time I try to somehow get a working 64-bit DLL compiled. With gdc this works now apart from crashing in the TLS setup code, as soon as the runtime is initialized (no TLS variables are used in the code). Is TLS support and/or a workaround for those crashes something that's on the radar? Regards, Sönke
Jan 26 2012
next sibling parent "Trass3r" <un known.com> writes:
 Is TLS support and/or a workaround for those crashes something 
 that's on the radar?
It's a known issue and being worked on I think.
Jan 26 2012
prev sibling parent reply Daniel Green <venix1 gmail.com> writes:
On 1/26/2012 11:01 AM, Sönke Ludwig wrote:
 Is TLS support and/or a workaround for those crashes something that's on
 the radar?
That release had a few issues with generating 64-bit TLS code. Those issues have been fixed but I haven't uploaded a new binary. The new compiler can pass most of the testsuite. The current failures are not TLS related. Since you're working with Dll's if you post a test case, I would be happy to test the compiler on it before uploading a new release. TLS is a high priority for MinGW as it is required by D.
Jan 26 2012
next sibling parent =?ISO-8859-1?Q?S=F6nke_Ludwig?= writes:
Am 27.01.2012 01:32, schrieb Daniel Green:
 On 1/26/2012 11:01 AM, Sönke Ludwig wrote:
 Is TLS support and/or a workaround for those crashes something that's on
 the radar?
That release had a few issues with generating 64-bit TLS code. Those issues have been fixed but I haven't uploaded a new binary. The new compiler can pass most of the testsuite. The current failures are not TLS related. Since you're working with Dll's if you post a test case, I would be happy to test the compiler on it before uploading a new release. TLS is a high priority for MinGW as it is required by D.
OK that sounds great, thanks for the info. I will prepare a short test case later today.
Jan 27 2012
prev sibling parent reply Sönke Ludwig <sludwig_sp niksoftware.com> writes:
== Auszug aus Daniel Green (venix1 gmail.com)'s Artikel
 On 1/26/2012 11:01 AM, Sönke Ludwig wrote:
 Is TLS support and/or a workaround for those crashes something that's on
 the radar?
That release had a few issues with generating 64-bit TLS code. Those issues have been fixed but I haven't uploaded a new binary. The new compiler can pass most of the testsuite. The current failures are not TLS related. Since you're working with Dll's if you post a test case, I would be happy to test the compiler on it before uploading a new release. TLS is a high priority for MinGW as it is required by D.
I just realized that the crash happens only when loading the DLL at runtime using LoadLibrary and that it is only partially a 32/64 bit problem (test2c crashes for 64-bit but works for 32-bit). The attached .zip contains a test script that runs a few different combinations. The statically linked versions generally seem to work. begin 644 dlltest.zip M`` `NWT[0%'I&D*!`0``Y`,``!````!D;&QT97-T+V)U:6QD+G-HE9)=:X,P MWN?-:W+.S?4XH&Q<Q+JF:WS-%H(4HC^`FYQG*^ZG0XA($7*:"YHQ7?O1M2L2 MC1DLJ:[]EMDYX<N,IU6^2BJ(`$3*_9[=.:`B]CF)`&60T"!*DLE(#B M%)WE\([+$TG)20V60)DV&9$M4;..AFL-5]J\\84'QK`EXD;$'=%4(O)& )+R M(&JUPUDM#JM5R:F[N2WO1C[[NAT<QW#A M __Q4$9E08XMS>F-^44Y>],%06;+4PA?T/!\AG62K[>OVDVUH>/`A[24W6MB M"* `QY&$+(%CI')U8V*T"JLJI"8N-5=JU)[:*`]1S40'S'$OJZB3D;;5BMQ. M$0```&1L;'1E<W0O9&QL;6%I;BYDC9'-;NHP$$;7B91WF+M+I(KLRXJ;($!* M207TLK1<>V LC(W&#MRJZKO729M2J3_JRI*_F3/'8W4X6O+ O!R)T5D9:<]N M/1( D:4./+`Z:J]XLDJ";`^'QS1[>KZ40+I]=<Z2^&]=5U!J?<.522_"O2XW M`J_ KJJ7,VCU"KFSY JJVW_UHH3C:84.Z80R R1^2N(HSW]>3>3.RHL&TH&5 MV9&L0!?6Y3T73?K1W5.+D$'6-T2?^-$](=]_/:J<]J/ XP2)WTP8PQ>DS7PU M.T#T51 MJ?_!XM1.J!W753N!A';8#H.)RZ0JI*:U*$GENK`-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JF[HJ ,Z[0_3?Y5G)QU!JWB YT*> MF9= R(F;,L_>\FPF+<H.T`5H>J<">B=*#C$\!VY_CXI8;"5RX5/2!P_:VBM8 M7E Q6XRIDD<]D%<;K8D9(NH64,3BM^UC^&/[.XF6Y[`+.S."V;.&?#N-_KUU M3(S(HV"^AN5?MJ0Z\KN\LC?GB?\8\44X=>.H7XXO^P%02P,$%````` `K'T[ MLJ0+ AG$)5A9JC 5EAP')3%50=R=M$NWK_>^WH'$LV*`:ZE(Z?B\6;.SF033 M#O/Y(?UVSJ%J%CBU_;/F#U M?" JWMUI,;0P`^^_1NI=U 8.,6GTF_M)BED;D+0?XJ1* 90`"9-J]H4^.B35 M^?E*]9+[WL1HLW.O><'HY4#IMXRY_ M````````"````````````!` ````````9&QL=&5S="]02P$"%``4````"`"[ M?3M`4>D:0H$!``#D`P``$````````````"` ```F````9&QL=&5S="]B=6EL M9"YS:%!+`0(4`!0````(`)A].T"/A^C>=`$``-D"```1````````````("`` M`-4!``!D;&QT97-T+V1L;&UA:6XN9%!+`0(4`!0````(`/MS.T#T51$0/0$` M%``4````"`#F=#M`GE4:Z;8```#Z````#P```````````"` ``#E!```9&QL M=&5S="]T97-T,2YC4$L!`A0`%````` `X'0[0/*R%.FT````"`$```\````` M4$/C&P$``!\"```/````````````("```*D&``!D;&QT97-T+W1E<W0R+F-0 M2P$"%``4````"`#B=#M`1*RLQB8!``!'` ``#P```````````"` ``#Q!P`` M9&QL=&5S="]T97-T,BYD4$L!`A0`%````` `K'T[0+R*>8QW````DP````\` 8+F-02P4&``````H`" !A` ``HPH````` ` end
Jan 27 2012
parent Daniel Green <venix1 gmail.com> writes:
All tests pass.  However, I see your problem.

In plaindll.d:

version(GNU){ // Workaround for linker error
	void* _tlsstart; // First symbol of the TLS section
	void* _tlsend;
	//int _tls_callbacks_a; // Workaround for GDC/MinGW linker error
}

_tlsstart is the first symbol of the TLS section. _tlsend is the last 
symbol of the TLS section.  Together they are used by D to identify the 
TLS memory region for a given thread.  If they do not come from TLS 
memory then things will not work right.

The MinGW runtime has equivalent symbols __tls_start and __tls_end. 
This is not something likely to change as it's a Windows convention. 
The version of MinGW/GDC you have should define _tlsstart and _tlsend 
symbols automatically if WinMain, DllMain or _Dmain functions exist in 
the current object file.

As of now MinGW/GDC uses alias __tls_start _tlsstart and alias __tls_end 
_tlsend to satisfy those requirements where necessary.

It's the same with _tls_callbacks_a.  Windows convention specifies __xl_a.

The currently posted MinGW64 binaries have an alignment issue with TLS 
memory in 64-bit mode.  It's a segfault that will manifest in the 
garbage collector.

I'll release updated binaries tonight.
Jan 27 2012