I think there might be a problem with code for indirect calls:
int *pcptr; /* global */ /* Details from much larger code */
stopped=0;
do {
((void(*)(void))*pcptr)();
} while (!stopped);
pcptr usually (99.9%) points to a location containing the address of one
of
two functions, both identical to this:
void pushm {
pcptr += 2;
}
Lccwin generates something like this for the indirect call (in NASM
syntax):
mov eax,[pcptr]
call [eax]
But gcc generates longer code something like:
mov eax,[pcptr]
mov eax,[eax]
call eax
The problem is, the lccwin code take about 3 times longer! For 50m
iterations on my slow machine, about 2400ms for lccwin and about 00ms for
gcc.
I've tried putting in the longer code as inline asm() instructions, and on
a
real test where lccwin32 had been 60% slower than gcc, with this new call,
it was about the same speed as gcc!
--
Bart


|