> That's quite different from the Unix calling conventions on i386, where > only EAX, ECX and EDX are call-clobbered.
I was wrong wrt the MSVC calling conventions. MSDN docs say: All arguments are widened to 32 bits when they are passed. Return values are also widened to 32 bits and returned in the EAX register, except for 8-byte structures, which are returned in the EDX:EAX register pair. Larger structures are returned in the EAX register as pointers to hidden return structures. Parameters are pushed onto the stack from right to left. The compiler generates prolog and epilog code to save and restore the ESI, EDI, EBX, and EBP registers, if they are used in the function. so it seems it's the same calling convention than on i386 Unixes: EAX and EDX can be clobbered to return the function's result, and ECX because it is not saved. > That appears like a blatant bug in the compiler if it cannot properly > track call-clobbered registers. There's a bug somewhere, that's pretty clear. Whether that's an error of the MSVC compiler or the MinGW libraries, I'm not sure yet. I've been tracing lookup_image, and the fact is, the lookup_image code is using EBX to cache "spec", and rightly so. But the call to tiff_load (via img->type->load()) clobbers EBX! -- /L/e/k/t/u _______________________________________________ Emacs-devel mailing list Emacs-devel@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-devel