Re: arm9e: how do I invert sign of a halfword?
- From: CBFalconer <cbfalconer@xxxxxxxxx>
- Date: Tue, 29 Jul 2008 14:35:07 -0400
Wilco Dijkstra wrote:
"CBFalconer" <cbfalconer@xxxxxxxxx> wrote:
Wilco Dijkstra wrote:
... snip ...
FYI The standard is actually incorrect here in making all negative
left shifts undefined. Positive leftshifts that overflow are
undefined too. However multiplies of positive and negative numbers
are defined if no overflow occurs, and only implementation defined
if they overflow...
There is no known error in the portion I quoted (and you snipped).
If you don't pay attention, you will sooner or later have to pay.
If you don't think it's an error, maybe you can explain why it is
correct?
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.
That's why, for safe behaviour, you should restrict shifts to
operating on unsigned quantities.
--
[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?
- Prev by Date: Re: arm9e: how do I invert sign of a halfword?
- 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
|