Next: , Previous: SPARC Options, Up: Submodel Options


3.17.34 SPU Options

These `-m' options are supported on the SPU:

-mwarn-reloc
-merror-reloc
The loader for SPU does not handle dynamic relocations. By default, GCC will give an error when it generates code that requires a dynamic relocation. -mno-error-reloc disables the error, -mwarn-reloc will generate a warning instead.
-msafe-dma
-munsafe-dma
Instructions which initiate or test completion of DMA must not be reordered with respect to loads and stores of the memory which is being accessed. Users typically address this problem using the volatile keyword, but that can lead to inefficient code in places where the memory is known to not change. Rather than mark the memory as volatile we treat the DMA instructions as potentially effecting all memory. With -munsafe-dma users must use the volatile keyword to protect memory accesses.
-mbranch-hints
By default, GCC will generate a branch hint instruction to avoid pipeline stalls for always taken or probably taken branches. A hint will not be generated closer than 8 instructions away from its branch. There is little reason to disable them, except for debugging purposes, or to make an object a little bit smaller.
-msmall-mem
-mlarge-mem
By default, GCC generates code assuming that addresses are never larger than 18 bits. With -mlarge-mem code is generated that assumes a full 32 bit address.
-mstdmain
By default, GCC links against startup code that assumes the SPU-style main function interface (which has an unconventional parameter list). With -mstdmain, GCC will link your program against startup code that assumes a C99-style interface to main, including a local copy of argv strings.
-mfixed-range=register-range
Generate code treating the given register range as fixed registers. A fixed register is one that the register allocator can not use. This is useful when compiling kernel code. A register range is specified as two registers separated by a dash. Multiple register ranges can be specified separated by a comma.
-mdual-nops
-mdual-nops=n
By default, GCC will insert nops to increase dual issue when it expects it to increase performance. n can be a value from 0 to 10. A smaller n will insert fewer nops. 10 is the default, 0 is the same as -mno-dual-nops. Disabled with -Os.
-mhint-max-nops=n
Maximum number of nops to insert for a branch hint. A branch hint must be at least 8 instructions away from the branch it is effecting. GCC will insert up to n nops to enforce this, otherwise it will not generate the branch hint.
-mhint-max-distance=n
The encoding of the branch hint instruction limits the hint to be within 256 instructions of the branch it is effecting. By default, GCC makes sure it is within 125.
-msafe-hints
Work around a hardware bug which causes the SPU to stall indefinitely. By default, GCC will insert the hbrp instruction to make sure this stall won't happen.