Some notes on using assembly

This appendix contains useful information for people wanting to supply assembly kernels. Presently, ATLAS config detects seven styles of assembler, all using gnu's gcc/gas:
  1. x86-32: Classic x86 assembler (AT&T syntax)
  2. x86-64: Assembler for 64-bit mode of x86-64 (AT&T syntax).
  3. Sparc: Sparc assembler.
  4. OS X PowerPC: PowerPC assembly using OS X's ABI.
  5. Linux PowerPC: PowerPC assembly using Linux's ABI.
  6. HP-UX PA-RISC: PA-RISC assembly using HP-UX's commands.
  7. Linux PA-RISC: PA-RISC assembly using Linux's commands.

The following sections give some hints that may be helpful in writing assembly for each of these variants. One trick to keep in mind, when you are unsure of syntax or how to do something, is to write the code in C, and use gcc to convert your C implementation to assembler (gcc -S), and see how gcc does it.



Subsections

Clint Whaley 2012-07-10