Skip to main content
Renesas Electronics Europe - Knowledgebase

What is a register mode?

Latest Updated:09/04/2015


What is a register mode?


The register modes control the number of registers of the RH850 used by CC-RH to be 32 (32-register mode) or 22 (22-register mode or common register mode). The difference between the 22-register and common register modes is described in the answer to the next question.

Register mode Working registers Registers for register variables


r10 ～ r14 r25 ～ r29


r10 ～ r19 r20 ～ r29


r10 ～ r14 r25 ～ r29

That is, r15 to r24 are not used in 22-register mode.
The following are the comparative advantages and disadvantages of the situations where the 22- and 32-register modes are designated.

In saving and restoring at the time of an interrupt, processing to save and restore the values of registers in use by the compiler within the interrupt function (handler) proceeds.

Since the compiler uses the number of registers designated by the register mode, fewer registers have to be saved and restored in the 22-register mode, so saving and restoring will be faster.
This mode also leaves r15 to r24 freely available for use within assembler code.


The speed of normal processing might be slower, since the compiler is able to use fewer registers. This may increase the required ROM capacity.

Suitable Products
C Compiler Package for RH850 Family