Hi to all!
I have something like this:
class FWrap {
public:
virtual void READ (void) = 0;
}
class Optimized {
private:
FWrap* FFile;
public:
void Calc (void);
}
I need to optimize Calc routine as much as I can because it is called
billion of times. In Calc function I must call FFile->READ () within
assembler code.
I have something like this now ...
void Calc (void)
{
__asm {
MOV EAX, &this // I get cell address which contain
'this' address
MOV EBX, [EAX] // Now I have 'this' address in EBX
MOV ECX, [EBX].FFile // Cell address which contain 'FFile'
address
MOV EBX, [ECX] // Now EBX contain 'FFile' address (EBX
= PIC)
...
???
}
}
Now I must call READ with something like "CALL DWORD PTR [EBX + ADDRESS
OF READ]" but I have no Idea how I can get the right offset READ
function.
I've tried FWrap::READ, FFile.READ and so on ... but I can't figure out
how I can call the right function address.
Is vital for me to create a function made of asm at 100%
Anyone can help me?