/* HP PA-RISC SOM object file format: definitions internal to BFD.
- Copyright (C) 1990-2020 Free Software Foundation, Inc.
+ Copyright (C) 1990-2023 Free Software Foundation, Inc.
Contributed by the Center for Software Science at the
University of Utah (pa-gdb-bugs@cs.utah.edu).
static inline unsigned ATTRIBUTE_UNUSED
sign_extend (unsigned x, unsigned len)
{
- unsigned signbit = (1 << (len - 1));
+ unsigned signbit = (1u << (len - 1));
unsigned mask = (signbit << 1) - 1;
return ((x & mask) ^ signbit) - signbit;
}