Contents|Index|Previous|Next
 Constraints for particular machines   

Whenever possible, you should use the general-purpose constraint letters in asm arguments, since they will convey meaning more readily to people reading your code. Failing that, use the constraint letters that usually have very similar meanings across architectures. The most commonly used constraints are ‘m’ and ‘r’ (for memory and general-purpose registers respectively; see Simple constraints) and ‘I’, usually the letter indicating the most common immediate-constant format. For each machine architecture, the config/machine.h file defines additional constraints. These constraints are used by the compiler itself for instruction generation, as well as for asm statements; therefore, some of the constraints are not particularly interesting for asm.

The constraints are defined through the following macros.

Inspecting these macro definitions in the compiler source for your machine is the best way to be certain you have the right constraints. However, see the following summary of the machine-dependent constraints available on some particular machines. ARM family—arm.h AMD 29000 family—a29k.h IBM RS6000—rs6000.h Intel 386—i386.h Intel 960—i960.h MIPS—mips.h Motorola 680x0—m68k.h SPARC—sparc.h

Top|Contents|Index|Previous|Next