Fix stack addressing

git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@33 42af7a65-404d-4744-a932-0658087f49c3
This commit is contained in:
patacongo 2007-03-02 23:34:42 +00:00
parent 273e5d0d0e
commit fdc7d628d1
2 changed files with 12 additions and 12 deletions

View File

@ -136,7 +136,7 @@ void up_restorecontext(FAR struct xcptcontext *context)
{
int nbytes = context->nbytes;
FAR ubyte *src = context->stack;
FAR ubyte *dest = (FAR ubyte*)STACK_BASE;
NEAR ubyte *dest = (NEAR ubyte*)STACK_BASE;
/* Interrupts should be disabled for the following. up_popcontext() will
* set the new interrupt state correctly.
@ -181,7 +181,7 @@ void up_restorestack(FAR struct xcptcontext *context)
ubyte nbytes = context->nbytes;
FAR ubyte *src = context->stack;
FAR ubyte *dest = (FAR ubyte*)STACK_BASE;
NEAR ubyte *dest = (NEAR ubyte*)STACK_BASE;
while (nbytes--)
{

View File

@ -143,7 +143,7 @@ ubyte up_savecontext(FAR struct xcptcontext *context)
*/
ubyte nbytes = sp - (STACK_BASE-1);
FAR ubyte *src = (FAR ubyte*)STACK_BASE;
NEAR ubyte *src = (NEAR ubyte*)STACK_BASE;
FAR ubyte *dest = context->stack;
/* Then copy the stack info into the context structure */
@ -192,7 +192,7 @@ void up_savestack(FAR struct xcptcontext *context)
*/
ubyte nbytes = g_irqtos - (STACK_BASE-1);
FAR ubyte *src = (FAR ubyte*)STACK_BASE;
NEAR ubyte *src = (NEAR ubyte*)STACK_BASE;
FAR ubyte *dest = context->stack;
context->nbytes = nbytes;