Re: FastCode RTL Replacement v0.20 Released!



"Anders Isaksson" <blockcad@xxxxxxxxxxxxxxx> wrote in message
news:434abf62$1@xxxxxxxxxxxxxxxxxxxxxxxxx
> John O'Harrow wrote:
>> "Dennis" <marianndkc@xxxxxxxxxxxxxxx> wrote in message
>> news:434a95bc@xxxxxxxxxxxxxxxxxxxxxxxxx
>>> Hi John
>>>
>>> Does this involve a function pointer and adds one level of
>>> indirection?
>>
>> No, this does not set up a function pointer or add any level of
>> indirection. In fact it adds no code whatsover. The compiler simply
>> maps one functions call address to another.
>
> Don't know about later versions of Delphi, but in D5 this works, but
> generates
>
> call dword ptr [a]
> call dword ptr [b]
> call dword ptr [c]

I have just checked this out in D2005 and you are indeed correct. The
compiler does indeed generate a call dword ptr [xxxxxxx] instead of
call.yyyyyyyy.

Given that, we need to decide whether the extra few cycles (and 1 extra
byte) call overhead justifies having a separate (often identical) routine
for each target in any direct call library.

I still believe this is the correct way to proceed, even if purely for ease
of maintenance. If this minute overhead really matters to a programmer,
they can always call the shared common function directly.

I will delay starting on the updating the Direct Call libraries until a
decision is made.

regards,
John





.



Relevant Pages

  • Re: FastCode RTL Replacement v0.20 Released!
    ... >> Hi John ... >> indirection? ... this does not set up a function pointer or add any level of ... call dword ptr ...
    (borland.public.delphi.language.basm)
  • Re: FastCode RTL Replacement v0.20 Released!
    ... > Hi John ... this does not set up a function pointer or add any level of indirection. ... > library design. ...
    (borland.public.delphi.language.basm)
  • Re: quik popularized by ANSI C
    ... >> dereferencing a function pointer is not exactly meaningful. ... designate the same object with the same number of levels of indirection. ... then 'sizeof fptr' yields the size of the ... As array names do not decay to array pointers, ...
    (comp.lang.c)
  • Re: sbliveos2 & > 2gb RAM?
    ... "CALL DWORD PTR" calls a far routine indirectly through the function pointer saved in the address passed to the call (which is correct since the devhelps use a function pointer) while "CALL FAR PTR" calls a far routine directly, that is, the address passed to the call is the far routine address. ...
    (comp.os.os2.programmer.misc)
  • External structure debugging
    ... Any tips for finding what is presumably a problem of too much or too little indirection? ... I am making progress, ... High on the suspect list is an external structure with fields for a function pointer and void pointer. ... Interestingly, if I set a breakpoint in the callback (specified by the function pointer), there are side effects that become visible, and their limits _might_ be a clue. ...
    (comp.lang.smalltalk.dolphin)