Technical information

Operating Precautions for CPDW9X/NT-CDR-V85X, Y-GHS-MULTI-V800
TM
Customer Notification r20tu0003ed1812 73
No. a61
Far call patch of interrupt prologue function overwrites R1
Version Information
V3.5.1, V4.0.5
Details
When compiling with Ospace, the GHS compiler uses its library prologue and epilogue
functions.
If the function is too far away for jarl instruction, the compiler introduces a far call patch function.
This is not a problem in any other functions but interrupt service routine.
Indeed the register R1 will be destroyed before being saved.
Example:
------------
#pragma ghs interrupt
void INTTM0EQ0(void) //timer valid edge / match
addi 0xffffffa0, sp, sp
st.w lp, 0x5c[sp]
jarl _ghscallpatch___ghs32rsave00i_0 (0x7da), lp
_ghscallpatch___ghs32rsave00i_0:
mov 0x10008c8, r1
jmp [r1]
Command Line
ccv850e Ospace
Workaround
1. Use prepare_dispose
2. Use inline_prologue