This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [RFC 2.0] Implementing hwcap2
- From: Richard Henderson <rth at twiddle dot net>
- To: "Ryan S. Arnold" <ryan dot arnold at gmail dot com>
- Cc: "Ryan S. Arnold" <rsa at us dot ibm dot com>, libc-alpha <libc-alpha at sourceware dot org>
- Date: Thu, 28 Mar 2013 16:52:47 -0700
- Subject: Re: [RFC 2.0] Implementing hwcap2
- References: <1364493171 dot 3473 dot 23 dot camel at localhost dot localdomain> <515486A9 dot 5080202 at twiddle dot net> <CAAKybw9spaVz5EeH6Fb6xN19FUO=PmpDCB2raJctbnCkfN+txg at mail dot gmail dot com>
On 2013-03-28 14:21, Ryan S. Arnold wrote:
On Thu, Mar 28, 2013 at 1:06 PM, Richard Henderson <rth@twiddle.net> wrote:
On 03/28/2013 10:52 AM, Ryan Arnold wrote:
+++ b/sysdeps/s390/s390-32/multiarch/ifunc-resolve.c
@@ -19,6 +19,7 @@
#include <unistd.h>
#include <dl-procinfo.h>
+#include <stdint.h>
#define STFLE_BITS_Z10 34 /* General instructions extension */
#define STFLE_BITS_Z196 45 /* Distinct operands, pop ... */
@@ -38,7 +39,7 @@
extern void *FUNC##_z10 attribute_hidden; \
extern void *FUNC##_g5 attribute_hidden; \
\
- void *resolve_##FUNC (unsigned long int dl_hwcap) \
+ void *resolve_##FUNC (uint64_t dl_hwcap) \
This is an abi change for 32-bit big-endian systems.
A uint64_t hwcap is already the default storage type for hwcap for all
architectures.
From ldsodefs.h:
/* Mask for hardware capabilities that are available. */
EXTERN uint64_t _dl_hwcap;
Am I not understanding what you mean by 'abi change'? Can you throw
me a bone and describe a problematic use case where my suggestion
breaks something?
Given "unsigned long int" = 32-bit and big-endian, e.g s390, then
currently the parameter is r2 = low(_dl_hwcap).
With your change, r2 = high(_dl_hwcap), r3 = low(_dl_hwcap).
You could preserve compatibility by changing the signature
to pass 32 bits per unsigned long argument, in an enforced
little-endian order.
r~