User`s guide

MACRO Compiler Built-ins
Note that loading the register with a new value using a VAX MACRO
instruction (such as MOVL) returns it to this format.
C.1 Alpha Instruction Built-ins for OpenVMS Alpha and OpenVMS
I64 Systems
Ported VAX MACRO code sometimes requires access to Alpha native instructions
to deal directly with a 64-bit quantity or to include an Alpha instruction that
has no VAX equivalent. The compiler provides built-ins to allow you access to
these instructions. On OpenVMS I64 systems, the compiler generates equivalent
Itanium instructions.
The following byte and word built-ins are included in the MACRO compiler:
• EVAX_LDBU
• EVAX_LDWU
• EVAX_STB
• EVAX_STW
• EVAX_SEXTB
• EVAX_SEXTW
You use these built-ins in the same way that you use native VAX instructions,
using any VAX operand mode. For example, EVAX_ADDQ 8(R0),(SP)+,R1 is
legal. The only exception is that the first operand of any Alpha load/store built-in
(EVAX_LD*, EVAX_ST*) must be a register.
On OpenVMS Alpha, the best environment in which to run code that contains
the byte and word built-ins is on a system that implements these instructions in
hardware. If you run such code on an Alpha system that implements them by
software emulation, the following limitations exist:
• Significant performance loss
The overhead of handling the exception to trigger the software emulation
causes a significant performance loss. If software emulation is in effect, you
will see this message:
%SYSTEM-I-EMULATED,
an instruction not implemented on this processor was emulated
• Some capabilities not present in the software emulation
The software emulation is not capable of providing all the capabilities
that would be present on a system that implemented the the instructions
in hardware. Code that executes in inner access modes and at elevated
IPL is allowed to use these instructions. For example, activation of the
software emulator above IPL 2 will not cause a bug check. However, certain
applications where these instructions might be useful, such as direct writes
to hardware control registers, will be impossible, because such applications
require the presence of address lines whose function cannot be emulated.
Furthermore, if the code with these built-ins executes on a system without either
the byte and word software emulator or a processor that implements the byte
and word instructions in hardware, it will incur a fatal exception, such as the
following:
C–2 MACRO Compiler Built-ins