This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: mn10300 64-bit clean-up
- To: Horst von Brand <vonbrand at sleipnir dot valparaiso dot cl>
- Subject: Re: mn10300 64-bit clean-up
- From: Alexandre Oliva <aoliva at cygnus dot com>
- Date: 21 May 2000 20:35:22 -0300
- Cc: Richard Henderson <rth at cygnus dot com>, gcc-patches at gcc dot gnu dot org
- Organization: Cygnus Solutions, a Red Hat Company
- References: <200005210415.e4L4F8O29074@sleipnir.valparaiso.cl>
On May 21, 2000, Horst von Brand <vonbrand@sleipnir.valparaiso.cl> wrote:
> Alexandre Oliva <aoliva@cygnus.com> said:
> [...]
>> - low = GEN_INT ((INTVAL (value) << rshift) >> rshift);
>> - high = GEN_INT ((INTVAL (value) << lshift) >> rshift);
>> + /* Set sign_bit to the most significant bit of a word. */
>> + sign_bit = 1;
>> + sign_bit <<= BITS_PER_WORD - 1;
> What's wrong with "1 << (BITS_PER_WORD - 1)"?
`1' is `int', but I want an `unsigned HOST_WIDE_INT', that is unsigned
and possibly wider.
>> + mask--;
> Why not just ~0, BTW?
Because I only want the BITS_PER_WORD portion to be set; any more
significant bits should remain 0.
--
Alexandre Oliva Enjoy Guaranį, see http://www.ic.unicamp.br/~oliva/
Cygnus Solutions, a Red Hat company aoliva@{redhat, cygnus}.com
Free Software Developer and Evangelist CS PhD student at IC-Unicamp
oliva@{lsd.ic.unicamp.br, gnu.org} Write to mailing lists, not to me