Calling Conventions

Started by
1 comment, last by DudeMiester 21 years, 5 months ago
Is it possible to make your own calling conventions? If so, how do you do it? In C++ that is. [edited by - dudemiester on November 1, 2002 4:25:18 PM]
[s] [/s]
I can see the fnords.
Advertisement
You''d have to hard code (in assembly) the calling of each function. Also, because of the complexity of C++, each compiler has a different ABI and name mangling scheme. So, you''ll need to find a library to demangle it (GCC comes with libgcc, for example). If you fail to locate one supporting your tools, you''ll have to read a specification of this for your tools. This will most likely also change with each revision of the product.
You can save yourself the de-mangling part by declaring your functions as extern "C".
E8 17 00 42 CE DC D2 DC E4 EA C4 40 CA DA C2 D8 CC 40 CA D0 E8 40E0 CA CA 96 5B B0 16 50 D7 D4 02 B2 02 86 E2 CD 21 58 48 79 F2 C3

This topic is closed to new replies.

Advertisement