libunwind-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Libunwind-devel] [PATCH] restore "x0" and "x1" registers


From: C Bergström
Subject: Re: [Libunwind-devel] [PATCH] restore "x0" and "x1" registers
Date: Mon, 29 Sep 2014 16:07:31 +0700

I'm in the middle man for this discussion and apologize about the delay..
----------

On Thu, Sep 25, 2014 at 9:59 PM, Yvan Roux <address@hidden> wrote:
Hi (sorry I was on a trip)

>> This patch is needed for us in AARCH64 - Restore "x0" and "x1" registers
>> because they contain exception pointer and selector.

According to the unw_resume() description for local unwinding,
restoring the machine state when no signal is involved only restore
the callee-saved registers (r19..r28 for AArch64 + the link register
r30).

Can you give me more input here why it is needed ?

Thanks,
Yvan

unw_resume man page contains the following:

Most platforms reserve some registers to pass arguments to exception handlers (e.g., IA-64 uses r15-r18 for this purpose). These registers are normally treated like "scratch" registers. However, if libunwind is used to set an exception argument register to a particular value (e.g., via
unw_set_reg()), then unw_resume() will install this value as the contents of the register. In other words, the exception handling arguments are installed even in cases where normally only the "preserved" registers are restored.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]