User's Guide
The compiler options that are described in this section enable you to do the following:
- Develop applications for the 64-bit environment.
- Help migrate source code from the 32-bit environment to a 64-bit
environment.
Some of these options already exist in the 32-bit environment, but have
new settings particular to the 64-bit architecture. This section only covers the new settings for these cases.
The options that are grouped here are primarily for developers who are
targetting 64-bit platforms.
Syntax:
-q32
Enables 32-bit compilation bit mode (or, more briefly, 32-bit mode) support
in a 64-bit environment. The -q32 option indicates the
compilation bit mode, and together with the -qarch option, determines
the target machines that the 32-bit executable will run on.
Rules:
- The default integer and default real size are 4 bytes in 32-bit
mode.
- The default integer pointer size is 4 bytes in 32-bit mode.
- 32-bit object modules are created in 32-bit mode.
- -q32 is the default if you have not specified either
-q32 or -q64, and if you have not set the
OBJECT_MODE environment variable. For a description of the
OBJECT_MODE environment variable, see Default Bit Mode.
- -q64 may override -q32.
- All settings for -qarch are compatible with -q32.
If you specify -q32, the default -qarch suboption is
com and the default -qtune suboption for -q32 is
pwr2.
- The LOC intrinsic returns an INTEGER(4)
value.
Examples
- Using 32-bit compilation mode and targetting the 601 architecture:
-qarch=601 -q32
- Now keep the same compilation mode, but change the target to
RS64I:
-qarch=601 -q32 -qarch=rs64a
Notice that the last setting for -qarch wins.
- Now keep the same target, but change the compilation mode to 64-bit:
-qarch=601 -q32 -qarch=rs64a -q64
Notice that specifying -q64 overrides the earlier instance of
-q32.
Syntax:
-q64
Indicates the 64-bit compilation bit mode and, together with the
-qarch option, determines the target machines on which the 64-bit executable will run. The -q64 option indicates that the object module will be
created in 64-bit object format and that the 64-bit instruction set will be
generated. Note that you may compile in a 32-bit environment to create
64-bit objects, but you must link them in a 64-bit environment with the
-q64 option.
The -q64 option is also compatible with the C for AIX compiler and
the tools provided on AIX 4.3.
Rules:
- Settings for -qarch that are compatible with -q64 are as
follows:
- -qarch=auto (if compiling on a 64-bit system)
- -qarch=com
- -qarch=ppc
- -qarch=rs64a
- -qarch=rs64b
- -qarch=pwr3
- The default -qarch setting for -q64 is
ppc.
- 64-bit object modules are created in 64-bit mode.
- -q32 may override -q64.
- -q64 will override a conflicting setting for
-qarch. For example,
-q64 -qarch=601
will result in the setting -q64 -qarch=ppc along with a warning message.
- The default tune setting for -q64 is
-qtune=pwr3.
- The default integer and default real size is 4 bytes in 64-bit
mode.
- The default integer pointer size is 8 bytes in 64-bit mode.
- The maximum array size increases to approximately 2**40 bytes (in static storage) or 2**60 bytes (in dynamic allocation on the
heap). The maximum dimension bound range is extended to -2**63, 2**63-1 bytes. The maximum array size for array constants has not been extended
and will remain the same as the maximum in 32-bit mode. The maximum array size that you can initialize is 2**28
bytes.
- The maximum iteration count for array constructor implied DO loops
increases to 2**63-1 bytes.
- The maximum character variable length extends to approximately 2**40
bytes. The maximum length of character constants and subobjects of
constants remains the same as in 32-bit mode, which is 32 767 bytes
(32 KB).
- The LOC intrinsic returns an INTEGER(8) value.
When you use -qautodbl=dblpad in 64-bit mode, you should use
-qintsize=8 to promote INTEGER(4) to INTEGER(8) for
8 byte integer arithmetic.
Examples
- 64-bit compilation that targets the RS64I:
-q32 -qarch=rs64a -q64
- 64-bit compilation that targets the common group of 64-bit architectures
(which currently consists only of the RS64I,
RS64II, and POWER3):
-q64 -qarch=com
- Conflicting -qarch option with -q64:
-qarch=601 -q64
results in a setting of -q64 -qarch=ppc and a warning
message.
- Conflicting -qarch option with -q64:
-q64 -qarch=601
results in a setting of -q64 -qarch=ppc and a warning message.
Syntax:
-qarch=rs64a
Indicates that the target architecture for the executable to run on is the
RS64I.
Rules:
- You can specify the -qarch=rs64a option with either the
-q32 or -q64 option.
- The RS64I belongs to the 64-bit common architecture group that
is specified with the combination of options -qarch=com
-q64.
- The supported tune option for -qarch=rs64a is
-qtune=rs64a. The default tune option for
-qarch=rs64a is -qtune=rs64a.
Related Information:
For more information on the -qarch compiler option, see -qarch Option.
Syntax:
-qarch=rs64b
Indicates that the target architecture for the executable to run on is the
RS64II.
Rules:
- You can specify the -qarch=rs64b option with either the
-q32 or -q64 option.
- The RS64II belongs to the 64-bit common architecture
group that is specified with the combination of options -qarch=com
-q64.
- The supported tune option for -qarch=rs64b is
-qtune=rs64b. The default tune option for
-qarch=rs64b is -qtune=rs64b.
Related Information:
For more information on the -qarch compiler option, see -qarch Option.
Syntax:
-qtune=rs64a
Tune optimizations for the PowerPC RS64I processor.
You can specify the -qtune=rs64a option when you also
specify any of the following options:
- -qarch=rs64a
- -qarch=ppc
- -qarch=com
- -qarch=auto (if compiling on an RS64I system)
The -qtune=rs64a option is the default for the
-qarch=rs64a option or the -q64 option.
Related Information:
For more information on the -qtune compiler option, see -qtune Option.
Syntax:
-qtune=rs64b
Tune optimizations for the PowerPC RS64II
processor.
You can specify the -qtune=rs64b option when you also
specify any of the following options:
- -qarch=rs64b
- -qarch=ppc
- -qarch=com
- -qarch=auto (if compiling on an RS64II
system)
The -qtune=rs64b option is the default for the
-qarch=rs64b option or the -q64 option.
Related Information:
For more information on the -qtune compiler option, see -qtune Option.
Syntax:
-qwarn64 | -qnowarn64
Aids in porting code from a 32-bit environment to a 64-bit environment, by detecting the
truncation of an 8-byte integer pointer to 4 bytes. The -qwarn64 option uses informational messages to identify
statements that may cause problems with the 32-bit to 64-bit migration.
The option name provides compatibility with the C for AIX
compiler.
Rules:
- The default setting is -qnowarn64.
- You can use the -qwarn64 option in both 32-bit and 64-bit modes.
- The compiler flags the following situations with informational
messages:
- The assignment of a reference to the LOC intrinsic to an
INTEGER(4) variable.
- The assignment between an INTEGER(4) variable or
INTEGER(4) constant and an integer pointer.
- The specification of an integer pointer within a common block. We recommend the -qextchk option for common block length
changes.
- The specification of an integer pointer within an equivalence
statement.
- We recommend the -qextchk option and interface blocks for
argument checking.
[ Top of Page | Previous Page | Next Page | Table of Contents | Index ]
© Copyright IBM Corporation 1990, 1998.