Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- Watcom C/C++ User's Guide - (32-bit only) the compiler will generate 386 instructions based on 386 http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
(32-bit only) The compiler will generate 386 instructions based on 386
instruction timings (see "4" and "5" below).
If the "r" suffix is specified, the following machine-level code strategy is
employed.

 .  The compiler will pass arguments in registers whenever possible.  This
    is the default method used to pass arguments (unless the "bt=netware"
    option is specified).
 .  All registers except EAX are preserved across function calls.
 .  When any form of the "fpi" option is used, the result of functions of
    type "float" and "double" is returned in ST(0).
 .  When the "fpc" option is used, the result of a function of type "float"
    is returned in EAX and the result of a function of type "double" is
    returned in EDX:EAX.
 .  The resulting code will be smaller than that which is generated for the
    stack-based method of passing arguments (see "3s" below).
 .  The default naming convention for all global functions is such that an
    underscore character ("_") is suffixed to the symbol name.  The default
    naming convention for all global variables is such that an underscore
    character ("_") is prefixed to the symbol name.

If the "s" suffix is specified, the following machine-level code strategy is
employed.

 .  The compiler will pass all arguments on the stack.
 .  The EAX, ECX and EDX registers are not preserved across function calls.
 .  The FS and GS registers are not preserved across function calls.
 .  The result of a function of type "float" is returned in EAX.  The result
    of a function of type "double" is returned in EDX:EAX.
 .  The resulting code will be larger than that which is generated for the
    register method of passing arguments (see "3r" above).
 .  The naming convention for all global functions and variables is modified
    such that no underscore characters ("_") are prefixed or suffixed to the
    symbol name.

The "s" conventions are similar to those used by the MetaWare High C 386
compiler.

By default, "r" is selected if neither "r" nor "s" is specified.

The macro __SW_3 will be predefined if "3" is selected.  The macro __SW_3R
will be predefined if "r" is selected (or defaulted).  The macro __SW_3S
will be predefined if "s" is selected.

Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson