Mail Archives: djgpp/2000/01/12/20:19:58
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
- Raw text -