Assembly Modes

IAS reads and processes assembly code in one of two modes: explicit or automatic. Use explicit mode if you are an expert user with profound knowledge of Itanium architecture and performance is important. Use automatic mode if you are a novice user or performance is not important.

Automatic Mode

Automatic mode is appropriate for implementation of non-performance-critical code.

In this mode, you can write linear code without specifying bundle boundaries and without worrying about architectural dependencies. IAS bundles the code and inserts stops (;;) when needed. IAS ignores all your stops and dependency violations-related annotations.

Automatic mode is the default initial mode. The initial mode can be changed to explicit mode with the command-line option -X explicit.

IAS issues an error if it encounters a curly bracket after the mode directive .auto.

IAS strives to insert a minimal number of stops.

Note

In automatic mode, the assembler ignores the .pred.rel annotation.

Explicit Mode

Explicit mode is suitable when writing performance-critical code.

In this mode, you must avoid dependency violations by inserting stops and annotations in the code. IAS checks the correctness of this code for dependency violations and returns an error if it detects potential or certain problems.

You can set explicit mode in the following ways:

insert curly brackets ({,}) signifying bundle boundaries, while in default automatic mode (Note that a curly bracket following a .auto directive causes an error.)

insert the directive .explicit

use the command-line option -X explicit, which changes the default mode from automatic to explicit.

When you enter a new code section, IAS sets the mode back to the default.

If you write explicit code without bundle boundaries, IAS adds them. However, you are responsible for stops and annotations. Annotations define relations between predicate registers and other run-time values. See Avoiding False Reports.

Behavior of IAS

You can mix code from both modes in the one file. IAS provides you with several ways to switch between the modes:

If there are no bundles, IAS bundles the code, adds nops for correct bundling, and add stops to avoid dependency violations.

The directives .explicit and .auto override the initial default mode for the current code section.

The directive .default returns IAS to the initial default mode.

If IAS encounters a mode directive within an explicit bundle, IAS issues an error.

IAS automatically inserts a stop when it switches between modes.

For an explanation of how to write Itanium architecture code and avoid dependency violations, see Avoiding False Reports.