Re: arm9e: how do I invert sign of a halfword?
- From: CBFalconer <cbfalconer@xxxxxxxxx>
- Date: Wed, 30 Jul 2008 19:43:48 -0400
Wilco Dijkstra wrote:
"CBFalconer" <cbfalconer@xxxxxxxxx> wrote:.... snip ...
Just consider the meaning and action on machines using ones
complement or sign-magnitude conventions. Also the fact that the
occurence of an overflow can cause implementation defined action.
I did consider that and this is exactly why the C standard is
incorrect:
Arithmetic one-complement shifts shift the sign into either the
MSB (right shift) or LSB (left shift). Sign magnitude only shifts
the magnitude for both left and right shift. This gives the
correct arithmetic results, ie. -0 stays -0, -1 becomes -0 on a
right shift, and -2 on a left shift etc.
Please give a reference section (s) in the C99 standard that
imposes this.
Some useful references about C:
<http://c-faq.com/> (C-faq)
<http://www.open-std.org/jtc1/sc22/wg14/www/docs/n1256.pdf> (C99)
<http://cbfalconer.home.att.net/download/n869_txt.bz2> (C99, txt)
<http://www.dinkumware.com/c99.aspx> (C-library}
--
[mail]: Chuck F (cbfalconer at maineline dot net)
[page]: <http://cbfalconer.home.att.net>
Try the download section.
.
- Follow-Ups:
- Re: arm9e: how do I invert sign of a halfword?
- From: Wilco Dijkstra
- Re: arm9e: how do I invert sign of a halfword?
- References:
- Re: arm9e: how do I invert sign of a halfword?
- From: Everett M. Greene
- Re: arm9e: how do I invert sign of a halfword?
- From: CBFalconer
- Re: arm9e: how do I invert sign of a halfword?
- From: Wilco Dijkstra
- Re: arm9e: how do I invert sign of a halfword?
- From: CBFalconer
- Re: arm9e: how do I invert sign of a halfword?
- From: Wilco Dijkstra
- Re: arm9e: how do I invert sign of a halfword?
- From: CBFalconer
- Re: arm9e: how do I invert sign of a halfword?
- From: Wilco Dijkstra
- Re: arm9e: how do I invert sign of a halfword?
- Prev by Date: spam
- Next by Date: Re: arm9e: how do I invert sign of a halfword?
- Previous by thread: Re: arm9e: how do I invert sign of a halfword?
- Next by thread: Re: arm9e: how do I invert sign of a halfword?
- Index(es):
Relevant Pages
|