Chapter 14. CRIS Dependent Features

14.1. Command-line Options

The CRIS version of as has these machine-dependent command-line options.

The format of the generated object files can be either ELF or a.out, specified by the command-line options -emulation=crisaout and -emulation=criself. The default is ELF (criself), unless as has been configured specifically for a.out by using the configuration name cris-axis-aout.

There are two different link-incompatible ELF object file variants for CRIS, for use in environments where symbols are expected to be prefixed by a leading _ character and for environments without such a symbol prefix. The variant used for GNU/Linux port has no symbol prefix. Which variant to produce is specified by either of the options -underscore and -no-underscore. The default is -underscore. Since symbols in CRIS a.out objects are expected to have a _ prefix, specifying -no-underscore when generating a.out objects is an error. Besides the object format difference, the effect of this option is to parse register names differently. The -no-underscore option makes a $ register prefix mandatory.

The option -pic must be passed to as in order to recognize the symbol syntax used for ELF (SVR4 PIC) position-independent-code. This will also affect expansion of instructions. The expansion with -pic will use PC-relative rather than (slightly faster) absolute addresses in those expansions.

When -N is specified, as will emit a warning when a 16-bit branch instruction is expanded into a 32-bit multiple-instruction construct (Section 14.2 Instruction expansion).

Some versions of the CRIS v10, for example in the Etrax 100 LX, contain a bug that causes destabilizing memory accesses when a multiply instruction is executed with certain values in the first operand just before a cache-miss. When the -mul-bug-abort command line option is active (the default value), as will refuse to assemble a file containing a multiply instruction at a dangerous offset, one that could be the last on a cache-line, or is in a section with insufficient alignment. This placement checking does not catch any case where the multiply instruction is dangerously placed because it is located in a delay-slot. The -mul-bug-abort command line option turns off the checking.