X-Authentication-Warning: delorie.com: mail set sender to djgpp-bounces using -f From: Rugxulo Newsgroups: comp.os.msdos.djgpp Subject: Re: CC1.EXE/GCC.EXE crashes with SIGILL, hard. Date: Sun, 18 Mar 2012 15:05:36 -0700 (PDT) Organization: http://groups.google.com Lines: 67 Message-ID: <75057a79-95a3-41ec-93c6-8b459c4d9f9a@h20g2000yqd.googlegroups.com> References: <16777375 DOT 1302 DOT 1331688966231 DOT JavaMail DOT geo-discussion-forums AT vbat19> <4F60E096 DOT 2060106 AT iki DOT fi> <496fa848-de2c-4020-aced-ef298a0c5ec9 AT r21g2000yqa DOT googlegroups DOT com> NNTP-Posting-Host: 65.13.115.246 Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 X-Trace: posting.google.com 1332108430 15206 127.0.0.1 (18 Mar 2012 22:07:10 GMT) X-Complaints-To: groups-abuse AT google DOT com NNTP-Posting-Date: Sun, 18 Mar 2012 22:07:10 +0000 (UTC) Complaints-To: groups-abuse AT google DOT com Injection-Info: h20g2000yqd.googlegroups.com; posting-host=65.13.115.246; posting-account=p5rsXQoAAAB8KPnVlgg9E_vlm2dvVhfO User-Agent: G2/1.0 X-HTTP-UserAgent: Opera/9.80 (X11; Linux i686; U; en) Presto/2.10.229 Version/11.61,gzip(gfe) Bytes: 3940 To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from quoted-printable to 8bit by delorie.com id q2IMF1if016499 Reply-To: djgpp AT delorie DOT com Hi again, On Mar 14, 9:52 pm, Rugxulo wrote: > > On Mar 14, 1:16 pm, Andris Pavenis wrote: > > >  From GDB one gets: > > > (gdb) disass init_vectorized_lexer > > Dump of assembler code for function init_vectorized_lexer: > >     0x007bbdc8 <+141>:        cmove  %eax,%edx > > End of assembler dump. > > (gdb) > > Yeah, GCC is notorious for (over)using CMOVxx when targeting i686. > > BTW, this part is apparently part of /libcpp/lex.c , if that helps > any. I have no idea why GCC would have this bug, esp. since they make > great pains to utilize CPUID. > > > So it seems that specifying host machine does not seem to be sufficient > > any more (even it shoud be sufficient). I had: > > > build=i586-pc-msdosdjgpp > > host=i586-pc-msdosdjgpp > > target=i586-pc-msdosdjgpp > > > in generated Makefile in directory gcc for stage 3. > > > It seems that all 4.6.X versions have the same problem (I checked > > disassembler output for 4.6.0). > > I did a quick search, but it seemed like they (mistakenly thought > they) fixed it already. Ugh. http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48326 But it's been known about for a year, not fixed, and labeled as unassigned, P3. :-(( http://old.nabble.com/-Bug-bootstrap-49104--New%3A-bootstrap-failure-on-AMD-K6-2-with-illegal-instruction-(cmove)-in-stage2-td31671805.html http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49104 There they act like they fixed it in the past for one guy with an MMX- only AMD cpu (K6-2), but clearly it's still apparently not fixed. I did download gcc-4.6.3-core.tar.bz2 [sic] and rebuilt with LANGUAGES=c (slow and boring, three stages) natively on Linux, and it still seems to be generating CMOVxx despite anything. I honestly don't know why (or how to fix), it's a dumb mistake. As mentioned, you could try to use -O1 , but at least for him that still left at least one CMOVxx in there, ugh. On the bright side, 4.4.7 (final of that series) was just released, 4.5.4 will probably come out eventually as it's still maintained, and 4.7.0 will be released very very soon once the release candidate is finished / finalized. (Don't know if Andris is messing with those or not.) Honestly, I feel tacky mentioning other tools in this forum, BUT ... unless you really want or need GCC specifically (and you obviously can get an older version, which should "work fine"), perhaps a different tool would be "better" if all you care about is learning C with fast compiles. Perhaps CC386, LCC-DJ, EiC, PicoC, TCC, OpenWatcom, etc. http://www.detlefreimers.de/eic-dos.zip