Next:Disable insn alternatives using theenabled attribute, Previous:Constraint Modifier Characters, Up:Operand Constraints [Contents][Index]
Whenever possible, you should use the general-purpose constraint lettersinasm arguments, since they will convey meaning more readily topeople reading your code. Failing that, use the constraint lettersthat usually have very similar meanings across architectures. The mostcommonly used constraints are ‘m’ and ‘r’ (for memory andgeneral-purpose registers respectively; seeSimple Constraints), and‘I’, usually the letter indicating the most commonimmediate-constant format.
Each architecture defines additional constraints. These constraintsare used by the compiler itself for instruction generation, as well asforasm statements; therefore, some of the constraints are notparticularly useful forasm. Here is a summary of some of themachine-dependent constraints available on some particular machines;it includes both constraints that are useful forasm andconstraints that aren’t. The compiler source file mentioned in thetable heading for each architecture is the definitive reference forthe meanings of that architecture’s constraints.
kThe stack pointer register (SP)
wFloating point register, Advanced SIMD vector register or SVE vector register
xLikew, but restricted to registers 0 to 15 inclusive.
yLikew, but restricted to registers 0 to 7 inclusive.
UplOne of the low eight SVE predicate registers (P0 toP7)
UpaAny of the SVE predicate registers (P0 toP15)
IInteger constant that is valid as an immediate operand in anADDinstruction
JInteger constant that is valid as an immediate operand in aSUBinstruction (once negated)
KInteger constant that can be used with a 32-bit logical instruction
LInteger constant that can be used with a 64-bit logical instruction
MInteger constant that is valid as an immediate operand in a 32-bitMOVpseudo instruction. TheMOV may be assembled to one of several differentmachine instructions depending on the value
NInteger constant that is valid as an immediate operand in a 64-bitMOVpseudo instruction
SAn absolute symbolic address or a label reference
YFloating point constant zero
ZInteger constant zero
UshThe high part (bits 12 and upwards) of the pc-relative address of a symbolwithin 4GB of the instruction
QA memory address which uses a single base register with no offset
UmpA memory address suitable for a load/store pair instruction in SI, DI, SF andDF modes
IImmediate integer in the range −16 to 64
JImmediate 16-bit signed integer
KfImmediate constant −1
LImmediate 15-bit unsigned integer
AImmediate constant that can be inlined in an instruction encoding: integer−16..64, or float 0.0, +/−0.5, +/−1.0, +/−2.0,+/−4.0, 1.0/(2.0*PI)
BImmediate 32-bit signed integer that can be attached to an instruction encoding
CImmediate 32-bit integer in range −16..4294967295 (i.e. 32-bit unsignedinteger or ‘A’ constraint)
DAImmediate 64-bit constant that can be split into two ‘A’ constants
DBImmediate 64-bit constant that can be split into two ‘B’ constants
UAnyunspec
YAnysymbol_ref orlabel_ref
vVGPR register
aAccelerator VGPR register (CDNA1 onwards)
SgSGPR register
SDSGPR registers valid for instruction destinations, including VCC, M0 and EXEC
SSSGPR registers valid for instruction sources, including VCC, M0, EXEC and SCC
SmSGPR registers valid as a source for scalar memory instructions (excludes M0and EXEC)
SvSGPR registers valid as a source or destination for vector instructions(excludes EXEC)
caAll condition registers: SCC, VCCZ, EXECZ
csScalar condition register: SCC
cVVector condition register: VCC, VCC_LO, VCC_HI
eEXEC register (EXEC_LO and EXEC_HI)
RBMemory operand with address space suitable forbuffer_* instructions
RFMemory operand with address space suitable forflat_* instructions
RSMemory operand with address space suitable fors_* instructions
RLMemory operand with address space suitable fords_* LDS instructions
RGMemory operand with address space suitable fords_* GDS instructions
RDMemory operand with address space suitable for anyds_* instructions
RMMemory operand with address space suitable forglobal_* instructions
qRegisters usable in ARCompact 16-bit instructions:r0-r3,r12-r15. This constraint can only match when the-mqoption is in effect.
eRegisters usable as base-regs of memory addresses in ARCompact 16-bit memoryinstructions:r0-r3,r12-r15,sp.This constraint can only match when the-mqoption is in effect.
DARC FPX (dpfp) 64-bit registers.D0,D1.
IA signed 12-bit integer constant.
Calconstant for arithmetic/logical operations. This might be any constantthat can be put into a long immediate by the assmbler or linker withoutinvolving a PIC relocation.
KA 3-bit unsigned integer constant.
LA 6-bit unsigned integer constant.
CnLOne’s complement of a 6-bit unsigned integer constant.
CmLTwo’s complement of a 6-bit unsigned integer constant.
MA 5-bit unsigned integer constant.
OA 7-bit unsigned integer constant.
PA 8-bit unsigned integer constant.
HAny const_double value.
hIn Thumb state, the core registersr8-r15.
kThe stack pointer register.
lIn Thumb State the core registersr0-r7. In ARM state thisis an alias for ther constraint.
tVFP floating-point registerss0-s31. Used for 32 bit values.
wVFP floating-point registersd0-d31 and the appropriatesubsetd0-d15 based on command line options.Used for 64 bit values only. Not valid for Thumb1.
GThe floating-point constant 0.0
IInteger that is valid as an immediate operand in a data processinginstruction. That is, an integer in the range 0 to 255 rotated by amultiple of 2
JInteger in the range −4095 to 4095
KInteger that satisfies constraint ‘I’ when inverted (ones complement)
LInteger that satisfies constraint ‘I’ when negated (twos complement)
MInteger in the range 0 to 32
QA memory reference where the exact address is in a single register(‘‘m’’ is preferable forasm statements)
RAn item in the constant pool
SA symbol in the text segment of the current file
UvA memory reference suitable for VFP load/store insns (reg+constant offset)
UqA memory reference suitable for the ARMv4 ldrsb instruction.
lRegisters from r0 to r15
aRegisters from r16 to r23
dRegisters from r16 to r31
wRegisters from r24 to r31. These registers can be used in ‘adiw’ command
ePointer register (r26–r31)
bBase pointer register (r28–r31)
qStack pointer register (SPH:SPL)
tTemporary register r0
xRegister pair X (r27:r26)
yRegister pair Y (r29:r28)
zRegister pair Z (r31:r30)
IConstant greater than −1, less than 64
JConstant greater than −64, less than 1
KConstant integer 2
LConstant integer 0
MConstant that fits in 8 bits
NConstant integer −1
OConstant integer 8, 16, or 24
PConstant integer 1
GA floating point constant 0.0
QA memory address based on Y or Z pointer with displacement.
aP register
dD register
zA call clobbered P register.
qnA single register. Ifn is in the range 0 to 7, the corresponding Dregister. If it isA, then the register P0.
DEven-numbered D register
WOdd-numbered D register
eAccumulator register.
AEven-numbered accumulator register.
BOdd-numbered accumulator register.
bI register
vB register
fM register
cRegisters used for circular buffering, i.e. I, B, or L registers.
CThe CC register.
tLT0 or LT1.
kLC0 or LC1.
uLB0 or LB1.
xAny D, P, B, M, I or L register.
yAdditional registers typically used only in prologues and epilogues: RETS,RETN, RETI, RETX, RETE, ASTAT, SEQSTAT and USP.
wAny register except accumulators or CC.
KshSigned 16 bit integer (in the range −32768 to 32767)
KuhUnsigned 16 bit integer (in the range 0 to 65535)
Ks7Signed 7 bit integer (in the range −64 to 63)
Ku7Unsigned 7 bit integer (in the range 0 to 127)
Ku5Unsigned 5 bit integer (in the range 0 to 31)
Ks4Signed 4 bit integer (in the range −8 to 7)
Ks3Signed 3 bit integer (in the range −3 to 4)
Ku3Unsigned 3 bit integer (in the range 0 to 7)
PnConstantn, wheren is a single-digit constant in the range 0 to 4.
PAAn integer equal to one of the MACFLAG_XXX constants that is suitable foruse with either accumulator.
PBAn integer equal to one of the MACFLAG_XXX constants that is suitable foruse only with accumulator A1.
M1Constant 255.
M2Constant 65535.
JAn integer constant with exactly a single bit set.
LAn integer constant with all bits set except exactly one.
HQAny SYMBOL_REF.
aThe mini registers r0 - r7.
bThe low registers r0 - r15.
cC register.
yHI and LO registers.
lLO register.
hHI register.
vVector registers.
zStack pointer register (SP).
QA memory address which uses a base register with a short offsetor with a index register with its scale.
WA memory address which uses a base register with a index registerwith its scale.
The C-SKY back end supports a large set of additional constraintsthat are only useful for instruction selection or splitting ratherthan inline asm, such as constraints representing constant integerranges accepted by particular instruction encodings.Refer to the source code for details.
U16An unsigned 16-bit constant.
KAn unsigned 5-bit constant.
LA signed 11-bit constant.
Cm1A signed 11-bit constant added to −1.Can only match when the-m1reg-reg option is active.
Cl1Left-shift of −1, i.e., a bit mask with a block of leading ones, the restbeing a block of trailing zeroes.Can only match when the-m1reg-reg option is active.
Cr1Right-shift of −1, i.e., a bit mask with a trailing block of ones, therest being zeroes. Or to put it another way, one less than a power of two.Can only match when the-m1reg-reg option is active.
CalConstant for arithmetic/logical operations.This is likei, except that for position independent code,no symbols / expressions needing relocations are allowed.
CsySymbolic constant for call/jump instruction.
RcsThe register class usable in short insns. This is a register classconstraint, and can thus drive register allocation.This constraint won’t match unless-mprefer-short-insn-regs isin effect.
RscThe register class of registers that can be used to hold asibcall call address. I.e., a caller-saved register.
RctCore control register class.
RgsThe register group usable in short insns.This constraint does not use a register class, so that it onlypassively matches suitable registers, and doesn’t drive register allocation.
CarConstant suitable for the addsi3_r pattern. This is a valid offsetFor byte, halfword, or word addressing.
RraMatches the return address if it can be replaced with the link register.
RccMatches the integer condition code register.
SraMatches the return address if it is in a stack slot.
CfmMatches control register values to switch fp mode, which are encapsulated inUNSPEC_FP_MODE.
aRegister in the classACC_REGS (acc0 toacc7).
bRegister in the classEVEN_ACC_REGS (acc0 toacc7).
cRegister in the classCC_REGS (fcc0 tofcc3 andicc0 toicc3).
dRegister in the classGPR_REGS (gr0 togr63).
eRegister in the classEVEN_REGS (gr0 togr63).Odd registers are excluded not in the class but through the use of a machinemode larger than 4 bytes.
fRegister in the classFPR_REGS (fr0 tofr63).
hRegister in the classFEVEN_REGS (fr0 tofr63).Odd registers are excluded not in the class but through the use of a machinemode larger than 4 bytes.
lRegister in the classLR_REG (thelr register).
qRegister in the classQUAD_REGS (gr2 togr63).Register numbers not divisible by 4 are excluded not in the class but throughthe use of a machine mode larger than 8 bytes.
tRegister in the classICC_REGS (icc0 toicc3).
uRegister in the classFCC_REGS (fcc0 tofcc3).
vRegister in the classICR_REGS (cc4 tocc7).
wRegister in the classFCR_REGS (cc0 tocc3).
xRegister in the classQUAD_FPR_REGS (fr0 tofr63).Register numbers not divisible by 4 are excluded not in the class but throughthe use of a machine mode larger than 8 bytes.
zRegister in the classSPR_REGS (lcr andlr).
ARegister in the classQUAD_ACC_REGS (acc0 toacc7).
BRegister in the classACCG_REGS (accg0 toaccg7).
CRegister in the classCR_REGS (cc0 tocc7).
GFloating point constant zero
I6-bit signed integer constant
J10-bit signed integer constant
L16-bit signed integer constant
M16-bit unsigned integer constant
N12-bit signed integer constant that is negative—i.e. in therange of −2048 to −1
OConstant zero
P12-bit signed integer constant that is greater than zero—i.e. in therange of 1 to 2047.
AAn absolute address
BAn offset address
WA register indirect memory operand
eAn offset address.
fAn offset address.
OThe constant zero or one
IA 16-bit signed constant (−32768 … 32767)
wA bitfield mask suitable for bext or bins
xAn inverted bitfield mask suitable for bext or bins
LA 16-bit unsigned constant, multiple of 4 (0 … 65532)
SA 20-bit signed constant (−524288 … 524287)
bA constant for a bitfield width (1 … 16)
KAA 10-bit signed constant (−512 … 511)
aGeneral register 1
fFloating point register
qShift amount register
xFloating point register (deprecated)
yUpper floating point register (32-bit), floating point register (64-bit)
ZAny register
ISigned 11-bit integer constant
JSigned 14-bit integer constant
KInteger constant that can be deposited with azdepi instruction
LSigned 5-bit integer constant
MInteger constant 0
NInteger constant that can be loaded with aldil instruction
OInteger constant whose value plus one is a power of 2
PInteger constant that can be used forand operations indepiandextru instructions
SInteger constant 31
UInteger constant 63
GFloating-point constant 0.0
AAlo_sum data-linkage-table memory operand
QA memory operand that can be used as the destination operand of aninteger store instruction
RA scaled or unscaled indexed memory operand
TA memory operand for floating-point loads and stores
WA register indirect memory operand
aGeneral registerr0 tor3 foraddl instruction
bBranch register
cPredicate register (‘c’ as in “conditional”)
dApplication register residing in M-unit
eApplication register residing in I-unit
fFloating-point register
mMemory operand. If used together with ‘<’ or ‘>’,the operand can have postincrement and postdecrement whichrequire printing with ‘%Pn’ on IA-64.
GFloating-point constant 0.0 or 1.0
I14-bit signed integer constant
J22-bit signed integer constant
K8-bit signed integer constant for logical instructions
L8-bit adjusted signed integer constant for compare pseudo-ops
M6-bit unsigned integer constant for shift counts
N9-bit signed integer constant for load and store postincrements
OThe constant zero
P0 or −1 fordep instruction
QNon-volatile memory for floating-point loads and stores
RInteger constant in the range 1 to 4 forshladd instruction
SMemory operand except postincrement and postdecrement. This isnow roughly the same as ‘m’ when not used together with ‘<’or ‘>’.
RspRfbRsb‘$sp’, ‘$fb’, ‘$sb’.
RcrAny control register, when they’re 16 bits wide (nothing if controlregisters are 24 bits wide)
RclAny control register, when they’re 24 bits wide.
R0wR1wR2wR3w$r0, $r1, $r2, $r3.
R02$r0 or $r2, or $r2r0 for 32 bit values.
R13$r1 or $r3, or $r3r1 for 32 bit values.
RdiA register that can hold a 64 bit value.
Rhl$r0 or $r1 (registers with addressable high/low bytes)
R23$r2 or $r3
RaaAddress registers
RawAddress registers when they’re 16 bits wide.
RalAddress registers when they’re 24 bits wide.
RqiRegisters that can hold QI values.
RadRegisters that can be used with displacements ($a0, $a1, $sb).
RsiRegisters that can hold 32 bit values.
RhiRegisters that can hold 16 bit values.
RhcRegisters chat can hold 16 bit values, including all controlregisters.
Rra$r0 through R1, plus $a0 and $a1.
RflThe flags register.
RmmThe memory-based pseudo-registers $mem0 through $mem15.
RpiRegisters that can hold pointers (16 bit registers for r8c, m16c; 24bit registers for m32cm, m32c).
RpaMatches multiple registers in a PARALLEL to form a larger register.Used to match function return values.
Is3−8 … 7
IS1−128 … 127
IS2−32768 … 32767
IU20 … 65535
In4−8 … −1 or 1 … 8
In5−16 … −1 or 1 … 16
In6−32 … −1 or 1 … 32
IM2−65536 … −1
IlbAn 8 bit value with exactly one bit set.
IlwA 16 bit value with exactly one bit set.
SdThe common src/dest memory addressing modes.
SaMemory addressed using $a0 or $a1.
SiMemory addressed with immediate addresses.
SsMemory addressed using the stack pointer ($sp).
SfMemory addressed using the frame base register ($fb).
SsMemory addressed using the small base register ($sb).
S1$r1h
fA floating-point or vector register (if available).
kA memory operand whose address is formed by a base register and(optionally scaled) index register.
lA signed 16-bit constant.
mA memory operand whose address is formed by a base register and offsetthat is suitable for use in instructions with the same addressing modeasst.w andld.w.
qA general-purpose register except for $r0 and $r1 (for the csrxchginstruction)
IA signed 12-bit constant (for arithmetic instructions).
KAn unsigned 12-bit constant (for logic instructions).
MA constant that cannot be loaded usinglui,addiuorori.
NA constant in the range -65535 to -1 (inclusive).
OA signed 15-bit constant.
PA constant in the range 1 to 65535 (inclusive).
RAn address that can be used in a non-macro load or store.
ZBAn address that is held in a general-purpose register.The offset is zero.
ZCA memory operand whose address is formed by a base register and offsetthat is suitable for use in instructions with the same addressing modeasll.w andsc.w.
dA general register (r0 tor31).
zA status register (rmsr,$fcc1 to$fcc7).
dA general-purpose register. This is equivalent tor unlessgenerating MIPS16 code, in which case the MIPS16 register set is used.
fA floating-point register (if available).
hFormerly thehi register. This constraint is no longer supported.
lThelo register. Use this register to store values that areno bigger than a word.
xThe concatenatedhi andlo registers. Use this registerto store doubleword values.
cA register suitable for use in an indirect jump. This will always be$25 for-mabicalls.
vRegister$3. Do not use this constraint in new code;it is retained only for compatibility with glibc.
yEquivalent tor; retained for backwards compatibility.
zA floating-point condition code register.
IA signed 16-bit constant (for arithmetic instructions).
JInteger zero.
KAn unsigned 16-bit constant (for logic instructions).
LA signed 32-bit constant in which the lower 16 bits are zero.Such constants can be loaded usinglui.
MA constant that cannot be loaded usinglui,addiuorori.
NA constant in the range −65535 to −1 (inclusive).
OA signed 15-bit constant.
PA constant in the range 1 to 65535 (inclusive).
GFloating-point zero.
RAn address that can be used in a non-macro load or store.
ZCA memory operand whose address is formed by a base register and offsetthat is suitable for use in instructions with the same addressing modeasll andsc.
ZDAn address suitable for aprefetch instruction, or for any otherinstruction with the same addressing mode asprefetch.
aAddress register
dData register
f68881 floating-point register, if available
IInteger in the range 1 to 8
J16-bit signed number
KSigned number whose magnitude is greater than 0x80
LInteger in the range −8 to −1
MSigned number whose magnitude is greater than 0x100
NRange 24 to 31, rotatert:SI 8 to 1 expressed as rotate
O16 (for rotate using swap)
PRange 8 to 15, rotatert:HI 8 to 1 expressed as rotate
RNumbers that mov3q can handle
GFloating point constant that is not a 68881 constant
SOperands that satisfy ’m’ when -mpcrel is in effect
TOperands that satisfy ’s’ when -mpcrel is not in effect
QAddress register indirect addressing mode
URegister offset addressing
Wconst_call_operand
Cssymbol_ref or const
Ciconst_int
C0const_int 0
CjRange of signed numbers that don’t fit in 16 bits
CmvqIntegers valid for mvq
CapswIntegers valid for a moveq followed by a swap
CmvzIntegers valid for mvz
CmvsIntegers valid for mvs
Appush_operand
AcNon-register operands allowed in clr
AAn absolute address
BAn offset address
WA register indirect memory operand
IA constant in the range of 0 to 255.
NA constant in the range of 0 to −255.
R12Register R12.
R13Register R13.
KInteger constant 1.
LInteger constant -1^20..1^19.
MInteger constant 1-4.
YaMemory references which do not require an extended MOVX instruction.
YlMemory reference, labels only.
YsMemory reference, stack only.
wLOW register class $r0 to $r7 constraint for V3/V3M ISA.
lLOW register class $r0 to $r7.
dMIDDLE register class $r0 to $r11, $r16 to $r19.
hHIGH register class $r12 to $r14, $r20 to $r31.
tTemporary assist register $ta (i.e. $r15).
kStack register $sp.
Iu03Unsigned immediate 3-bit value.
In03Negative immediate 3-bit value in the range of −7–0.
Iu04Unsigned immediate 4-bit value.
Is05Signed immediate 5-bit value.
Iu05Unsigned immediate 5-bit value.
In05Negative immediate 5-bit value in the range of −31–0.
Ip05Unsigned immediate 5-bit value for movpi45 instruction with range 16–47.
Iu06Unsigned immediate 6-bit value constraint for addri36.sp instruction.
Iu08Unsigned immediate 8-bit value.
Iu09Unsigned immediate 9-bit value.
Is10Signed immediate 10-bit value.
Is11Signed immediate 11-bit value.
Is15Signed immediate 15-bit value.
Iu15Unsigned immediate 15-bit value.
Ic15A constant which is not in the range of imm15u but ok for bclr instruction.
Ie15A constant which is not in the range of imm15u but ok for bset instruction.
It15A constant which is not in the range of imm15u but ok for btgl instruction.
Ii15A constant whose compliment value is in the range of imm15uand ok for bitci instruction.
Is16Signed immediate 16-bit value.
Is17Signed immediate 17-bit value.
Is19Signed immediate 19-bit value.
Is20Signed immediate 20-bit value.
IhigThe immediate value that can be simply set high 20-bit.
IzebThe immediate value 0xff.
IzehThe immediate value 0xffff.
IxlsThe immediate value 0x01.
Ix11The immediate value 0x7ff.
IbmsThe immediate value with power of 2.
IfexThe immediate value with power of 2 minus 1.
U33Memory constraint for 333 format.
U45Memory constraint for 45 format.
U37Memory constraint for 37 format.
IInteger that is valid as an immediate operand in aninstruction taking a signed 16-bit number. Range−32768 to 32767.
KInteger that is valid as an immediate operand in aninstruction taking an unsigned 16-bit number. Range0 to 65535.
MSigned 16-bit constant shifted left 16 bits. (Used withl.movhi)
OZero
cRegister usable for sibcalls.
aFloating point registers AC0 through AC3. These can be loaded from/tomemory with a single instruction.
dOdd numbered general registers (R1, R3, R5). These are used for16-bit multiply operations.
DA memory reference that is encoded within the opcode, but notauto-increment or auto-decrement.
fAny of the floating point registers (AC0 through AC5).
GFloating point constant 0.
hFloating point registers AC4 and AC5. These cannot be loaded from/tomemory with a single instruction.
IAn integer constant that fits in 16 bits.
JAn integer constant whose low order 16 bits are zero.
KAn integer constant that does not meet the constraints for codes‘I’ or ‘J’.
LThe integer constant 1.
MThe integer constant −1.
NThe integer constant 0.
OInteger constants 0 through 3; shifts by theseamounts are handled as multiple single-bit shifts rather than a singlevariable-length shift.
QA memory reference which requires an additional word (address oroffset) after the opcode.
RA memory reference that is encoded within the opcode.
rA general purpose register (GPR),r0…r31.
bA base register. Liker, butr0 is not allowed, sor1…r31.
fA floating point register (FPR),f0…f31.
dA floating point register. This is the same asf nowadays;historicallyf was for single-precision andd was fordouble-precision floating point.
vAn Altivec vector register (VR),v0…v31.
waA VSX register (VSR),vs0…vs63. This is either anFPR (vs0…vs31 aref0…f31) or a VR(vs32…vs63 arev0…v31).
When usingwa, you should use the%x output modifier, so thatthe correct register number is printed. For example:
asm ("xvadddp %x0,%x1,%x2" : "=wa" (v1) : "wa" (v2), "wa" (v3));You should not use%x forv operands:
asm ("xsaddqp %0,%1,%2" : "=v" (v1) : "v" (v2), "v" (v3));hA special register (vrsave,ctr, orlr).
cThe count register,ctr.
lThe link register,lr.
xCondition register field 0,cr0.
yAny condition register field,cr0…cr7.
zThe carry bit,XER[CA].
weLikewa, if this is a POWER9 or later and-mvsxand-m64 are used; otherwise,NO_REGS.
wnNo register (NO_REGS).
wrLiker, if-mpowerpc64 is used; otherwise,NO_REGS.
wxLiked, if-mpowerpc-gfxopt is used; otherwise,NO_REGS.
wALikeb, if-mpowerpc64 is used; otherwise,NO_REGS.
wBSigned 5-bit constant integer that can be loaded into an Altivec register.
wEVector constant that can be loaded with the XXSPLTIB instruction.
wFMemory operand suitable for power8 GPR load fusion.
wLInt constant that is the element number mfvsrld accesses in a vector.
wMMatch vector constant with all 1’s if the XXLORC instruction is available.
wOMemory operand suitable for the ISA 3.0 vector d-form instructions.
wQMemory operand suitable for the load/store quad instructions.
wSVector constant that can be loaded with XXSPLTIB & sign extension.
wYA memory operand for a DS-form instruction.
wZAn indexed or indirect memory operand, ignoring the bottom 4 bits.
IA signed 16-bit constant.
JAn unsigned 16-bit constant shifted left 16 bits (useL insteadforSImode constants).
KAn unsigned 16-bit constant.
LA signed 16-bit constant shifted left 16 bits.
MAn integer constant greater than 31.
NAn exact power of 2.
OThe integer constant zero.
PA constant whose negation is a signed 16-bit constant.
eIA signed 34-bit integer constant if prefixed instructions are supported.
ePA scalar floating point constant or a vector constant that can beloaded to a VSX register with one prefixed instruction.
eQAn IEEE 128-bit constant that can be loaded into a VSX register withthelxvkq instruction.
GA floating point constant that can be loaded into a register with oneinstruction per word.
HA floating point constant that can be loaded into a register usingthree instructions.
mA memory operand.Normally,m does not allow addresses that update the base register.If the< or> constraint is also used, they are allowed andtherefore on PowerPC targets in that case it is only safeto usem<> in anasm statement if thatasm statementaccesses the operand exactly once. Theasm statement must alsouse%U<opno> as a placeholder for the “update” flag in thecorresponding load or store instruction. For example:
asm ("st%U0 %1,%0" : "=m<>" (mem) : "r" (val));is correct but:
asm ("st %1,%0" : "=m<>" (mem) : "r" (val));is not.
esA “stable” memory operand; that is, one which does not include anyautomodification of the base register. This used to be useful whenm allowed automodification of the base register, but as thoseare now only allowed when< or> is used,es isbasically the same asm without< and>.
QA memory operand addressed by just a base register.
YA memory operand for a DQ-form instruction.
ZA memory operand accessed with indexed or indirect addressing.
RAn AIX TOC entry.
aAn indexed or indirect address.
UA V.4 small data reference.
WA vector constant that does not require memory.
jThe zero vector constant.
IAn unsigned 8-bit integer constant.
JAn unsigned 16-bit integer constant.
LAn unsigned 5-bit integer constant (for shift counts).
TA text segment (program memory) constant label.
ZInteger constant zero.
Int3An integer constant in the range 1 … 7.
Int8An integer constant in the range 0 … 255.
JAn integer constant in the range −255 … 0
KThe integer constant 1.
LThe integer constant -1.
MThe integer constant 0.
NThe integer constant 2.
OThe integer constant -2.
PAn integer constant in the range 1 … 15.
QbiThe built-in compare types–eq, ne, gtu, ltu, geu, and leu.
QscThe synthetic compare types–gt, lt, ge, and le.
WabA memory reference with an absolute address.
WbcA memory reference usingBC as a base register, with an optional offset.
WcaA memory reference usingAX,BC,DE, orHL for the address, for calls.
WcvA memory reference using any 16-bit register pair for the address, for calls.
Wd2A memory reference usingDE as a base register, with an optional offset.
WdeA memory reference usingDE as a base register, without any offset.
WfrAny memory reference to an address in the far address space.
Wh1A memory reference usingHL as a base register, with an optional one-byte offset.
WhbA memory reference usingHL as a base register, withB orC as the index register.
WhlA memory reference usingHL as a base register, without any offset.
Ws1A memory reference usingSP as a base register, with an optional one-byte offset.
YAny memory reference to an address in the near address space.
ATheAX register.
BTheBC register.
DTheDE register.
RA throughL registers.
STheSP register.
TTheHL register.
Z08WThe 16-bitR8 register.
Z10WThe 16-bitR10 register.
ZintThe registers reserved for interrupts (R24 toR31).
aTheA register.
bTheB register.
cTheC register.
dTheD register.
eTheE register.
hTheH register.
lTheL register.
vThe virtual registers.
wThePSW register.
xTheX register.
fA floating-point register (if available).
IAn I-type 12-bit signed immediate.
JInteger zero.
KA 5-bit unsigned immediate for CSR access instructions.
AAn address that is held in a general-purpose register.
SA constraint that matches an absolute symbolic address.
vrA vector register (if available)..
vdA vector register, excluding v0 (if available).
vmA vector register, only v0 (if available).
crRVC general purpose register (x8-x15).
cfRVC floating-point registers (f8-f15), if available, reuse GPR as FPR when usezfinx.
cREven-odd RVC general purpose register pair.
REven-odd general purpose register pair.
QAn address which does not involve register indirect addressing orpre/post increment/decrement addressing.
SymbolA symbol reference.
Int08A constant in the range −256 to 255, inclusive.
Sint08A constant in the range −128 to 127, inclusive.
Sint16A constant in the range −32768 to 32767, inclusive.
Sint24A constant in the range −8388608 to 8388607, inclusive.
Uint04A constant in the range 0 to 15, inclusive.
aAddress register (general purpose register except r0)
cCondition code register
dData register (arbitrary general purpose register)
fFloating-point register
IUnsigned 8-bit constant (0–255)
JUnsigned 12-bit constant (0–4095)
KSigned 16-bit constant (−32768–32767)
LValue appropriate as displacement.
(0..4095)for short displacement
(−524288..524287)for long displacement
MConstant integer with a value of 0x7fffffff.
NMultiple letter constraint followed by 4 parameter letters.
0..9:number of the part counting from most to least significant
H,Q:mode of the part
D,S,H:mode of the containing operand
0,F:value of the other parts (F—all bits set)
The constraint matches if the specified part of a constanthas a value different from its other parts.
QMemory reference without index register and with short displacement.
RMemory reference with index register and short displacement.
SMemory reference without index register but with long displacement.
TMemory reference with index register and long displacement.
UPointer with short displacement.
WPointer with long displacement.
YShift count operand.
fFloating-point register on the SPARC-V8 architecture andlower floating-point register on the SPARC-V9 architecture.
eFloating-point register. It is equivalent to ‘f’ on theSPARC-V8 architecture and contains both lower and upperfloating-point registers on the SPARC-V9 architecture.
cFloating-point condition code register.
dLower floating-point register. It is only valid on the SPARC-V9architecture when the Visual Instruction Set is available.
bFloating-point register. It is only valid on the SPARC-V9 architecturewhen the Visual Instruction Set is available.
h64-bit global or out register for the SPARC-V8+ architecture.
CThe constant all-ones, for floating-point.
ASigned 5-bit constant
DA vector constant
ISigned 13-bit constant
JZero
K32-bit constant with the low 12 bits clear (a constant that can beloaded with thesethi instruction)
LA constant in the range supported bymovcc instructions (11-bitsigned immediate)
MA constant in the range supported bymovrcc instructions (10-bitsigned immediate)
NSame as ‘K’, except that it verifies that bits that are not in thelower 32-bit range are all zero. Must be used instead of ‘K’ formodes wider thanSImode
OThe constant 4096
GFloating-point zero
HSigned 13-bit constant, sign-extended to 32 or 64 bits
PThe constant -1
QFloating-point constant whose integral representation canbe moved into an integer register using a single sethiinstruction
RFloating-point constant whose integral representation canbe moved into an integer register using a single movinstruction
SFloating-point constant whose integral representation canbe moved into an integer register using a high/lo_suminstruction sequence
TMemory address aligned to an 8-byte boundary
WMemory address for ‘e’ constraint registers
wMemory address with only a base register
YVector zero
aRegister file A (A0–A31).
bRegister file B (B0–B31).
APredicate registers in register file A (A0–A2 on C64X andhigher, A1 and A2 otherwise).
BPredicate registers in register file B (B0–B2).
CA call-used register in register file B (B0–B9, B16–B31).
DaRegister file A, excluding predicate registers (A3–A31,plus A0 if not C64X or higher).
DbRegister file B, excluding predicate registers (B3–B31).
Iu4Integer constant in the range 0 … 15.
Iu5Integer constant in the range 0 … 31.
In5Integer constant in the range −31 … 0.
Is5Integer constant in the range −16 … 15.
I5xInteger constant that can be the operand of an ADDA or a SUBA insn.
IuBInteger constant in the range 0 … 65535.
IsBInteger constant in the range −32768 … 32767.
IsCInteger constant in the range-2^{20} …2^{20} - 1.
JcInteger constant that is a valid mask for the clr instruction.
JsInteger constant that is a valid mask for the set instruction.
QMemory location with A base register.
RMemory location with B base register.
S0On C64x+ targets, a GP-relative small data reference.
S1Any kind ofSYMBOL_REF, for use in a call address.
SiAny kind of immediate operand, unless it matches the S0 constraint.
TMemory location with B base register, but not using a long offset.
WA memory operand with an address that cannot be used in an unaligned access.
ZRegister B14 (aka DP).
bEAM registermdb
cEAM registermdc
fFloating point register
kRegister for sibcall optimization
lGeneral register, but notr29,r30 andr31
tRegisterr1
uRegisterr2
vRegisterr3
GFloating-point constant 0.0
JInteger constant in the range 0 .. 65535 (16-bit immediate)
KInteger constant in the range 1 .. 31 (5-bit immediate)
LInteger constant in the range −65535 .. −1 (16-bit negative immediate)
MInteger constant −1
OInteger constant 0
PInteger constant 32
RLegacy register—the eight integer registers available on alli386 processors (a,b,c,d,si,di,bp,sp).
qAny register accessible asrl. In 32-bit mode,a,b,c, andd; in 64-bit mode, any integer register.
QAny register accessible asrh:a,b,c, andd.
lAny register that can be used as the index in a base+index memoryaccess: that is, any general register except the stack pointer.
aThea register.
bTheb register.
cThec register.
dThed register.
SThesi register.
DThedi register.
AThea andd registers. This class is used for instructionsthat return double word results in theax:dx register pair. Singleword values will be allocated either inax ordx.For example on i386 the following implementsrdtsc:
unsigned long long rdtsc (void){ unsigned long long tick; __asm__ __volatile__("rdtsc":"=A"(tick)); return tick;}This is not correct on x86-64 as it would allocate tick in eitheraxordx. You have to use the following variant instead:
unsigned long long rdtsc (void){ unsigned int tickl, tickh; __asm__ __volatile__("rdtsc":"=a"(tickl),"=d"(tickh)); return ((unsigned long long)tickh << 32)|tickl;}UThe call-clobbered integer registers.
fAny 80387 floating-point (stack) register.
tTop of 80387 floating-point stack (%st(0)).
uSecond from top of 80387 floating-point stack (%st(1)).
YkAny mask register that can be used as a predicate, i.e.k1-k7.
kAny mask register.
yAny MMX register.
xAny SSE register.
vAny EVEX encodable SSE register (%xmm0-%xmm31).
wAny bound register.
YzFirst SSE register (%xmm0).
YiAny SSE register, when SSE2 and inter-unit moves are enabled.
YjAny SSE register, when SSE2 and inter-unit moves from vector registers are enabled.
YmAny MMX register, when inter-unit moves are enabled.
YnAny MMX register, when inter-unit moves from vector registers are enabled.
YpAny integer register whenTARGET_PARTIAL_REG_STALL is disabled.
YaAny integer register when zero extensions withAND are disabled.
YbAny register that can be used as the GOT base when calling___tls_get_addr: that is, any general register exceptaandsp registers, for-fno-plt if linker supports it.Otherwise,b register.
YfAny x87 register when 80387 floating-point arithmetic is enabled.
YrLower SSE register when avoiding REX prefix and all SSE registers otherwise.
YvFor AVX512VL, any EVEX-encodable SSE register (%xmm0-%xmm31),otherwise any SSE register.
YhAny EVEX-encodable SSE register, that has number factor of four.
BfFlags register operand.
BgGOT memory operand.
BmVector memory operand.
BcConstant memory operand.
BnMemory operand without REX prefix.
BsSibcall memory operand.
BwCall memory operand.
BzConstant call address operand.
BCSSE constant -1 operand.
IInteger constant in the range 0 … 31, for 32-bit shifts.
JInteger constant in the range 0 … 63, for 64-bit shifts.
KSigned 8-bit integer constant.
L0xFF or0xFFFF, for andsi as a zero-extending move.
M0, 1, 2, or 3 (shifts for thelea instruction).
NUnsigned 8-bit integer constant (forin andoutinstructions).
OInteger constant in the range 0 … 127, for 128-bit shifts.
GStandard 80387 floating point constant.
CSSE constant zero operand.
e32-bit signed integer constant, or a symbolic reference knownto fit that range (for immediate operands in sign-extending x86-64instructions).
We32-bit signed integer constant, or a symbolic reference knownto fit that range (for sign-extending conversion operations thatrequire non-VOIDmode immediate operands).
Wz32-bit unsigned integer constant, or a symbolic reference knownto fit that range (for zero-extending conversion operations thatrequire non-VOIDmode immediate operands).
Wd128-bit integer constant where both the high and low 64-bit wordsatisfy thee constraint.
WsA symbolic reference or label reference.You can use the%p modifier to print the raw symbol.
Z32-bit unsigned integer constant, or a symbolic reference knownto fit that range (for immediate operands in zero-extending x86-64instructions).
TvVSIB address operand.
TsAddress operand without segment register.
aRegister r0.
bRegister r1.
cRegister r2.
dRegister r8.
eRegisters r0 through r7.
tRegisters r0 and r1.
yThe carry register.
zRegisters r8 and r9.
IA constant between 0 and 3 inclusive.
JA constant that has exactly one bit set.
KA constant that has exactly one bit clear.
LA constant between 0 and 255 inclusive.
MA constant between −255 and 0 inclusive.
NA constant between −3 and 0 inclusive.
OA constant between 1 and 4 inclusive.
PA constant between −4 and −1 inclusive.
QA memory reference that is a stack push.
RA memory reference that is a stack pop.
SA memory reference that refers to a constant address of known value.
TThe register indicated by Rx (not implemented yet).
UA constant that is not between 2 and 15 inclusive.
ZThe constant 0.
aGeneral-purpose 32-bit register
bOne-bit boolean register
AMAC16 40-bit accumulator register
ISigned 12-bit integer constant, for use in MOVI instructions
JSigned 8-bit integer constant, for use in ADDI instructions
KInteger constant valid for BccI instructions
LUnsigned constant valid for BccUI instructions
Next:Disable insn alternatives using theenabled attribute, Previous:Constraint Modifier Characters, Up:Operand Constraints [Contents][Index]