From: Andris Pavenis To: djgpp AT delorie DOT com, eplmst AT lu DOT erisoft DOT se (Martin Stromberg) Subject: Re: SIGILL 386 (illegal opcode) Date: Fri, 16 May 2003 08:14:46 +0300 User-Agent: KMail/1.5.1 References: In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200305160814.46240.pavenis@latnet.lv> Reply-To: djgpp AT delorie DOT com On Wednesday 14 May 2003 19:13, Martin Stromberg wrote: > Alexei K. (kzua AT kzua DOT udm DOT ru) wrote: > : Thanks a lot. As I see it is not problem of DJGPP libstdcxx. > : I found in libstdc++-v3 FAQ the following article: > : > : "Threading is broken on i386 > : > : Support for atomic integer operations is/was broken on i386 platforms. > : The assembly code accidentally used opcodes that are only available on > : the i486 and later. So if you configured GCC to target, for example, > : i386-linux, but actually used the programs on an i686, then you would > : encounter no problems. Only when actually running the code on a i386 > : will the problem appear. > : > : This is fixed in 3.2.2." > > Well. Yes and no. It's wrong in the header file that should be > used (the one for 386). But that won't help as the header file for 486 > is used. > > : But really it is not fixed. (may be in 3.2.3?) > > (Not yet.) True. Not yet in GCC-3.3. At least even libstdc++ it is configured with --target=i386-pc-msdosdjgpp --host=i386-pc-msdosdjgpp --build=i386-pc-msdosdjgpp it uses i486+ instructions for atomic integer operations. I didn't reconfigure and rebuild entire gcc-3.3 though, only libstdc++-v3 Andris