This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug target/34001] Incorrect x86 fastcall behavior



------- 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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]