OpenRISC: Account for red-zone (fixup printf bug).

This patch allocate a space in the stack to account for red-zone
that gcc may utilize for the use of leaf functions. Care must be
taken to handle this red-zone from many places:
1- Upon creation of a new thread stack.
2- Once an interrupt entred.

Also moving the enable-thread-dispach() and increment ISR level before
checking if dispatch needed was required.

The previous modifications solved the printf bug which disabled ticker
to output strings after context switches that arise from Thread_Delay_ended.
This commit is contained in:
Hesham ALMatary
2014-09-15 17:33:28 -05:00
committed by Joel Sherrill
parent 7f8a978e6b
commit eb14fc2b2e
3 changed files with 23 additions and 20 deletions

View File

@@ -16,7 +16,7 @@
*/
#define EXCEPTION_SETUP(vector) \
l.nop ;\
l.addi r1, r1, -4 ;\
l.addi r1, r1, -200 ;\
l.sw 0(r1), r3; \
l.addi r3, r0, vector; \
l.j _ISR_Handler; \