Jump to content United States-English
HP.com Home Products and Services Support and Drivers Solutions How to Buy
» Contact HP
More options
HP.com home
HP-UX 64-bit Porting and Transition Guide: HP 9000 Computers > Chapter 3 HP-UX 64-bit Porting Concepts

Architecture Specific Changes

» 

Technical documentation

Complete book in PDF
» Feedback
Content starts here

 » Table of Contents

 » Glossary

 » Index

There is a class of porting issues that is not strictly caused by the 64-bit architecture, but is a side-effect of the 64-bit architecture.

Assembly Language

Assembly language code may need changes due to the 64-bit PA-RISC 2.0 calling conventions. You may also want to take advantage of the new instructions for improved performance.

The following summarizes items that may need adjustments:

  • The procedure calling conventions are different. For example, the number of items passed on the stack may be different.

  • Instead of ldw and stw, use ldd and std when loading and storing 64-bit values.

  • Addresses are capable of holding 64-bit values.

  • The 64-bit ELF object file format is more restrictive than the 32-bit object file format. Therefore, the set of legal instructions is more restrictive.

  • Instead of .word, use the .dword pseudo-op when allocating storage for a pointer.

  • Alignment of data items may be different.

  • In 64-bit mode, the Assembler ignores the .CALL directive. This means the linker does not ensure that the caller and called procedure agree on argument locations. If you do not know the prototype of the called procedure, you must pass floating point parameters in both the corresponding general registers and corresponding floating-point registers.

For More Information:

  • See the HP Assembler Reference Manual for more details about 64-bit Assembler changes.

  • See ELF-64 Object File Format, URL:http://www.software.hp.com/STK/.

Object File Format

HP PA-RISC 1.0 and 1.1-based systems use the System Object Module (SOM) object file format. This is a proprietary format. It is the common representation of code and data for all compilers which generate code for PA-RISC 1.x-based systems.

HP PA-RISC 2.0-based systems use the SOM object file format in 32-bit mode and the industry-standard Executable and Linking Format (ELF) in 64-bit mode. If your application manipulates the object file format, it should support both the 64-bit ELF format and the 32-bit SOM format.

To identify the ELF format within scripts, use the HP-UX file command. To identify the ELF format within programs, use the nlist64 APIs in libelf.sl.

Procedure Calling Conventions

The procedure calling conventions for the 64-bit PA-RISC 2.0 architecture are different. You may be impacted if your code depends on stack unwinds, uses assembly language, or passes data in and out of the kernel.

See 64-bit Runtime Architecture for PA-RISC 2.0, URL:http://www.software.hp.com/STK/ for details.

Printable version
Privacy statement Using this site means you accept its terms Feedback to webmaster
© 1998 Hewlett-Packard Development Company, L.P.