Next: , Previous: RS/6000 and PowerPC Options, Up: Submodel Options


3.17.32 RX Options

These -m options are defined for RX implementations:

-m64bit-doubles
-m32bit-doubles
-fpu
-nofpu
Make the double data type be 64-bits (-m64bit-doubles) or 32-bits (-m32bit-doubles) in size. The default is -m64bit-doubles. Note the RX's hardware floating point instructions are only used for 32-bit floating point values, and then only if -ffast-math has been specified on the command line. This is because the RX FPU instructions do not properly support denormal (or sub-normal) values.

The options -fpu and -nofpu have been provided at the request of Rensas for compatibility with their toolchain. The -mfpu option enables the use of RX FPU instructions by selecting 32-bit doubles and enabling unsafe math optimizations. The -mnofpu option disables the use of RX FPU instructions, even if -m32bit-doubles is active and unsafe math optimizations have been enabled.

-mcpu=name
-patch=name
Selects the type of RX CPU to be targeted. Currently on two types are supported, the generic RX600 and the specific RX610. The only difference between them is that the RX610 does not support the MVTIPL instruction.
-mbig-endian-data
-mlittle-endian-data
Store data (but not code) in the big-endian format. The default is -mlittle-endian-data, ie to store data in the little endian format.
-msmall-data-limit=N
Specifies the maximum size in bytes of global and static variables which can be placed into the small data area. Using the small data area can lead to smaller and faster code, but the size of area is limited and it is up to the programmer to ensure that the area does not overflow. Also when the small data area is used one of the RX's registers (r13) is reserved for use pointing to this area, so it is no longer available for use by the compiler. This could result in slower and/or larger code if variables which once could have been held in r13 are now pushed onto the stack.

Note, common variables (variables which have not been initialised) and constants are not placed into the small data area as they are assigned to other sections in the output executeable.

The default value is zero, which disables this feature. Note, this feature is not enabled by default with higher optimization levels (-O2 etc) because of the potentially deterimental effects of reserving register r13. It is up to the programmer to experiment and discover whether this feature is of benefit to their program.

-msim
-mno-sim
Use the simulator runtime. The default is to use the libgloss board specific runtime.
-mas100-syntax
-mno-as100-syntax
When generating assembler output use a syntax that is compatible with Renesas's AS100 assembler. This syntax can also be handled by the GAS assembler but it has some restrictions so generating it is not the default option.
-mmax-constant-size=N
Specifies the maxium size, in bytes, of a constant that can be used as an operand in a RX instruction. Although the RX instruction set does allow consants of up to 4 bytes in length to be used in instructions, a longer value equates to a longer instruction. Thus in some circumstances it can be beneficial to restrict the size of constants that are used in instructions. Constants that are too big are instead placed into a constant pool and referenced via register indirection.

The value N can be between 0 and 3. A value of 0, the default, means that constants of any size are allowed.

-mrelax
Enable linker relaxation. Linker relaxation is a process whereby the linker will attempt to reduce the size of a program by finding shorter versions of various instructions. Disabled by default.
-mint-register=N
Specify the number of registers to reserve for fast interrupt handler functions. The value N can be between 0 and 4. A value of 1 means that register r13 will be reserved for ther exclusive use of fast interrupt handlers. A value of 2 reserves r13 and r12. A value of 3 reserves r13, r12 and r11, and a value of 4 reserves r13 through r10. A value of 0, the default, does not reserve any registers.
-msave-acc-in-interrupts
Specifies that interrupt handler functions should preserve the accumulator register. This is only necessary if normal code might use the accumulator register, for example because it performs 64-bit multiplications. The default is to ignore the accumulator as this makes the interrupt handlers faster.

Note: The generic GCC command line -ffixed-reg has special significance to the RX port when used with the interrupt function attribute. This attribute indicates a function intended to process fast interrupts. GCC will will ensure that it only uses the registers r10, r11, r12 and/or r13 and only provided that the normal use of the corresponding registers have been restricted via the -ffixed-reg or -mint-register command line options.