ic960 Compiler Driver
ic960 is a driver program that manages invocation of the preprocessor,
compiler proper, assembler and linker. The invocation syntax is:
ic960
{ - | / } [ -option ] ...
file ...
Each invocation option must be preceded by a - character.
(On DOS, you can also use a / character.) Click on option
for information on compiler driver options. All options that take
an argument allow optional white space between the option and
the argument. When conflicting options are given, the last one
specified is used. The compiler driver passes the following linker options
and their arguments to the linker: gcdm,
L, l,
m, r,
s, T,
u and x.
The compilation system determines each input file's type by its
filename extension:
- .c
indicates a C source file.
- .i
indicates a preprocessed C source file.
- .s
indicates an assembly language source file.
The compilation system passes any other filename to the linker,
which determines whether the file is an object file, library or
configuration file by its contents.
Other invocation command elements are taken to be either linker
options or object modules, typically produced by an earlier ic960
invocation, or perhaps libraries of compatible routines. These
modules, together with the result of any compilations specified,
are linked (in the order given) to produce an executable program.
When generating COFF modules, the default output filename is a.out.
When generating ELF/DWARF modules, the default filename is e.out.
Each option requires an option delimiter (-
or /).
All options that take an argument allow optional white space between
the option and argument. When conflicting options are given, the
last one specified is used. For information about an option, click
on the option name (underlined).
The ic960 driver also accepts certain linker options.
A
{ CA | CF
| HA | HD | HT | JA | JD |
JF | KA | KB | RP | SA | SB
}
(Architecture)
Compile code for a particular model of the i960 processor. If
the environment variable I960ARCH
is set and non-empty, its value is the default architecture. Otherwise
the default is KB.
a
(ANSI)
Flag non-standard (that is, non-ANSI) constructs. Using a
disables inline assembly language statements and can override
the w (Diagnostic)
option. This option causes the preprocessor macros __STRICT_ANSI__
and __STRICT_ANSI
to be defined.
b size
(Limit Optimizations)
Limit global optimizations for functions exceeding size
instructions. size
is a positive decimal integer.
C
(Keep Comments)
Keep comments in preprocessor output. Works only with E
or P.
Dsymbol[=value]
(Define)
Define a macro with a given value. If =value
is omitted, symbol
is defined to be 1.
Fcoff
| Felf (OMF)
Generate COFF or ELF objects. Fcoff
is the default.
F arg[,arg]...
(Fine-Tune Optimization)
Enable or disable selected optimizations. arg
is one of:
- ai
| noai
- Enables/disables procedure in-lining. Performed only at optimization
level 2. Suppressing in-lining can reduce code size and increase
compilation speed.
- ca
| noca
- Enables/disables code alignment; generate (do not generate)
alignment directives prior to labels that are not entered from
above.
- cb
| nocb
- Enables/disables use of compare and branch instructions.
- lp
- Leaf procedures. Enables code generation of functions using
the bal calling sequence at optimization level 1 or 2. Default
at level 1.
- nolp
- Disables code generation of functions using the bal calling
sequence at optimization level 1 or 2. Default at level 2.
- sa
| nosa
- Determines whether or not the compiler will risk generating
memory references which are not provably aligned. If nosa
is in effect, the compiler occasionally generates potentially
unaligned references when it seems advantageous to do so. When
sa is enabled,
sequences of smaller memory references are used instead of larger
ones which might not be correctly aligned. The default is sa
for C-series and J-series processors.
- sb
- Superblock formation; enabled by default under program-wide
optimization.
- nosb
- Disables superblock formation.
- space
| nospace
- Enable/disable optimizations for memory space savings.
- tce
- Enables conversion of tail calls into branch instructions
at optimization level 1 or 2.
- notce
- Disables conversion of tail calls at level 1 or 2. This is
the default at optimization level 1.
fdb
(Program Database)
All modules subject to program-wide optimization must be initially
compiled with the fdb
option. This option causes the insertion of program database information
in the object modules, and it implies a minimum module-local optimization
level of O1
(although higher module-local optimization levels are allowed).
This option does not otherwise change the code or data generated
for the object modules in any way; it simply makes available to
the global decision making and optimization process information
collected during initial compilation of the modules.
Before using the fdb
option, you should read Chapter 4, Program-Wide Analysis and Optimization,
and Chapter 6, gcdm Decision Maker Option, in the i960 Processor
Compiler User's Guide.
If you intend to use execution profiles when optimizing your application,
you should read Chapter 5, Profile Data Merging and Data Format,
in the i960 Processor Compiler User's Guide.
fprof
(Instrument)
This option inserts execution profile instrumentation code
into the module(s) during compilation, so that when the linked
program is executed, a profile can be collected.
It also implies fdb,
which causes the insertion of program database information in
the object modules, and it implies a minimum module-local optimization
level of O1.
When you compile with the fprof
option, a special profiling library required for profile collection
(libqf)
is linked automatically. If your target environment does not support
file I/O, you must explicitly link an alternate profiling library
(libq).
The profiling libraries provided are identified in Chapter 2 of
the i960 Processor Library Supplement.
Note that when the fprof
compiler option is used in this manner (as distinct from the corresponding
+fprof
gcdm Decision Maker option) the generated object module contains
code that is unsuitable for linking into programs which are not
supposed to collect profile information. To solve this problem,
and avoid having inappropriate instrumentation in widely used
libraries, for example, use +fprof
with the gcdm,subst
option. (The gcdm
option is described in the gcdm Decision Maker Option section
of this hypertext.)
Before using the fprof
option, you should read Chapter 4, Program-Wide Analysis and Optimization,
and Chapter 5, Profile Data Merging and Data Format, in the i960
Processor Compiler User's Guide.
f[no-]arg
(Enable/Disable Optimization)
Enable/disable optimization. arg
is one of:
- bbr
- enable basic block rearrangement.
- coalesce
- coalesce adjacent memory references.
- coerce
- enable byte/short optimization.
- cond-mismatch
- allow type mismatch in operands of the ?:
operator.
- condxform
- enable 80960 conditional instructions.
- constprop
- enable constant propagation and folding.
- copyprop
- enable copy propagation.
- cse-follow-jumps
- enable a limited form of global CSE.
- cse-skip-blocks
- enable a limited form of global CSE.
- expensive-optimizations
- enable some minor optimizations.
- force-addr
- place address constants in registers before use.
- int-alias-ptr
- indicates to the compiler that pointer objects may be referenced
as 32-bit integers and vice versa.
- int-alias-real
- indicates to the compiler that float,
double
and long double
objects (or parts thereof) may be referenced as 32-bit integers
and vice versa.
- int-alias-short
- indicates to the compiler that four-byte integer objects may
be referenced as two-byte objects and vice versa.
- keep-inline-functions
- emit out-of-line code for inlined functions.
- marry_mem
- rejoin multi-word moves split by fsplit_mem.
- rerun-cse-after-loop
- reiterate CSE after loop optimization.
- schedule-insns
- perform pre-register-allocation scheduling.
- schedule-insns2
- perform post-register-allocation scheduling.
- shadow-globals
- shadow memory locations in registers.
- shadow-mem
- like shadow-globals,
but more thorough.
- space-opt
- optimize for code size.
- split_mem
- split multi-word moves for copy propagation.
- strength-reduce
- enable loop strength reduction.
- thread-jumps
- enable an advanced branch optimization.
- unroll-all-loops
- unroll all loops.
- unroll-loops
- unroll loops where deemed beneficial.
- volatile
- treat indirect memory references as volatile.
- volatile-global
- treat all memory references as volatile.
- writable-strings
- place string literals in .data
section.
G arg[,arg]...
(Generate)
Specifies a code generation option. arg
is one of:
- abi
- Generate ABI-conformant code.
- ac=n
- Align structures on the byte boundary specified by n,
where n
is either 1, 2, 4, 8, or 16.
- bc
- Generate code that is backward-compatible with releases of
ic960 before Release 3.0.
- be
- Generate code to run in big-endian memory. This option causes
the preprocessor symbol __i960_BIG_ENDIAN__
to be defined.
- cave
- Generate all functions as CAVE secondary.
- {cs | cu}
- Treat char
data types as signed or unsigned, respectively. If signed (the
default), the preprocessor symbol
__SIGNED_CHARS__ is defined. If unsigned, the
preprocessor symbol __CHAR_UNSIGNED__
is defined.
- dc
- Employ the relaxed (common) ref-def model for defining uninitialized
data. This is the default.
- ds
- Employ the strict ref-def model for defining uninitialized
data.
- pc
- Generates position-independent code. Causes __PIC
to be defined.
- pd
- Generates position-independent data. Causes __PID
to be defined.
- pr
- Reserves register g12
containing the position-independent data (PID) bias value.
- wait=n
- Specifies wait-state for memory accesses. n
is 0..32.
- xc
- Specifies that all external calls in the module use the extended-call
mechanism.
g
[level]
(Debug)
Put symbolic debug information into the object module. level
is:
- 0
- disables debug information (default).
- 1
or 2
- minimal debug information. (Same as g
with no argument.)
- 3
- verbose debug information (ELF/DWARF only).
gcdm,arg[,arg]...
(Decision Maker)
Invoke gcdm960 decision maker to perform optimization or related
tasks. Click gcdm option for information
on this option.
h
(Help)
Print a summary of ic960 driver options and exit without processing
any files.
I
dir
(Searchinclude)
Add the directory dir
to the search list for #include
files.
i
filename
(Preinclude)
Include the specified source file as if a #include
of that file existed at line zero of each primary source file.
Jarg[,arg]...
(Miscellaneous)
Use the J
(Miscellaneous) option to specify miscellaneous controls. Two
such controls are gd
(issue gcc960-style diagnostics) and nogd
(issue ic960-style diagnostics).
jnum
(Errata)
Use the j
(Errata) option to cause the compilation system to generate code
with workarounds for specified processor errata. A num
argument of 1 generates code to work around the Cx processors'
DMA errata.
M
(Mix)
Mix C source text as comments in the assembly language output.
Works only with S.
n
| Q | P | E | S | c
(Stop-After)
Stop after the specified compilation phase. These options
are used as follows:
- n
- Terminate after syntax and semantic checking.
- Q
- Terminate after preprocessing; produce an include file dependency
list.
- P
- Terminate after preprocessing. Write preprocessor output without
line number directives to a file.
- E
- Terminate after preprocessing. Write preprocessor output with
line number directives to standard output.
- S
- Terminate after generating assembly code.
- c
- Terminate after generating an object file.
O level
(Optimize)
Specify the optimization level to be used. Supported levels
are 0, 1 and 2.
- 0
- Turns optimization off, and additionally disables default
optimizations that may interfere with debugging. This is the default
setting if you use the g
(Debug) option with a non-zero debug level argument.
- 1
- This option turns on basic optimizations, including: advanced
register allocation, common subexpression elimination, loop invariant
code motion, expression simplification and instruction combination,
jump optimization, dead-code elimination, tail-call elimination,
leaf-procedure optimization, and i960 processor-specific peephole
optimization. This is the default setting if you do not use the
g (Debug)
option and when you use the fdb
(Program Database) or fprof
(Instrument) options.
- 2
- This level includes the O1
optimizations described above, and the following additional optimizations:
-
- fcoalesce,
fcoerce,
fcondxform,
fconstprop,
fcopyprop,
fcse-follow-jumps,
fcse-skip-blocks,
fexpensive-optimizations,
finline-functions,
fmarry_mem,
frerun-cse-after-loop,
fschedule-insns,
fschedule-insns2,
fshadow-globals,
fshadow-mem,
fsplit_mem,
fstrength-reduce,
funroll-loops.
o filename
(Output)
Names the output file, which can be either preprocessing output,
assembly code, an object module, or linker output.
U symbol
(Undefine)
Undefine a preprocessor symbol. By default, no symbols are
undefined.
V
(Version)
Display a version message and other information. By default,
the compiler does not display version information.
v960
(Version, terminate)
Display version and terminate.
v (Verbose)
Display the driver's invocation command, and the preprocessor,
compiler, assembler, and linker phase invocations. By default,
the driver does not display individual phase invocations.
w
level
(Diagnostic Level)
Control the level of diagnostics produced by the compiler.
Choose one of the following for level:
use 0 to enable remark, warning and error messages; use 1 to enable
warning and error messages and suppress remark messages; and use
2 to enable error messages and suppress remark and warning messages.
The default level is 1.
W phase,arg[,arg]...
(Pass)
Pass arguments to the preprocessor, compiler, assembler or
linker. For phase,
p indicates
the preprocessor, c
indicates the compiler, a
indicates the assembler and l
indicates the linker. arg
is an argument to be passed. If the argument contains spaces,
you must enclose the argument in quotation characters ("
").
W [no-]arg
(Warnings)
Enables/disables warnings. With no arg,
this option prints extra warning messages for certain events,
including:
- longjmp()
warnings
- Warn if a nonvolatile automatic variable might be changed
by a call to longjmp().
These warnings are possible only in an optimizing compilation.
-
- The compiler sees only the calls to setjmp().
It cannot know where longjmp()
will be called; in fact a signal handler could call it at any
point in the code. As a result, you may get a warning even when
there is in fact no problem because longjmp()
cannot actually be called at the place that would cause a problem.
- return
and return(value)
- Warn if a function can return either with or without a value.
(Falling off the end of the function body is considered returning
with a value.)
- null effect
- Warn if an expression-statement contains no side effects.
- no-op comparison
- Warn if an unsigned value is compared against zero with <
or <=.
- between-ness comparison
- Warn if a comparison like x<=y<=z
is used; this is equivalent to {(x<=y
? 1 : 0) <=z}, which is a different interpretation
from that of ordinary mathematical notation.
- obsolete storage class specification
- Warn if storage-class specifiers like static
are not the first things in a declaration. According to the ANSI
C standard, this usage is obsolescent.
- partially bracketed initializer
- Warn if an aggregate has a partly bracketed initializer.
arg can
be:
aggregate-return
Warn if any functions return structs or unions.
all
Enable several useful warnings, as indicated in
the list below. Has no Wno-all
form.
cast-align
Warn if a pointer cast may not have required alignment.
cast-qual
Warn if a pointer cast removes a type qualifier.
char-subscripts
Warn if an array subscript has type char.
Enabled by Wall.
comment
Warn whenever /* occurs within a comment.
Enabled by Wall.
conversion
Warn if a prototyped parameter causes a different
conversion than if not prototyped.
error
Treat all warnings as errors.
format
Check types of printf
family arguments at compile time. Enabled by Wall.
id-clash-n
Warn if two identifiers match in the first n
characters. Has no Wno-all
form.
implicit
Warn if a function is used before being declared.
Enabled by Wall.
missing-braces
Warn if an aggregate initializer is not fully
braced.
missing-prototypes
Warn if a function is defined before it is prototyped.
Enabled by Wall.
nested-externs
Warn if an extern declaration is seen within a
function.
parentheses
Warn if parentheses are suggested around an expression.
Enabled by Wall.
pointer-arith
Warn if the size of a function type or type void
is used.
redundant-decls
Warn if an object is declared twice in the same
scope.
return-type
Warn if any function implicitly returns int,
and if a non-void function does not return a value. Enabled by
Wall.
shadow
Warn if a local variable shadows another local
variable.
strict-prototypes
Warn if a function is declared without a prototype.
switch
Warn if a switch statement on an enumeration type
does not have a case for each enumerator. Enabled by Wall.
traditional
Warn about constructs that behave differently
under traditional C and ANSI C.
trigraphs
Warn if any trigraphs are encountered. Enabled
by Wall.
uninitialized
Warn if use of an uninitialized local variable
is detected. Enabled by Wall.
unused
Warn about objects that are never used. Enabled
by Wall.
write-strings
Warn if string constants are used in a writable
context.
Yd,dir
(Specify PDB)
Specifies the name of a program database directory.
Z filename
(Listname)
Directs the listing to the named file. This option implies
the z
(List) option and s
argument.
z
arg...
(List)
Create a listing file with the suffix .L
for each C source file. arg
is a string containing one or more of the following letters:
- c
- Add conditionally noncompiled source text to the primary source
text listing.
- i
- Add included source text to the primary source text listing.
- m
- Add macro-expanded preprocessor lines to the primary source
text listing.
- o
- Add assembly language code generated by the compiler to the
listing file.
- s
- List the primary source text.
L dir
Add the directory dir
to the linker's search list for libraries.
l lib
Add the library lib
to the linker's list of input libraries.
m
Create a linker map file.
r
Retain relocation information in the object file
produced by the linker.
s
Strip line number and symbol table entries from
the object file produced by the linker.
T target
Select a configuration file that names a startup
routine, system call library, and linker directive file for a
specific run-time environment.
u symbol
Introduce an undefined symbol to the linker.
x
Remove local symbols from the symbol table in
the linker's output.
Return
to the top of this page.
Return
to the ic960 Interface Index.