Specifications

172 www.xilinx.com Embedded System Tools Guide (EDK 6.2i)
1-800-255-7778 UG111 (v1.4) January 30, 2004
Chapter 11: GNU Compiler Tools
R
x Preprocessor output (.i or .ii file) (if -save-temps option is used)
MicroBlaze GNU Compiler
The MicroBlaze GNU compiler is an enhancement over the standard GNU tools and hence
provides some additional options, which are specific to the MicroBlaze system.These
options are available only in the MicroBlaze GNU compiler.
Quick Reference
MicroBlaze Compiler
The mb-gcc compiler for Xilinx’s MicroBlaze soft processor introduces some new options
as well as modifications to certain options supported by the gnu compiler tools. The new
and modified options are summarized in this chapter.
-mxl-soft-mul
In some devices, a hardware multiplier is not present. In such cases, the user has the option
to either build the multiplier in hardware or use the software multiplier library routine
provided. MicroBlaze compiler mb-gcc assumes that the target device does not have a
hardware multiplier and hence every multiply operation is replaced by a call to
mulsi3_proc defined in library libc.a. Appropriate arguments are set before calling this
routine.
-mno-xl-soft-mul
Certain devices such as Virtex II have a hardware multiplier integrated on the device.
Hence the compiler can safely generate the mul or muli instruction. Using a hardware
Table 11-6: MicroBlaze Specific Options
Options Explanation
-xl-mode-executable Default mode for compilation.
-xl-mode-xmdstub Software intrusive debugging on the board. Should be used only with xmdstub
downloaded on to MicroBlaze
-xl-mode-xilkernel If you use the xilkernel module, all the programs should be compiled with this
option.
-mxl-gp-opt Use the small data area anchors. Optimization for performance and size.
-mxl-soft-mul Use the software routine for all multiply operations. This option should be used
for devices without the hardware multiplier. This is the default option in mb-gcc
-mno-xl-soft-mul Do not use software multiplier. Compiler generates “mul” instructions.
-mxl-soft-div Use the software routine for all divide operations.This is the default option.
-mxl-no-soft-div Use the hardware divide available in the MicroBlaze
-mxl-stack-check Generates code for checking stack overflow.
-mxl-barrel-shift Use barrel shifter. Use this option when a barrel shifter is present in the device