Peter Gerwinski peter@agnes.dida.physik.uni-essen.de wrote:
According to Frank Heckenbach:
I declared all eax, ebx, ecx, edx, esi and edi as clobbered. Do I need
more?
(ebp? What about segment registers, anyway?)
I think if you include `ebp' you are safe. However you should better look up the register usage from a suitable book whenever you invoke a certain interrupt. This improves performance.
TAKE CARE!!! If you don't use -fomit-frame-pointer your code DON'T WORK!!! This because EBP is always used as stack pointer, also if you declare this as clobbered: then if you modify EBP your local variable offsets is WrOnG!!
Btw ES, DS, GS, FS, SS cannot be restored by the compiler. You must do this from yourself.....
Cya PrZ.