Native Code Options

ACUCOBOL-GT supports several options that cause it to generate and execute object files that contain native instructions for select families of processors. These options can not be combined with other options into a single option. For example, it is an error to specify -nv; you must specify -n -v instead.

The compiler uses cblutil to produce the native-code object file. cblutil is installed in the same directory as the compiler by default. The compiler searches the execution path if it cannot find cblutil in its own directory.

You run a native-code object module just like a portable-code object module. You may mix native-code objects and portable-code objects in the same run. Native objects may be placed in libraries just like portable objects.

You can use the debugger with a native-code module in the same fashion as with a portable-code module. The only restriction is that you may not begin program execution at an arbitrary point in a native-code module (the @! command). Also, to prepare a native-code object for use with the debugger, you must compile the program with one of the debugging options, such as -Ga or -Gd.

To compile and run the tour.cbl program as a portable-code object, use the following commands:

ccbl tour.cbl
runcbl tour

To compile and run the same program as a native-code object, use the following:

ccbl -n tour.cbl
runcbl tour

These are the ACUCOBOL-GT Compiler native code options.

-n     

This option causes the compiler to produce native code for the host machine (instead of processor-independent portable code). If native code generation is not supported for the host machine, the compiler generates an error.

The word-size of the native code generated with the -n option matches the internal word-size of the compiler, and not that of the host machine's processor. It does this because the word-size of the native code must match the internal word-size of the runtime to execute correctly. Therefore, on Windows, as the ACUCOBOL-GT compiler is 32-bit, even when running on a 64-bit machine, this option will only produce 32-bit native code. To produce 64-bit native code on Windows, use the x64_Win option listed below. On a 64-bit UNIX/Linux version of extend, you can compile native 64-bit code using either the -n option or the x64_Unix option

If you are running a program compiled with -n on either a UNIX or Windows machine that has executable memory protection enabled for all processes, ensure the runtime configuration variable USE_EXECUTABLE_MEMORY is set to TRUE (which is the default value).

--noinlineCall This option turns off a feature that enhances the performance of called subroutines. By default, this feature is turned on, but in version 8.0 it is specified by the --inlineCall command. It is not recommended that you turn off this feature. It is useful if you have interest in testing the potential performance difference.
--intel

or

--ia-32

This option causes the compiler to produce 32-bit native code for Intel-class processors (486, Pentium, Pentium II, Pentium III, or compatible processors). You can use this option from any host machine. This is the same as specifying -n when the host machine is an Intel-class machine.
--pa_risc

or

--pa

This option causes the compiler to produce 32-bit code for PA-RISC Version 1.0 processors running the HP-UX operating system. The runtime must be a 32-bit runtime to match the code contained in the object file. The 32-bit runtime runs without modification on PA-RISC 2.0 platforms as well, providing a portable solution. You can use this option from any host machine. This is the same as specifying -n with a 32-bit compiler on an HP-UX machine.
--pa_risc_2.0

or

--pa2

This option causes the compiler to produce 64-bit code for PA-RISC Version 2.0 processors running the HP-UX operating system. Note that the runtime must be a 64-bit runtime to match the code contained in the object file. You can use this option from any host machine. This is the same as specifying -n with a 64-bit compiler on an HP-UX machine.
--power This option produces code that is compatible with POWER and POWER2 processors, as well as PowerPC and later POWER series processors. This option allows you to use a wide range of machines, but it may affect performance.
--powerpc

or

--ppc

This option causes the compiler to produce 32-bit PowerPC native code for pSeries processors running AIX. You can use this option from any host machine. This is the same as specifying -n with a 32-bit compiler on a pSeries machine.

You can compile native code only for machines with a POWER3 or later chip, not with POWER2 or earlier.

-- powerpc_64

or

--ppc64

This option causes the compiler to produce 64-bit PowerPC native code for pSeries processors running AIX. You can use this option from any host machine. This is the same as specifying -n with a 64-bit compiler on a pSeries machine.
--sparc This option causes the compiler to produce 32-bit native code for SPARC (v7 - v9) processors. You can use this option from any host machine. This is the same as specifying -n with a 32-bit compiler on a SPARC-based host machine.
--sparc_v9 This option causes the compiler to produce 64-bit native code for SPARC version 9 processors. You can use this option from any host machine. This is the same as specifying -n with a 64-bit compiler on a SPARC v9-based host machine.
--x64_Win This option causes the compiler to produce x64 native code for Windows platforms. The resulting object code can only be run with a 64-bit enabled runtime.
Note: x64 object code is not portable between the Windows and UNIX/Linux platforms
--x64_Unix or --x64_Linux This option causes the compiler to produce x64 native code for UNIX/Linux platforms. The resulting object code can only be run with a 64-bit enabled runtime.
Note: x64 object code is not portable between the Windows and UNIX/Linux platforms