mirror of
https://github.com/apache/nuttx.git
synced 2026-06-06 16:50:55 +08:00
arch/sim: Always typedef xcpt_reg_t to unsigned long
to simplify the code logic Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
This commit is contained in:
committed by
Petro Karashchenko
parent
a1f6717e2a
commit
e1879e35cd
@@ -41,11 +41,7 @@
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
#if defined(CONFIG_HOST_X86_64) && !defined(CONFIG_SIM_M32)
|
||||
void up_copyfullstate(unsigned long *dest, unsigned long *src)
|
||||
#else
|
||||
void up_copyfullstate(uint32_t *dest, uint32_t *src)
|
||||
#endif
|
||||
{
|
||||
int i;
|
||||
|
||||
|
||||
@@ -125,12 +125,7 @@ extern char **g_argv;
|
||||
|
||||
/* Context switching */
|
||||
|
||||
#if defined(CONFIG_HOST_X86_64) && !defined(CONFIG_SIM_M32)
|
||||
void up_copyfullstate(unsigned long *dest, unsigned long *src);
|
||||
#else
|
||||
void up_copyfullstate(uint32_t *dest, uint32_t *src);
|
||||
#endif
|
||||
|
||||
void *up_doirq(int irq, void *regs);
|
||||
|
||||
/* up_hostmisc.c ************************************************************/
|
||||
|
||||
@@ -93,8 +93,8 @@ pid_t up_vfork(const xcpt_reg_t *context)
|
||||
xcpt_reg_t stackutil;
|
||||
|
||||
sinfo("vfork context [%p]:\n", context);
|
||||
sinfo(" frame pointer:%08" PRIxPTR " sp:%08" PRIxPTR " pc:%08" PRIxPTR ""
|
||||
"\n", context[JB_FP], context[JB_SP], context[JB_PC]);
|
||||
sinfo(" frame pointer:%08lx sp:%08lx pc:%08lx\n",
|
||||
context[JB_FP], context[JB_SP], context[JB_PC]);
|
||||
|
||||
/* Allocate and initialize a TCB for the child task. */
|
||||
|
||||
@@ -118,7 +118,7 @@ pid_t up_vfork(const xcpt_reg_t *context)
|
||||
DEBUGASSERT(stacktop > context[JB_SP]);
|
||||
stackutil = stacktop - context[JB_SP];
|
||||
|
||||
sinfo("Parent: stackutil:%" PRIuPTR "\n", stackutil);
|
||||
sinfo("Parent: stackutil:%lu\n", stackutil);
|
||||
|
||||
/* Make some feeble effort to preserve the stack contents. This is
|
||||
* feeble because the stack surely contains invalid pointers and other
|
||||
@@ -144,9 +144,9 @@ pid_t up_vfork(const xcpt_reg_t *context)
|
||||
newfp = context[JB_FP];
|
||||
}
|
||||
|
||||
sinfo("Old stack top:%08" PRIxPTR " SP:%08" PRIxPTR " FP:%08" PRIxPTR "\n",
|
||||
sinfo("Old stack top:%08lx SP:%08lx FP:%08lx\n",
|
||||
stacktop, context[JB_SP], context[JB_FP]);
|
||||
sinfo("New stack top:%08" PRIxPTR " SP:%08" PRIxPTR " FP:%08" PRIxPTR "\n",
|
||||
sinfo("New stack top:%08lx SP:%08lx FP:%08lx\n",
|
||||
newtop, newsp, newfp);
|
||||
|
||||
/* Update the stack pointer, frame pointer, and volatile registers. When
|
||||
|
||||
Reference in New Issue
Block a user