gcc: RL78 Options
1
1 3.18.39 RL78 Options
1 --------------------
1
1 '-msim'
1 Links in additional target libraries to support operation within a
1 simulator.
1
1 '-mmul=none'
1 '-mmul=g10'
1 '-mmul=g13'
1 '-mmul=g14'
1 '-mmul=rl78'
1 Specifies the type of hardware multiplication and division support
1 to be used. The simplest is 'none', which uses software for both
1 multiplication and division. This is the default. The 'g13' value
1 is for the hardware multiply/divide peripheral found on the
1 RL78/G13 (S2 core) targets. The 'g14' value selects the use of the
1 multiplication and division instructions supported by the RL78/G14
1 (S3 core) parts. The value 'rl78' is an alias for 'g14' and the
1 value 'mg10' is an alias for 'none'.
1
1 In addition a C preprocessor macro is defined, based upon the
1 setting of this option. Possible values are: '__RL78_MUL_NONE__',
1 '__RL78_MUL_G13__' or '__RL78_MUL_G14__'.
1
1 '-mcpu=g10'
1 '-mcpu=g13'
1 '-mcpu=g14'
1 '-mcpu=rl78'
1 Specifies the RL78 core to target. The default is the G14 core,
1 also known as an S3 core or just RL78. The G13 or S2 core does not
1 have multiply or divide instructions, instead it uses a hardware
1 peripheral for these operations. The G10 or S1 core does not have
1 register banks, so it uses a different calling convention.
1
1 If this option is set it also selects the type of hardware multiply
1 support to use, unless this is overridden by an explicit
1 '-mmul=none' option on the command line. Thus specifying
1 '-mcpu=g13' enables the use of the G13 hardware multiply peripheral
1 and specifying '-mcpu=g10' disables the use of hardware
1 multiplications altogether.
1
1 Note, although the RL78/G14 core is the default target, specifying
1 '-mcpu=g14' or '-mcpu=rl78' on the command line does change the
1 behavior of the toolchain since it also enables G14 hardware
1 multiply support. If these options are not specified on the
1 command line then software multiplication routines will be used
1 even though the code targets the RL78 core. This is for backwards
1 compatibility with older toolchains which did not have hardware
1 multiply and divide support.
1
1 In addition a C preprocessor macro is defined, based upon the
1 setting of this option. Possible values are: '__RL78_G10__',
1 '__RL78_G13__' or '__RL78_G14__'.
1
1 '-mg10'
1 '-mg13'
1 '-mg14'
1 '-mrl78'
1 These are aliases for the corresponding '-mcpu=' option. They are
1 provided for backwards compatibility.
1
1 '-mallregs'
1 Allow the compiler to use all of the available registers. By
1 default registers 'r24..r31' are reserved for use in interrupt
1 handlers. With this option enabled these registers can be used in
1 ordinary functions as well.
1
1 '-m64bit-doubles'
1 '-m32bit-doubles'
1 Make the 'double' data type be 64 bits ('-m64bit-doubles') or 32
1 bits ('-m32bit-doubles') in size. The default is
1 '-m32bit-doubles'.
1
1 '-msave-mduc-in-interrupts'
1 '-mno-save-mduc-in-interrupts'
1 Specifies that interrupt handler functions should preserve the MDUC
1 registers. This is only necessary if normal code might use the
1 MDUC registers, for example because it performs multiplication and
1 division operations. The default is to ignore the MDUC registers
1 as this makes the interrupt handlers faster. The target option
1 -mg13 needs to be passed for this to work as this feature is only
1 available on the G13 target (S2 core). The MDUC registers will
1 only be saved if the interrupt handler performs a multiplication or
1 division operation or it calls another function.
1