From: Simon Marchi <simon.marchi@polymtl.ca>
To: Ulrich Weigand <uweigand@de.ibm.com>
Cc: gdb-patches@sourceware.org, simon.marchi@ericsson.com
Subject: Re: [RFC PATCH] Read pseudo registers from frame instead of regcache
Date: Tue, 29 May 2018 02:52:00 -0000 [thread overview]
Message-ID: <145043fef77f5d64d115e5a83a5148b3@polymtl.ca> (raw)
In-Reply-To: <13ad2ec8a2cd7b6393613e4728d70736@polymtl.ca>
On 2018-05-28 15:13, Simon Marchi wrote:
> Ok, I was assuming that it was never possible for the debug info to
> describe how pseudo registers are saved, only raw registers. Do you
> have an architecture in mind where it's possible to have a pseudo
> register mentioned in the unwind information? GNU as doesn't accept
> at all "ymm0" or "ymm0h" as an argument to .cfi_offset, so I don't
> know how ymm0 would be represented if we wanted to save it (despite it
> not being callee saved according to the ABI).
I looked at ARMv7, and one case where this might happen is the VFP
registers. The dX registers (64-bits) are the raw ones and the sX
(32-bits) are the pseudo ones (where two sX registers make up one dX
register). The GNU assembler accepts using s0 with .cfi_offset (for
backwards compatibility, I guess?), so we end up with it in the unwind
info. However, this is an obsolete way of doing it according to the
"DWARF for the ARM Architecture" document [1]. They recommend to
describe the sX registers as bit pieces of the dX registers. That
recommendation would be in line with the "only raw registers in unwind
info" assumption. But it means that we can encounter this in the wild.
Simon
[1]
http://infocenter.arm.com/help/topic/com.arm.doc.ihi0040b/IHI0040B_aadwarf.pdf
next prev parent reply other threads:[~2018-05-28 22:18 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-05-26 1:14 Simon Marchi
2018-05-27 5:14 ` Tom Tromey
2018-05-28 16:10 ` Simon Marchi
2018-05-28 19:13 ` Ulrich Weigand
2018-05-28 22:06 ` Simon Marchi
2018-05-29 2:52 ` Simon Marchi [this message]
2018-05-29 14:53 ` Ulrich Weigand
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=145043fef77f5d64d115e5a83a5148b3@polymtl.ca \
--to=simon.marchi@polymtl.ca \
--cc=gdb-patches@sourceware.org \
--cc=simon.marchi@ericsson.com \
--cc=uweigand@de.ibm.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).