This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH] Guard declarations of 'sve_*_from_*' macros on Aarch64 (and unbreak build)
- From: Sergio Durigan Junior <sergiodj at redhat dot com>
- To: GDB Patches <gdb-patches at sourceware dot org>
- Cc: Alan Hayward <alan dot hayward at arm dot com>, nd at arm dot com
- Date: Tue, 05 Jun 2018 19:36:59 -0400
- Subject: Re: [PATCH] Guard declarations of 'sve_*_from_*' macros on Aarch64 (and unbreak build)
- References: <87zi09vw7m.fsf@redhat.com> <20180605220556.7418-1-sergiodj@redhat.com>
On Tuesday, June 05 2018, I wrote:
> In order to fix this breakage, this commit guards the declaration of
> the macros using #ifndef's. It is important to mention that the
> system headers use a value to multiply/divide the vector
> length (SVE_VQ_BYTES, defined as 16 on the system I'm using) which is
> different than the values being used by the macros defined in GDB. I
> wasn't sure how to consolidate that, so I chose to ignore this
> discrepancy.
Actually, I just saw that there's no discrepancy. The system header
defines the following macros:
#define SVE_VQ_BYTES 16 /* number of bytes per quadword */
...
#define sve_vq_from_vl(vl) ((vl) / SVE_VQ_BYTES)
#define sve_vl_from_vq(vq) ((vq) * SVE_VQ_BYTES)
and GDB does this:
#ifndef sve_vq_from_vl
#define sve_vq_from_vl(vl) ((vl) / 0x10)
#endif
#ifndef sve_vl_from_vq
#define sve_vl_from_vq(vq) ((vq) * 0x10)
#endif
which is fine. I'll remove this comment from the commit log.
Thanks,
--
Sergio
GPG key ID: 237A 54B1 0287 28BF 00EF 31F4 D0EB 7628 65FC 5E36
Please send encrypted e-mail if possible
http://sergiodj.net/