[Bug target/34001] Incorrect x86 fastcall behavior

hjl at lucon dot org gcc-bugzilla@gcc.gnu.org
Mon Nov 12 03:27:00 GMT 2007



------- Comment #4 from hjl at lucon dot org  2007-11-12 03:27 -------
>From "info gcc",

`fastcall'
     On the Intel 386, the `fastcall' attribute causes the compiler to
     pass the first argument (if of integral type) in the register ECX
                              ^^^^^^^^^^^^^^^^^^^
     and the second argument (if of integral type) in the register EDX.
                              ^^^^^^^^^^^^^^^^^^^
     Subsequent and other typed arguments are passed on the stack.
     The called function will pop the arguments off the stack.  If the
     number of arguments is variable all arguments are pushed on the
     stack.

It looks like gcc document follows MS compiler and we didn't implement
it correctly.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=34001



More information about the Gcc-bugs mailing list