|
|
HP-UX/HP C Compiler: HP C/HP-UX Reference Manual > Chapter 9 Compiling and Running HP C ProgramsCompiling for Different Versions of the PA-RISC Architecture |
|
This section discusses the use of the +DA and +DS options in more detail. By default, compiling on different HP 9000 systems produces code for the architecture of the system on which the compilation is performed. Use the +DA option to change this default behavior. The +DA option specifies which PA-RISC instruction set the compiler should use when generating code. Specifying +DAportable ensures your code will run on HP PA-RISC 2.0 and 1.1 systems, although the performance of your program may not be as good as it could be if optimized for a specific system. Specifying +DA1.1 may give better performance on PA-RISC 1.1 systems, but the executable file generated with this option will not run on PA-RISC 1.0 systems. Specifying +DA2.0 gives optimal performance on PA-RISC 2.0 systems, but the program will not run on the earlier PA-RISC architectures. Use the command uname -m to determine the model number of your system. When you use the +DA option depends on your particular circumstance.
If you do not specify +DA or +DS, the default instruction scheduling is based on that of the system on which you compile. If you do specify a +DA option and do not specify a +DS option, the default instruction scheduling is based on what you specify in +DA, and not based on that of the system on which you compile. For example, if you specify +DA1.1 and do not specify +DS, and instruction scheduling will be for 1.1. If you specify +DAportable and do not specify +DS, and instruction scheduling will be for 1.1. (+DAportable is currently equivalent to +DA1.1.) Instruction scheduling is different on different implementations of PA-RISC architectures. You can improve performance on a particular model or processor of the HP 9000 by requesting that the compiler use instruction scheduling tuned to that particular model or processor. Using scheduling for one model or processor does not prevent your program from executing on another model or processor. Use the +DS option to specify instruction scheduling tuned to a particular implementation of PA-RISC. Note that model can be a model number of an HP 9000 system (such as 730, 877, or H40); a PA-RISC architecture designation 1.1 or 2.0; or one of the PA-RISC processor names (such as PA7000, PA7100, PA7100LC, or PA8000.) For example, to specify instruction scheduling for the model 867, use +DS867. To specify instruction scheduling for the PA-RISC 7100LC processor, use +DSPA7100LC. To specify instruction scheduling for systems based on the PA-RISC 8000 processor, use +DSPA8000. If you plan to run your program on both PA-RISC 1.1 and 2.0 systems, in general we recommend you use the +DS2.0 designation. See the file /opt/langtools/lib/sched.models for model numbers and processor names. Use the command uname -m to determine the model number of your system. If you do not specify a +DA or +DS option, the default instruction scheduling is based on that of the system on which you compile. If you do specify a +DA option and do not specify a +DS option, the default instruction scheduling is based on what you specify in +DA, and not based on that of the system on which you compile. For example, if you specify +DA1.1 and do not specify +DS, and instruction scheduling will be for 1.1. Specify +DAportable and do not specify +DS, and instruction scheduling will be for 1.1. (+DAportable is currently equivalent to +DA1.1.) When you use the +DS option depends on your particular circumstance.
When compiles are performed using diskless workstations or NFS-mounted file systems, it is important to note that the default code generation and scheduling are based on the local host processor. The system model numbers of the hosts where the source or object files reside do not affect the default code generation and scheduling. |
|