The Question is:
When I call F$GETSYI with items CPUTYPE and REAL_CPUTYPE I get different values
for the same processor. Why would that be? Which one should I rely on if I
want to compile with the /architecture or /optimize=tune= qualifiers?
The Answer is :
If you are unfamiliar with the particular Alpha microprocessor
installed in your system and wish to create a program to query
for this information, please see the Alpha Microprocessor example
program that is posted at the Ask The Wizard website.
The OpenVMS FAQ sections on the Alpha instruction set and on the
use of /ARCHITECTURE and /OPTIMIZE will also be of interest here.
Note that current compilers will generate AMASK-protected code
sequences within loops, permitting the appropriate instruction
groups to be chosen (at run-time) and executed for the current
The itemcode SYI$_CPUTYPE returns the type code of the current
Alpha CPU (from the EXE$GQ_CPUTYPE system data cell), while
SYI$_REAL_CPUTYPE returns the type code (from EXE$GQ_REAL_CPUTYPE)
of the primary CPU. These may or may not be the same Alpha processor,
of course. The values in these system data cells are derived from
the values in the HWRPB; from the Hardware Restart Parameter Block.
The EXE$GQ_CPUTYPE value is the Alpha microprocessor core used for
the particular microprocessor (IMPLVER), while EXE$GQ_REAL_CPUTYPE
is the particular variant of the microprocessor core. In this case,
you are interested not in the CPU type (or variant), but rather in the
CPU capabilities, and likely specifically interested in determining
hardware support for the byte-word instruction group. This information
is available via the AMASK mechanism -- see the Alpha Microprocessor
example program referenced earlier for details of the AMASK and