C Register Registration Agreements

Where can I find documentation on registers whose assembly should be preserved when calling function C?

+3
source share
6 answers

Dr Agner Fogs Optimization Guides provide an excellent side-by-side list of all common systems and compiler conventions (ABIs) for 32 and 64 bits. They also contain a lot of other useful information, you can get them here: http://www.agner.org/optimize/

+2
source

What you want is your binary C C. Google application interface for “C ABI” and your architecture, and you will find it. For example, here is one for sparc and here is the corresponding bit for AVR.

+4

ABI (Application Binary Interface). ? .

: Google ABI x86_64 linux, 64- Linux-.

+4

, CDECL. , , "", , - %eax, %ecx %edx. .

, , . , .

0

This is largely characteristic of architecture. Look at the Wikipedia explanation for beginners.

http://en.wikipedia.org/wiki/Calling_convention

0
source

All Articles