Eliminate some warnings
This commit is contained in:
parent
0f249016a0
commit
93e7b5d7a0
@ -41,6 +41,7 @@
|
||||
****************************************************************************************************/
|
||||
|
||||
#include <nuttx/config.h>
|
||||
#include <nuttx/compiler.h>
|
||||
|
||||
/****************************************************************************************************
|
||||
* Pre-processor Definitions
|
||||
|
@ -50,18 +50,6 @@
|
||||
#include "up_internal.h"
|
||||
#include "up_arch.h"
|
||||
|
||||
/****************************************************************************
|
||||
* Pre-processor Definitions
|
||||
****************************************************************************/
|
||||
|
||||
/****************************************************************************
|
||||
* Private Data
|
||||
****************************************************************************/
|
||||
|
||||
/****************************************************************************
|
||||
* Private Functions
|
||||
****************************************************************************/
|
||||
|
||||
/****************************************************************************
|
||||
* Public Functions
|
||||
****************************************************************************/
|
||||
@ -91,18 +79,18 @@ void up_initial_state(struct tcb_s *tcb)
|
||||
|
||||
/* Set the initial stack pointer to the "base" of the allocated stack */
|
||||
|
||||
xcp->regs[REG_SPH] = (uint8_t)((uint16_t)tcb->adj_stack_ptr >> 8);
|
||||
xcp->regs[REG_SPL] = (uint8_t)((uint16_t)tcb->adj_stack_ptr & 0xff);
|
||||
xcp->regs[REG_SPH] = (uint8_t)((uintptr_t)tcb->adj_stack_ptr >> 8);
|
||||
xcp->regs[REG_SPL] = (uint8_t)((uintptr_t)tcb->adj_stack_ptr & 0xff);
|
||||
|
||||
/* Save the task entry point */
|
||||
|
||||
#if !defined(REG_PC2)
|
||||
xcp->regs[REG_PC0] = (uint8_t)((uint16_t)tcb->start >> 8);
|
||||
xcp->regs[REG_PC1] = (uint8_t)((uint16_t)tcb->start & 0xff);
|
||||
xcp->regs[REG_PC0] = (uint8_t)((uintptr_t)tcb->start >> 8);
|
||||
xcp->regs[REG_PC1] = (uint8_t)((uintptr_t)tcb->start & 0xff);
|
||||
#else
|
||||
xcp->regs[REG_PC0] = (uint8_t)((uint32_t)tcb->start >> 16);
|
||||
xcp->regs[REG_PC1] = (uint8_t)((uint32_t)tcb->start >> 8);
|
||||
xcp->regs[REG_PC2] = (uint8_t)((uint32_t)tcb->start & 0xff);
|
||||
xcp->regs[REG_PC0] = (uint8_t)((uintptr_t)tcb->start >> 16);
|
||||
xcp->regs[REG_PC1] = (uint8_t)((uintptr_t)tcb->start >> 8);
|
||||
xcp->regs[REG_PC2] = (uint8_t)((uintptr_t)tcb->start & 0xff);
|
||||
#endif
|
||||
|
||||
/* Enable or disable interrupts, based on user configuration */
|
||||
|
Loading…
Reference in New Issue
Block a user