[parisc-linux] Assembly language conventions

Alan Modra alan@linuxcare.com.au
Sun, 8 Apr 2001 23:24:56 +1000 (EST)


On 8 Apr 2001, David Wragg wrote:

> Where should I look for details of the assembly language conventions
> used on linux/PARISC (calling conventions, register uses, sequences
> for putting a 32-bit constant into a register, PIC conventions, etc.)?
> 
> The nearest thing I have found is
> <http://devresource.hp.com/STK/toc_ref_details.html#32runtime11>, but
> I'm not sure how much of that carries over to the Linux port.

Most of it regarding register usage and calling conventions.  Some
differences that spring to mind:

o  pa-linux sets all space regs the same (so simpler import stubs for
   shared libs can be used, and export stubs aren't necessary)
o  pa-linux doesn't support argument relocation stubs.  Compile with
   prototypes!
o  section names follow standard ELF naming.

If you want to learn tricks of assembly language programming on parisc,
like loading a 32 bit constant into a reg, take a look at gcc -S
output.  gcc is useful for finding details of calling conventions too.

Alan