Skip to contentSkip to conversation

Assembly language conventions

parisc-linux David Wragg 2 participants 2 messages Apr 8, 2001

lore
Share & tools
lore
#0 lore raw

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. If there is an appropriate document, could a link be added to the technical documents web page.

David Wragg

#1 lore raw
Quoted 7 lines · David Wragg

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