Message-Id: <200001131122.FAA14002@lakdiva.slt.lk> From: "Kalum Somaratna aka Grendel" To: djgpp AT delorie DOT com Date: Thu, 13 Jan 2000 05:22:25 +0600 MIME-Version: 1.0 Content-type: text/plain; charset=US-ASCII Content-transfer-encoding: 7BIT Subject: Re: amd processors and assembly language In-reply-to: <387CB637.77A70DC0@slu.edu> X-mailer: Pegasus Mail for Win32 (v3.12) Reply-To: djgpp AT delorie DOT com Errors-To: dj-admin AT delorie DOT com X-Mailing-List: djgpp AT delorie DOT com X-Unsubscribes-To: listserv AT delorie DOT com Precedence: bulk On 12 Jan 00, at 11:13, John L. Gammel wrote: > Thanks for the information that assembly language for amd processors > is more or less identical to the instruction set for the Intel 486 > architecture. The trouble I have encountered is this: A friend has > recently downloaded the djgpp package (I have been using mine for more > than 1 year) and tried to compile some of my source codes. He has an > AMD processor. It all went ok except when compiling my codes using > assembly language. That also went ok except when using the -O2 > optimization switch (gxx codename.cc -o codename.exe -O2). Strangely > enough, the executable crashed in that case. This maybe a compiler bug. Do you Still have the source code by any chance. If so could you please post it. BTW Did this executable run on Non AMD (Intel) CPU's > Also, we noted that the > codes ran (on the machine with an AMD processor) as fast without the > -O2 switch as we thought they would with the -O2 chip (as though > optimization was not necessary with the AMD processor). That may be because the AMD (especially the K7)is a RISC chip. It can "optimize/reduce" unoptimized code to optimized version before executing. > My question is: does anyone have similar experience? And what > are > the > optimization switches for the AMD processor?. > BW What is your AMD cpu. Is it a K6 or that super King of the x86 chip's, the ATHLON (blazingly fast it beats every x86 intel can produce, it's speed is like linux vs windoze) . Anyway I use the -O3 and -fomit-frame-pointer switches which enable full optimization. But you might be a bit careful with asking the compiler to perform inline optimizations as heavily inlined code may overflow the CPU cache and lead to unnecessary slowdowns. Take Care, Kalum