This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH] tile: Fix up corner cases with signed relocations
- From: "Joseph S. Myers" <joseph at codesourcery dot com>
- To: Chris Metcalf <cmetcalf at tilera dot com>
- Cc: Andreas Schwab <schwab at linux-m68k dot org>, <libc-alpha at sourceware dot org>
- Date: Mon, 8 Sep 2014 15:20:59 +0000
- Subject: Re: [PATCH] tile: Fix up corner cases with signed relocations
- Authentication-results: sourceware.org; auth=none
- References: <201409051854 dot s85IsfM0024659 at gx-1 dot internal dot tilera dot com> <8761h1hkog dot fsf at linux-m68k dot org> <540A1F34 dot 2020303 at tilera dot com> <871trphhkr dot fsf at linux-m68k dot org> <540B3349 dot 1000507 at tilera dot com>
On Sat, 6 Sep 2014, Chris Metcalf wrote:
> Right, sorry. On tile, the compiler will always generate a "shli" for
> shifting an unknown value by a known constant, and shli is defined with
> unsigned semantics on tile, so in practice this code generates the correct
> value.
In any case, the GNU C language defines signed shifts (as long as the
shift amount is >= 0 and < width of type), although it may still be useful
to avoid the cases that are outside what ISO C defines.
--
Joseph S. Myers
joseph@codesourcery.com