mirror of
https://sourceware.org/git/binutils-gdb.git
synced 2024-11-23 01:53:38 +08:00
libiberty: sync with gcc
This imports the following commits from GCC as of r15-1722-g7682d115402743: ca2f7c84927f libiberty: Invoke D demangler when --format=auto 94792057ad4a Fix up duplicated words mostly in comments, part 1 20e57660e64e libiberty: Fix error return value in pex_unix_exec_child [PR113957]. 52ac4c6be866 [libiberty] remove TBAA violation in iterative_hash, improve code-gen 53bb7145135c libiberty: Fix up libiberty_vprintf_buffer_size 65388b28656d c++, demangle: Implement https://github.com/itanium-cxx-abi/cxx-abi/issues/148 non-proposal
This commit is contained in:
parent
6f8b365b65
commit
ed8025a576
@ -1,3 +1,48 @@
|
||||
2024-04-02 Tom Tromey <tom@tromey.com>
|
||||
|
||||
* cplus-dem.c (cplus_demangle): Try the D demangler with
|
||||
"auto" format.
|
||||
* testsuite/d-demangle-expected: Add --format=auto test.
|
||||
|
||||
2024-04-02 Jakub Jelinek <jakub@redhat.com>
|
||||
|
||||
* regex.c (byte_re_match_2_internal): Fix duplicated words in comment;
|
||||
next next -> next.
|
||||
* dyn-string.c (dyn_string_init): Fix duplicated words in comment;
|
||||
of of -> of.
|
||||
|
||||
2024-02-19 Iain Sandoe <iain@sandoe.co.uk>
|
||||
|
||||
PR other/113957
|
||||
* pex-unix.c (pex_unix_exec_child): Set pid = -1 in the error
|
||||
paths, since that is used to signal an erroneous outcome for
|
||||
the routine.
|
||||
|
||||
2024-02-15 Richard Biener <rguenther@suse.de>
|
||||
|
||||
* hashtab.c (iterative_hash): Remove TBAA violating handling
|
||||
of aligned little-endian case in favor of just keeping the
|
||||
aligned case special-cased. Use | for composing a larger word.
|
||||
|
||||
2024-02-12 Jakub Jelinek <jakub@redhat.com>
|
||||
|
||||
* vprintf-support.c (libiberty_vprintf_buffer_size): Handle
|
||||
properly l, ll, z, t or on _WIN32 I64 modifiers for diouxX
|
||||
and L modifier for fFgGeE.
|
||||
|
||||
2024-01-13 Jakub Jelinek <jakub@redhat.com>
|
||||
|
||||
* cp-demangle.c (FNQUAL_COMPONENT_CASE): Add case for
|
||||
DEMANGLE_COMPONENT_XOBJ_MEMBER_FUNCTION.
|
||||
(d_dump): Handle DEMANGLE_COMPONENT_XOBJ_MEMBER_FUNCTION.
|
||||
(d_nested_name): Parse H after N in nested name.
|
||||
(d_count_templates_scopes): Handle
|
||||
DEMANGLE_COMPONENT_XOBJ_MEMBER_FUNCTION.
|
||||
(d_print_mod): Likewise.
|
||||
(d_print_function_type): Likewise.
|
||||
* testsuite/demangle-expected: Add tests for explicit object
|
||||
member functions.
|
||||
|
||||
2023-12-05 Jakub Jelinek <jakub@redhat.com>
|
||||
|
||||
* configure.ac (HAVE_X86_SHA1_HW_SUPPORT): Verify __get_cpuid and
|
||||
|
@ -47,7 +47,7 @@ Boston, MA 02110-1301, USA. */
|
||||
|
||||
/* Performs in-place initialization of a dyn_string struct. This
|
||||
function can be used with a dyn_string struct on the stack or
|
||||
embedded in another object. The contents of of the string itself
|
||||
embedded in another object. The contents of the string itself
|
||||
are still dynamically allocated. The string initially is capable
|
||||
of holding at least SPACE characeters, including the terminating
|
||||
NUL. If SPACE is 0, it will silently be increated to 1.
|
||||
|
@ -940,26 +940,23 @@ iterative_hash (const void *k_in /* the key */,
|
||||
c = initval; /* the previous hash value */
|
||||
|
||||
/*---------------------------------------- handle most of the key */
|
||||
#ifndef WORDS_BIGENDIAN
|
||||
/* On a little-endian machine, if the data is 4-byte aligned we can hash
|
||||
by word for better speed. This gives nondeterministic results on
|
||||
big-endian machines. */
|
||||
if (sizeof (hashval_t) == 4 && (((size_t)k)&3) == 0)
|
||||
while (len >= 12) /* aligned */
|
||||
/* Provide specialization for the aligned case for targets that cannot
|
||||
efficiently perform misaligned loads of a merged access. */
|
||||
if ((((size_t)k)&3) == 0)
|
||||
while (len >= 12)
|
||||
{
|
||||
a += *(hashval_t *)(k+0);
|
||||
b += *(hashval_t *)(k+4);
|
||||
c += *(hashval_t *)(k+8);
|
||||
a += (k[0] | ((hashval_t)k[1]<<8) | ((hashval_t)k[2]<<16) | ((hashval_t)k[3]<<24));
|
||||
b += (k[4] | ((hashval_t)k[5]<<8) | ((hashval_t)k[6]<<16) | ((hashval_t)k[7]<<24));
|
||||
c += (k[8] | ((hashval_t)k[9]<<8) | ((hashval_t)k[10]<<16)| ((hashval_t)k[11]<<24));
|
||||
mix(a,b,c);
|
||||
k += 12; len -= 12;
|
||||
}
|
||||
else /* unaligned */
|
||||
#endif
|
||||
while (len >= 12)
|
||||
{
|
||||
a += (k[0] +((hashval_t)k[1]<<8) +((hashval_t)k[2]<<16) +((hashval_t)k[3]<<24));
|
||||
b += (k[4] +((hashval_t)k[5]<<8) +((hashval_t)k[6]<<16) +((hashval_t)k[7]<<24));
|
||||
c += (k[8] +((hashval_t)k[9]<<8) +((hashval_t)k[10]<<16)+((hashval_t)k[11]<<24));
|
||||
a += (k[0] | ((hashval_t)k[1]<<8) | ((hashval_t)k[2]<<16) | ((hashval_t)k[3]<<24));
|
||||
b += (k[4] | ((hashval_t)k[5]<<8) | ((hashval_t)k[6]<<16) | ((hashval_t)k[7]<<24));
|
||||
c += (k[8] | ((hashval_t)k[9]<<8) | ((hashval_t)k[10]<<16)| ((hashval_t)k[11]<<24));
|
||||
mix(a,b,c);
|
||||
k += 12; len -= 12;
|
||||
}
|
||||
|
@ -695,6 +695,7 @@ pex_unix_exec_child (struct pex_obj *obj ATTRIBUTE_UNUSED,
|
||||
{
|
||||
*err = ret;
|
||||
*errmsg = "posix_spawnp";
|
||||
pid = -1; /* The value of pid is unspecified on failure. */
|
||||
goto exit;
|
||||
}
|
||||
}
|
||||
@ -705,6 +706,7 @@ pex_unix_exec_child (struct pex_obj *obj ATTRIBUTE_UNUSED,
|
||||
{
|
||||
*err = ret;
|
||||
*errmsg = "posix_spawn";
|
||||
pid = -1;
|
||||
goto exit;
|
||||
}
|
||||
}
|
||||
|
@ -5597,7 +5597,7 @@ byte_re_match_2_internal (struct re_pattern_buffer *bufp,
|
||||
to resume scanning the pattern; the second one is where to resume
|
||||
scanning the strings. If the latter is zero, the failure point is
|
||||
a ``dummy''; if a failure happens and the failure point is a dummy,
|
||||
it gets discarded and the next next one is tried. */
|
||||
it gets discarded and the next one is tried. */
|
||||
#ifdef MATCH_MAY_ALLOCATE /* otherwise, this is global. */
|
||||
PREFIX(fail_stack_type) fail_stack;
|
||||
#endif
|
||||
|
@ -56,6 +56,7 @@ libiberty_vprintf_buffer_size (const char *format, va_list args)
|
||||
{
|
||||
if (*p++ == '%')
|
||||
{
|
||||
int prec = 0;
|
||||
while (strchr ("-+ #0", *p))
|
||||
++p;
|
||||
if (*p == '*')
|
||||
@ -76,8 +77,43 @@ libiberty_vprintf_buffer_size (const char *format, va_list args)
|
||||
else
|
||||
total_width += strtoul (p, (char **) &p, 10);
|
||||
}
|
||||
while (strchr ("hlL", *p))
|
||||
++p;
|
||||
do
|
||||
{
|
||||
switch (*p)
|
||||
{
|
||||
case 'h':
|
||||
++p;
|
||||
continue;
|
||||
case 'l':
|
||||
case 'L':
|
||||
++prec;
|
||||
++p;
|
||||
continue;
|
||||
case 'z':
|
||||
prec = 3;
|
||||
++p;
|
||||
continue;
|
||||
case 't':
|
||||
prec = 4;
|
||||
++p;
|
||||
continue;
|
||||
#ifdef _WIN32
|
||||
case 'I':
|
||||
if (p[1] == '6' && p[2] == '4')
|
||||
{
|
||||
prec = 2;
|
||||
p += 3;
|
||||
continue;
|
||||
}
|
||||
break;
|
||||
#endif
|
||||
default:
|
||||
break;
|
||||
}
|
||||
break;
|
||||
}
|
||||
while (1);
|
||||
|
||||
/* Should be big enough for any format specifier except %s and floats. */
|
||||
total_width += 30;
|
||||
switch (*p)
|
||||
@ -88,6 +124,15 @@ libiberty_vprintf_buffer_size (const char *format, va_list args)
|
||||
case 'u':
|
||||
case 'x':
|
||||
case 'X':
|
||||
switch (prec)
|
||||
{
|
||||
case 0: (void) va_arg (ap, int); break;
|
||||
case 1: (void) va_arg (ap, long int); break;
|
||||
case 2: (void) va_arg (ap, long long int); break;
|
||||
case 3: (void) va_arg (ap, size_t); break;
|
||||
case 4: (void) va_arg (ap, ptrdiff_t); break;
|
||||
}
|
||||
break;
|
||||
case 'c':
|
||||
(void) va_arg (ap, int);
|
||||
break;
|
||||
@ -96,10 +141,18 @@ libiberty_vprintf_buffer_size (const char *format, va_list args)
|
||||
case 'E':
|
||||
case 'g':
|
||||
case 'G':
|
||||
(void) va_arg (ap, double);
|
||||
/* Since an ieee double can have an exponent of 307, we'll
|
||||
make the buffer wide enough to cover the gross case. */
|
||||
total_width += 307;
|
||||
if (!prec)
|
||||
{
|
||||
(void) va_arg (ap, double);
|
||||
/* Since an ieee double can have an exponent of 308, we'll
|
||||
make the buffer wide enough to cover the gross case. */
|
||||
total_width += 308;
|
||||
}
|
||||
else
|
||||
{
|
||||
(void) va_arg (ap, long double);
|
||||
total_width += 4932;
|
||||
}
|
||||
break;
|
||||
case 's':
|
||||
total_width += strlen (va_arg (ap, char *));
|
||||
|
Loading…
Reference in New Issue
Block a user