[fpc-pascal] Registers used by calling conventions

silvioprog silvioprog at gmail.com
Fri Mar 8 22:58:04 CET 2019

On Fri, Mar 8, 2019 at 6:34 PM Anthony Walter <sysrpl at gmail.com> wrote:

> What registers are used by default calling convention and where can I find
> more information about Free Pascal asm details?

For linux64 the default C.C is sysv x64. Some links with info you are
looking for:

1. https://bugs.freepascal.org/view.php?id=34743 (a low-level
Delphi-like invoke() almost done for Linux x86_64)
2. https://www3.nd.edu/~dthain/courses/cse40243/fall2017/intel-intro.html
(Introduction to X86-64 Assembly for Compiler Writers)
3. https://www.uclibc.org/docs/psABI-x86_64.pdf (System V ABI [AMD64])
4. https://wiki.osdev.org/System_V_ABI (some related links)


> Also is it possible to get the Lazarus assembler to show instructions in
> Intel mode rather than AT&T?

Yes, just change the $asmmode to the syntax you want, e.g {$asmmode intel}.

Silvio Cl├ęcio
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freepascal.org/pipermail/fpc-pascal/attachments/20190308/d43483e8/attachment.html>

More information about the fpc-pascal mailing list