This is the mail archive of the gcc-help@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]

varargs


I have a printf() function written in C using va_start, va_arg, etc. It works fine on i386. Lately, i needed it on my amd64 machine. However, although it builds, it does not work.

After reading the x86_64 ABI, i found out that on amd64 each function's args are moved to specific registers and not to the stack (like on i386).

Do i need to do something extra to use varargs functions on x86_64?

Thanks,
Constantine

PS I'm using gcc-4.1.3.


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