Link to home
Start Free TrialLog in
Avatar of Posit
Posit

asked on

freezing then modifying a member function's generated assembly

I'm hoping there is an easy way to freeze a member function's generated assembly (using VC++ 6.0) and then modify it inline without the compiler generating more instructions. When I take the assembly instructions the compiler first generates for a function and place them more or less verbatim inside an _asm block within that function, the compiler keeps adding more instructions before and after the _asm block.
 
bool classname::operator>(classname& x)
{
   _asm
  {
     //all the assembly instructions of the old function
  }
}

The compiler adds extra pushes and pops before and after the _asm block.

Is there a way to tell the compiler not to add any instructions before and after the _asm block here?
ASKER CERTIFIED SOLUTION
Avatar of jkr
jkr
Flag of Germany image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Posit
Posit

ASKER

Great, exactly what I was looking for. Works like a charm.