I downloaded the Alpha Architecture Handbook, but GAS listings
procuced by GCC contains 'ldgp' instruction which is not
documented . What does this instruction do ?

I could deduce from GCC assembly listing that the calling
convention is the first 6 arguments passed in R16 to R21,
and next ones on the stack. Result is returned in R0.

R30 seams to be the stack pointer
R26 seams to store the return address
I could not find if R27 R28 and R29 have special meanings
(they probably have). Does anyone know ?

I'm also not very sure about which registers a called function
can modify, and which it must preserve.

I need these tricky informations (they are basic but generaly not
documented because most programmers don't need them) because I try
to port Pliant language to the Alpha, and it's a dynamic compiler,
so it contains a code generator, so it has to know the details of
GCC calling convention on the Alpha in order to preperly call glibc
low level functions and the ones in the C part of Pliant.

Thanks for any help,
Hubert Tonneau

Reply via email to