[PATCH] Guard declarations of 'sve_*_from_*' macros on Aarch64 (and unbreak build)

Sergio Durigan Junior sergiodj@redhat.com
Tue Jun 5 23:37:00 GMT 2018


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/



More information about the Gdb-patches mailing list