1 The following information has been taken from Dr. Ulrich Weigand's SHARE 100
2 presentation: "The GNU Compiler Collection on zSeries", as well as from
3 "Using the GNU Compiler Collection" [1,2]. Some modifications have been made
4 to follow the HVF coding conventions.
6 Syntax of "asm" construct
7 =========================
13 : <clobber statements>
19 - string passed to the assembler
20 - may contain operand placeholders %0, %1, ...
21 - registers specified as %%r0, %%r1, ...
26 - specify registers changed by template: "r0", "r1", ...
27 - special clobbers: "cc" (condition code), "memory"
35 "<constraints>" (<expression>)
38 "a" address register (general purpose register except r0)
39 "c" condition code register
40 "d" data register (arbitrary general purpose register)
41 "f" floating-point register
42 "I" unsigned 8-bit constant (0..255)
43 "i" an immediate integer operand (one with constant value) is allowed.
44 This includes symbolic constants whose values will be known only at
45 assembly time or later.
46 "J" unsigned 12-bit constant (0..4095)
47 "K" signed 16-bit constant (-32768..32767)
48 "L" value appropriate as displacement.
49 (0..4095) for short displacement
50 (-524288..524287) for long displacement
51 "M" constant integer with a value of 0x7fffffff.
52 "m" a memory operand is allowed, with any kind of address that the
53 machine supports in general.
55 "N" multiple letter constraint followed by 4 parameter letters.
56 0..9: number of the part counting from most to least significant
58 D,S,H: mode of the containing operand
59 0,F: value of the other parts (F-all bits set)
60 the constraint matches if the specified part of a constant has a
61 value different from it's other parts.
62 "Q" memory reference without index register and with short displacement.
63 "R" memory reference with index register and short displacement.
64 "S" memory reference without index register but with long displacement.
65 "T" memory reference with index register and long displacement.
66 "U" pointer with short displacement.
67 "W" pointer with long displacement.
68 "Y" shift count operand.
70 (most useful being: "d" "f" "a" "m" "Q" "i")
72 - constraint modifier characters:
73 "=" write-only output operand
74 "+" read-write output operand
75 "&" operand modified before all inputs are processed
81 - simple register constraint
89 - simple memory constraint
133 [1] http://gcc.gnu.org/onlinedocs/gcc-4.2.2/gcc/Simple-Constraints.html
134 [2] http://gcc.gnu.org/onlinedocs/gcc-4.2.2/gcc/Machine-Constraints.html