I want to use SSL(System Services Library) in the uCOS, but when porting the interrupt processing, I found there are some bugs in the adi_int_NestingISR.
In the flowing code, R0 has the IVG number, the code want to save the IVG number to the stack, and restore it from stack after OS_CPU_ISR_Entry call, but in the OS_CPU_ISR_Entry function, there are always many registers be saved to the stack, and the SP is decreased when return from OS_CPU_ISR_Entry, so the "R0 = [SP++];" does not works as wanted, the R0 is not the IVG number now.
/* Anomaly 05000428 does not apply here because the memory read is from MMR space */
/* Save the RETS before making the call */
[ -- SP ] = RETS ;
/* this function takes care of incrementing OSIntNesting and saving */
/* processor context. */
[--SP] = R0; /* since OS_CPU_ISR_Entry is an external function (uCOS port), it's register usage */
/* is not known, so it's just better to save the argument on the stack */
R0 = NESTED;
R0 = [SP++];
/* Setup C Run-Time stack */
SP += -12 ;/* make space for outgoing arguments when calling C-functions */