FLHook SVN discussion
-
Yes. this sounds all nice, however since there also is stated:
However, using these registers will affect code quality because the register allocator cannot use them to store values across __asm blocks. In addition, by using EBX, ESI or EDI in inline assembly code, you force the compiler to save and restore those registers in the function prologue and epilogue.
The compiler seems to analyse the inline asm code, which ofc does not work when doing external calls. For example the second function uses edi, but the compiler never saves it before and after the asm block (i’ve checked with IDA), but reads it later.
Notice, that I still am not quite sure how to interpret the text exactly. I’ve checked the generated assembly code of such blocks some time ago and came to the conclusion that it is not quite clear how save it is, since it is very time consuming to check all the cases.