Some notes on x86-32 assembler

All assembly kernels presently in ATLAS utilize gcc for compilation. This is because gcc is required by the architectural defaults for all x86 archs, and is freely and widely available. Gcc/gas uses an AT&T style assembler syntax, which may be a bit confusing for people used to the MASM/NASM style. People tend to talk like this is a big deal, but I learned x86 assembler from a MASM-style book, and was working in AT&T immediately. The main difference is that MASM has a style of DEST, SOURCE, while AT&T uses SOURCE, DEST. For concise description of MASM/AT&T differences, scope:

There are numerous examples of CPP-augmented assembler in ATLAS's kernels. Look in the relavant description file (eg., ATLAS/tune/blas/gemm/dcases.SSE,
ATLAS/tune/blas/level1/IAMAX/dcases.dsc, etc.), and any kernel that mandates gcc as the compiler, with the flags of -x assembler-with-cpp is an example.

A x86-32 assembler kernel should contain the following CPP lines at the beginning of the file:

#ifndef ATL_GAS_x8632
   #error "This kernel requires gas x86-32 assembler!"
This quick error exit keeps a non-x86-32 assembler from generating hundreds or thousands of spurious error messages during install.

Clint Whaley 2012-07-10