Mail Archives: djgpp/1996/05/03/17:33:30
Kevin Baca (kbaca AT bluesky DOT skygames DOT com) wrote:
: > : DJGPP is awesome and I have had no problems with it. It also produces
: > : slightly faster code than Watcom on average.
: > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
: >
: > Maybe... but how do I force DJGPP to use register calling convention?
: I see no advantage to this because of the limited number of registers
: on the x86 architecture. Even if you pass parameters in registers
: the compiler will most likely still produce pushes and pops because
: there are many x86 instructions that absolutly require register
: parameters. Therefore I see no net gain.
It is definately a gain. Although certain instructions require specific
registers, that doesn't mean that you necessarily have to push the
contents of it before use. It might already have what you want. Watcom,
for example, will order the use of registers durring calls so that the
info is in the correct register when it get inside the function (as much
as is possible).
Steve
- Raw text -