mirror of
git://repo.or.cz/tinycc.git
synced 2026-06-30 00:28:42 +08:00
arm64: fix some casts
in the new common backtrace/context code.
This commit is contained in:
parent
2fb79a6326
commit
6cb68c3a17
4
tccrun.c
4
tccrun.c
@ -597,7 +597,7 @@ static void rt_getcontext(ucontext_t *uc, rt_context *rc)
|
|||||||
rc->sp = uc->uc_mcontext.arm_sp;
|
rc->sp = uc->uc_mcontext.arm_sp;
|
||||||
#elif defined(__aarch64__)
|
#elif defined(__aarch64__)
|
||||||
rc->ip = uc->uc_mcontext.pc;
|
rc->ip = uc->uc_mcontext.pc;
|
||||||
rc->fp = (addr_t *)uc->uc_mcontext.regs[29];
|
rc->fp = uc->uc_mcontext.regs[29];
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -760,7 +760,7 @@ static int rt_get_caller_pc(addr_t *paddr, rt_context *rc, int level)
|
|||||||
if (level == 0) {
|
if (level == 0) {
|
||||||
*paddr = rc->ip;
|
*paddr = rc->ip;
|
||||||
} else {
|
} else {
|
||||||
addr_t *fp = rc->fp;
|
addr_t *fp = (addr_t*)rc->fp;
|
||||||
while (--level)
|
while (--level)
|
||||||
fp = (addr_t *)fp[0];
|
fp = (addr_t *)fp[0];
|
||||||
*paddr = fp[1];
|
*paddr = fp[1];
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user