Host machine independence and target environment indicator flag
The host machine is the hardware platform on which the assembler runs.
The host machine is the hardware platform on which the assembler runs. The target machine is the platform on which the object code is run. The assembler can assemble a source program for any target machine, regardless of the host machine on which the assembler runs.
The target machine can be specified by using either the assembly mode option flag -m of the as command or the .machine pseudo-op. If neither the -m flag nor the .machine pseudo-op is used, the default assembly mode is used. If both the -m flag and a .machine pseudo-op are used, the .machine pseudo-op overrides the -m flag. Multiple .machine pseudo-ops are allowed in a source program. The value in a later .machine pseudo-op overrides a previous .machine pseudo-op.
The default assembly mode provided by the AIX® assembler has the POWER® family/PowerPC® intersection as the target environment, but treats all POWER/PowerPC® incompatibility errors (including instructions outside the POWER/PowerPC® intersection and invalid form errors) as instructional warnings. The -W and -w assembler flags control whether these warnings are displayed. In addition to being chosen by the absence of the -m flag of the as command or the .machine pseudo-op, the default assembly mode can also be explicitly specified with the -m flag of the as command or with the .machine pseudo-op.
To assemble a source program containing platform-unique instructions from more than one platform without errors or warnings, use one of the following methods:
- Use the .machine pseudo-op in the source program.
- Assemble the program with the assembly mode set to the any mode (with the -m flag of the as command).
For example, the source code cannot contain both POWER® family-unique instructions and PowerPC® 601 RISC Microprocessor-unique instructions. This is also true for each of the sub-source programs contained in a single source program. A sub-source program begins with a .machine pseudo-op and ends before the next .machine pseudo-op. Since a source program can contain multiple .machine pseudo-ops, it normally consists of several sub-source programs.