[Digital logo]
[HR]

Migrating an Application from OpenVMS VAX to OpenVMS Alpha


Previous | Contents

To ensure that an operation that can be performed atomically on a VAX system by a VAX instruction is performed atomically in a translated image, specify the INSTRUCTION_ATOMICITY keyword to the /PRESERVE qualifier.

To ensure that simultaneous updates to adjacent bytes within a longword or quadword can be accomplished without interfering with each other, specify the MEMORY_ATOMICITY keyword to the /PRESERVE qualifier.

To ensure that read/write operations appear to occur in the order you specify them, specify the READ_WRITE_ORDERING keyword to the /PRESERVE qualifier.


Chapter 7
Checking the Portability of Application Data Declarations

This chapter describes how to check the data your application uses for dependencies on the VAX architecture. The chapter also describes the effect your choice of data type can have on the size and performance of your application on an Alpha system.

7.1 Overview

The data types supported by high-level programming languages, such as int in C or INTEGER*4 in FORTRAN, provide applications with a degree of data portability because they hide the machine-specific details of the underlying native data types. The languages map their data types to the native data types supported by the target platform. For this reason, you may be able to successfully recompile and run an application that runs on VAX systems on an Alpha system without modifying the data declarations it contains.

However, if your application contains any of the following assumptions about data types, you may need to modify your source code:

7.2 Checking for Dependence on a VAX Data Type

To provide data compatibility, the Alpha architecture has been designed to support many of the same native data types as the VAX architecture. Table 7-1 lists the native data types supported by both architectures. (See the Alpha Architecture Reference Manual for more information about the formats of the data types.)

Table 7-1 Comparison of VAX and Alpha Native Data Types
VAX Data Types Alpha Data Types
byte byte
word word
longword longword
quadword quadword
octaword --
F_floating F_floating
D_floating (56-bit precision) D_floating (53-bit precision)
G_floating G_floating
H_floating X_floating
-- S_floating (IEEE)
-- T_floating (IEEE)
Variable-length bit field --
Absolute queue Absolute longword queue
-- Absolute quadword queue
Self-relative queue Self-relative longword queue
-- Self-relative quadword queue
Character string --
Trailing numeric string --
Leading separate numeric string --
Packed decimal string --

Recommendations

Unless your application depends on the format or size of the underlying native VAX data types, you may not have to modify your application because of changes to the data-type mappings. Wherever possible, the compilers on Alpha systems map their data types to the same native data types as they do on VAX systems. For those VAX data types that are not supported by the Alpha architecture, the compilers map their data types to the closest equivalent native Alpha data type. (For more information about how the compilers on Alpha systems map the data types they support to native Alpha data types, see Chapter 11 and compiler documentation.)

The following list provides guidelines that can be helpful for certain types of data declarations: