This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: __need macros for communication with compiler-provided headers


On 3/22/2017 11:21 AM, Zack Weinberg wrote:
__need_int_reg_t requests a single definition from
the Tile-specific arch/abi.h (I don't_know_  that this is provided by
the compiler, but it's not in our source tree).

It's provided in the Linux tree, as arch/tile/include/uapi/arch/abi.h .
In retrospect I'm not sure this was the cleanest possible approach,
but it's the one we ended up using.

The int_reg_t type (and related, uint_reg_t, INT_REG_FMT, and
INT_REG_BITS) tell you whether the architecture fundamentally has
32-bit types (tilepro) or 64-bit types (tilegx).  This avoids various
issues with ILP32 mode on tilegx, where we might be tempted to assume
registers were only 32-bits, even though they are in fact 64 bits. We
use the type for registers in sigcontext.h and ptrace.h in the kernel,
and similarly ucontext.h, setjmp.h, etc in glibc.

--
Chris Metcalf, Mellanox Technologies
http://www.mellanox.com


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]