From: Michael Widenius MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <14455.31978.6456.97304@monty.pp.sci.fi> Date: Sat, 8 Jan 2000 20:07:38 +0200 (EET) To: pgcc AT delorie DOT com Subject: pgcc on AMD K6 X-Mailer: VM 6.72 under 21.1 (patch 7) "Biscayne" XEmacs Lucid Reply-To: pgcc AT delorie DOT com Hi! I tried to run a file compiled with the following options on my AMD K6-3 400 Mhz Linux RedHat 6.1 machine: ((/my/monty/master/mysql-3.23.8-alpha/mysys)) /usr/local/pgcc/bin/gcc -v Reading specs from /usr/local/pgcc/lib/gcc-lib/i686-pc-linux-gnu/pgcc-2.95.2/specs gcc version pgcc-2.95.2 19991024 (release) ((/my/monty/master/mysql-3.23.8-alpha/mysys)) /usr/local/pgcc/bin/gcc -I./../include -I../include -I.. -DDBUG_OFF -O6 -mpentiumpro -fomit-frame-pointer -S mf_dirname.c ------- #include "mysys_priv.h" #include uint dirname_part(my_string to, const char *name) { uint length; DBUG_ENTER("dirname_part"); DBUG_PRINT("enter",("'%s'",name)); length=dirname_length(name); (void) strmake(to,(char*) name,min(length,FN_REFLEN-2)); convert_dirname(to); /* Convert chars */ DBUG_RETURN(length); } /* dirname */ ------------- This produced the following output: dirname_part: subl $16,%esp pushl %edi pushl %esi pushl %ebx movl 32(%esp),%edi movl 36(%esp),%esi pushl %eax pushl %eax pushl $58 pushl %esi call strrchr movl %eax,%edx leal -1(%esi),%eax testl %edx,%edx cmove %eax,%edx # <- This doesn't work addl $16,%esp movl %edx,%ecx leal 1(%ecx),%edx .... My K6-III computer crashes with an illegal instruction at the cmove instruction, while my Pentium II computer (running Suse 6.2) works perfectly. I also noticed that I can't start pgcc on the K6-III computer; It also dies with an 'illegal instruction'. Is the cmove instruction not supported by AMD K6 and in this case why is pgcc generating it when one only uses the safe -mcpu instead of the -march=cpu option? Previous versions of pgcc have worked ok on the K6 machine, so something has changed recently. Regards, Monty Moderator of MySQL PS: By the way, I am very impressed with the code pgcc generates for a lot of functions involving longlong:s on Intel; It's a LOT better Codefusion, gcc 2.95.2 or the Fujitsu C++ compiler! Good work!