9.14 Space-filling directives

The .space directive emits count bytes of data, each of which has value value. If the value argument is omitted, it defaults to zero.

Syntax

.space count [, value]
.fill count [, size [, value]]

Description

.space

The .space directive emits count bytes of data, each of which has value value. If the value argument is omitted, its default value is zero.

The .skip and .zero directives are aliases for the .space directive.

.fill

The .fill directive emits count data values, each with length size bytes and value value. If size is greater than 8, it is truncated to 8. If the size argument is omitted, its default value is one. If the value argument is omitted, its defaults value is zero.

The .fill directive always interprets the value argument as a 32-bit value.

  • If the size argument is less than or equal to 4, the value argument is truncated to size bytes, and emitted with the appropriate endianness for the target. The assembler does not emit a diagnostic if value is truncated in this case.
  • If the size argument is greater than 4, the value is emitted as a 4-byte value with the appropriate endianness. The value is emitted in the 4 bytes of the allocated memory with the lowest addresses. The remaining bytes in the allocated memory are then filled with zeroes. In this case, the assembler does emit a diagnostic if the value is truncated.
Non-ConfidentialPDF file icon PDF versionDUI0774J
Copyright © 2014–2017, 2019 Arm Limited or its affiliates. All rights reserved.