Mail Archives: djgpp/2012/03/18/18:15:18
Hi again,
On Mar 14, 9:52 pm, Rugxulo <rugx DOT DOT DOT AT gmail DOT com> wrote:
>
> On Mar 14, 1:16 pm, Andris Pavenis <andris DOT pave DOT DOT DOT AT iki DOT fi> 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
- Raw text -