http://bugs.winehq.org/show_bug.cgi?id=16127
--- Comment #6 from Juan Lang juan_lang@yahoo.com 2010-06-22 12:33:07 --- (In reply to comment #5)
In Windows the return value is in eax but in Wine the return value is in ax (only); eax is *not* guaranteed to contain the sign-extended version of what's in ax. This appears to have changed only in a recent version of Wine (it may depend on how the compiler handles a return type of SHORT).
Okay, that's interesting. Are you sure it's changed in Wine? If so, a regression test might be of use. It might also be due to a change in gcc behavior: have you changed gcc versions while changing Wine versions?