This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: Use gen-as-const.py to process .pysym files
- From: Andreas Schwab <schwab at linux-m68k dot org>
- To: Joseph Myers <joseph at codesourcery dot com>
- Cc: <libc-alpha at sourceware dot org>
- Date: Tue, 04 Dec 2018 23:37:58 +0100
- Subject: Re: Use gen-as-const.py to process .pysym files
- References: <alpine.DEB.2.21.1812042206050.4787@digraph.polyomino.org.uk>
On Dez 04 2018, Joseph Myers <joseph@codesourcery.com> wrote:
> The more correct positive values by themselves produce a failure of
> nptl/test-mutexattr-printers, because masking with
> ~PTHREAD_MUTEXATTR_FLAG_BITS & ~PTHREAD_MUTEX_NO_ELISION_NP now leaves
> a bit -1 << 32 in the Python value, resulting in a KeyError exception.
> To avoid that, places masking with ~ of one of the constants in
> question are changed to mask with 0xffffffff as well (this reflects
> how ~ in Python applies to an infinite-precision integer whereas ~ in
> C does not do any promotions beyond the width of int).
If ~ doesn't reflect C semantics then ^ 0xffffffff would be better.
Andreas.
--
Andreas Schwab, schwab@linux-m68k.org
GPG Key fingerprint = 7578 EB47 D4E5 4D69 2510 2552 DF73 E780 A9DA AEC1
"And now for something completely different."