PDA

View Full Version : __stdcall uses EAX?


Maximus
June 16th, 2010, 05:53
...since when a global function decorated with __stdcall can use EAX for passing a parameter??
(i have found a __stdcall func(a,b,c,d) and its call moves 1 parameter in EAX, and push the other 3... )

Darkelf
June 16th, 2010, 08:47
Hi,

I know this can be done with gcc. Maybe the program was compiled in an cygwin environment. Have a look here:

http://gcc.gnu.org/onlinedocs/gccint/Register-Arguments.html

I'm not sure if that's what you're looking for, but give it a go.

Regards
darkelf

reverser
June 16th, 2010, 16:55
Quote:
[Originally Posted by Maximus;86910]...since when a global function decorated with __stdcall can use EAX for passing a parameter??
(i have found a __stdcall func(a,b,c,d) and its call moves 1 parameter in EAX, and push the other 3... )

Lemme guess, LTCG is on?

Maximus
June 16th, 2010, 17:29
damn you guessed right ^^

what leaves me without words is - if I **decorate** explicitly a function, it means that i want it that way.

I am very tired to fight the linker internals...