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:
Xiang Xiao
2022-02-13 04:47:40 +08:00
committed by Petro Karashchenko
parent a1f6717e2a
commit e1879e35cd
5 changed files with 5 additions and 42 deletions
-4
View File
@@ -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;
-5
View File
@@ -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 ************************************************************/
+5 -5
View File
@@ -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