.machine pseudo-op
Purpose
Defines the intended target environment.
Syntax
| Item | Description |
|---|---|
| .machine | StringConstant |
Description
The .machine pseudo-op selects the correct instruction mnemonics set for the target machine. It provides symbol table information necessary for the use of the linkage editor. The .machine pseudo-op overrides the setting of the as command's -m flag, which can also be used to specify the instruction mnemonics set for the target machine.
The .machine pseudo-op can occur in the source program more than once. The value specified by a .machine pseudo-op overrides any value specified by an earlier .machine pseudo-op. It is not necessary to place the first .machine pseudo-op at the beginning of a source program. If no .machine pseudo-op occurs at the beginning of a source program and the -m flag is not used with the as command, the default assembly mode is used. The default assembly mode is overridden by the first .machine pseudo-op.
If a .machine pseudo-op specifies a value that is not valid, an error is reported. As a result, the last valid value specified by the default mode value, the -m flag, or a previous .machine pseudo-op is used for the remainder of the instruction validation in the assembler pass one.
Parameters
| Item | Description |
|---|---|
| StringConstant | Specifies the assembly mode. This parameter is not case-sensitive,
and can be any of the values which can be specified with the -m flag
on the command line. Possible values, enclosed in quotation marks,
are:
|
| Item | Description |
|---|---|
|
|
|
Examples
- To set the target environment to POWER® family architecture, POWER®
family implementation:
.machine "pwr" - To set the target environment to any non-specific POWER® family/PowerPC®
architecture or implementation mode:
.machine "any" - To explicitly select the default assembly mode:
.machine "" - The following example of assembler output for a fragment of code
shows the usage of .machine "push" and .machine "pop":
push1.s V4.1 04/15/94 File# Line# Mode Name Loc Ctr Object Code Source 0 1 | .machine "pwr2" 0 2 | .csect longname1[PR] 0 3 | PWR2 longna 00000000 0000000a .long 10 0 4 | PWR2 longna 00000004 329e000a ai 20,30,10 0 5 | PWR2 longna 00000008 81540014 l 10, 20(20) 0 6 | .machine "push" 0 7 | .machine "ppc" 0 8 | .csect a2[PR] 0 9 | PPC a2 00000000 7d4c42e6 mftb 10 0 10 | .machine "pop" 0 11 | PWR2 a2 00000004 329e000a ai 20,30,10 0 12 |