메인 콘텐츠로 건너뛰기
Knowledgebase
Home
Renesas Korea

Is it OK not to retain the values of work registers during assembly?

Latest Updated:12/01/2011

Question:

I am creating a source to call an assembly module from C language within the interrupt handler.
On p.113 of the C Language User's Manual (U15025EJ1V0UM00), there is a description

"When using the register variable register in the assembly-language source program, make sure that the value of the register variable register is retained both before and after calling the program".

However, there is no description about work registers (r10-r14).
If work registers are used in an assembly source, is there any effect on C language?
Is it OK not to retain the values of work registers during assembly?

Answer:

When an interrupt handler is described in C language (when register saving at the beginning of the interrupt handler and register restoration at the end of the interrupt handler are completely performed in C language), the use of work registers has no effect on C language if an assembler description module is just called in the C program of that handler.
Suitable Products