Peter Gerwinski wrote:
Fixed.
:-)
Fixed.
:-)
Another thing I observed when looking at the asm code (see above) was that the i386 backend doesn't seem to know the "push mem" instruction.
[...]
Probably. However if you want to try yourself on that problem, look into the GCC info documentation, and read about "machine descriptions". There is something about how to describe each instruction a processor has, and maybe it's a trivial error and somebody overlooked this instruction.
I looked at i386.h and i386.md, and it seems like there isn't even a way to push anything but registers and constants... ?-(
Or else: Loading the memory reference into a register and pushing that *might* be faster than a direct push (don't know).
That might be a reason. But I don't know, either. I would suppose not -- why should the extra loading a register be faster? I tried some ways to measure the actual time (system clock, ps, /proc/..., even gprof), but they were all terribly inaccurate (+/- 5..10%), so there's no chance to check which is faster. :-( Anyone knows a way to measure runtime presicsely (Linux or DJGPP)?
Jan-Jaap van der Heijden wrote:
unsigned-rel = digit-sequence `.' fractional-part [ `e' scale factor ] | digits-sequence `e' scale factor [...] I see a simular definition in my Turbo pascal Programmer's Guide, so BP should not accept it either.
The BP handbook says (Fig. 2.3, at least in the German version):
unsigned real value (as above)
unsigned numerical value = unsigned integer | unsigned real value
This looks reasonable to me.
17-Jun-97 16:11 Frank Heckenbach wrote:
Or else: Loading the memory reference into a register and pushing that *might* be faster than a direct push (don't know).
That might be a reason. But I don't know, either. I would suppose not -- why should the extra loading a register be faster? I tried some ways to measure the actual time (system clock, ps, /proc/..., even gprof), but they were all terribly inaccurate (+/- 5..10%), so there's no chance to check which is faster. :-( Anyone knows a way to measure runtime presicsely (Linux or DJGPP)?
I'm not an expert in Pentium optimizing, but I have seen somewhere that mov reg, mem push reg is faster than push mem on a 486 and can be paired better on Pentium. I've seen it in one of the texts about Pentium optimization at http://www.quantasm.com. I think it was called 'Pentium(r) Optimization Cross-Reference by Instruction'.
-- Marius Gedminas E-mail: mgedmin@pub.osf.lt WWW: http://www-public.osf.lt/~mgedmin