10.5.1 Template modifiers common to AArch32 state and AArch64 state

The following template modifiers are common to both AArch32 state and AArch64 state.

c
Valid for an immediate operand. Prints it as a plain value without a preceding #. Use this template modifier when using the operand in .word, or another data-generating directive, which needs an integer without the #.
n
Valid for an immediate operand. Prints the arithmetic negation of the value without a preceding #.

Example

// This uses an operand as the value in the .word directive. The .word
// directive does not accept numbers with a preceeding #, so we use the 'c'
// template modifier to print just the value.
int foo() {
	int val;
	__asm (R"(
		  ldr %0, 1f
		  b 2f
		1:
		  .word %c1
		2:
		)"
		: "=r" (val)
		: "i" (0x12345678));
	return val;
}
Non-ConfidentialPDF file icon PDF versionDUI0774J
Copyright © 2014–2017, 2019 Arm Limited or its affiliates. All rights reserved.