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: Yvan Roux
Subject: Re: [Libunwind-devel] [PATCH] restore "x0" and "x1" registers
Date: Tue, 30 Sep 2014 12:55:45 +0200

> 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.

I should read manuals till the end ! Sorry I was misled as it is after
the remote unwinding part.

Right, it is not specified in the AArch64 ABI that exception handlers
arguments have reserved registers as it uses the standard convention
to pass arguments, and in the GCC case only registers X0-X3 are used
for that (it is what I've implemented in Gregs.c in this port).
Thus, I think that they all have to be restored if they have been set
before (i.e. the corresponding eh_valid_mask is true).  Arun does it
make sense ?

Yvan



reply via email to

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