This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
RE: [PATCH] Support HWCAPs for MIPS
- From: Matthew Fortune <Matthew dot Fortune at imgtec dot com>
- To: Carlos O'Donell <carlos at redhat dot com>, Andreas Schwab <schwab at linux-m68k dot org>
- Cc: "libc-alpha at sourceware dot org" <libc-alpha at sourceware dot org>
- Date: Fri, 6 Mar 2015 16:44:15 +0000
- Subject: RE: [PATCH] Support HWCAPs for MIPS
- Authentication-results: sourceware.org; auth=none
- References: <6D39441BF12EF246A7ABCE6654B0235320F271C0 at LEMAIL01 dot le dot imgtec dot org> <20150306113811 dot GA12857 at vapier> <87h9tynmx7 dot fsf at igel dot home> <54F9CE67 dot 7050603 at redhat dot com>
Carlos O'Donell <carlos@redhat.com> writes:
> On 03/06/2015 10:52 AM, Andreas Schwab wrote:
> > Mike Frysinger <vapier@gentoo.org> writes:
> >
> >>> +{
> >>> + int i;
> >>> +
> >>> + /* Fallback to unknown output mechanism. */ if (type ==
> >>> + AT_HWCAP2)
> >>> + return -1;
> >>> +
> >>> + _dl_printf ("AT_HWCAP: ");
> >>> +
> >>> + for (i = 0; i < _DL_HWCAP_COUNT; ++i)
> >>> + if (word & (1 << i))
> >>
> >> i is an int, but word is an unsigned long int.
> >
> > That's not a problem. The problem is that 1 is an int.
>
> Right, you want 1U.
>
> Which reminds me that elf.h is all wrong also and needs 1U everywhere.
Thanks Mike for the review. I admit to blindly stealing this from
another port in glibc (I don't recall which). Since I still haven't
managed to get any HWCAPs into mainline kernel then I was just going
to wait until I had a HWCAP to include before pushing ahead with
this.
Should I update this and get the framework committed while waiting for
things to trickle in to the kernel?
Thanks,
Matthew