[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: video mem access with oskit-mach

From: Marcus Brinkmann
Subject: Re: video mem access with oskit-mach
Date: Wed, 3 Oct 2001 23:21:22 +0200
User-agent: Mutt/1.3.22i

On Wed, Oct 03, 2001 at 04:54:37PM -0400, Roland McGrath wrote:
> > On Wed, Oct 03, 2001 at 04:09:37PM -0400, Roland McGrath wrote:
> > > > The conversion from signed shorts to unsigned shorts is implementation
> > > > defined (or can raise a signal even), so I am out of luck here  (unless 
> > > > we
> > > > forbid ports higher than 7fff).
> > > 
> > > Say what?  Conversions from one bitpattern (integer) type to another
> > > bitpattern type of the same size are always fine.
> > 
> > Even cross platform (eg, over the network)?
> You'd better be precise about what you are asking.

Sorry.  I mean the following.  If we use short to pass io_reg_t, we go
from unsigned short to signed short on one architecture, and from signed short
to unsigned short on another architecture.  It's not clear to me that
the bit pattern is preserved if you pass a negative number between two
systems with a different representation of negative numbers with MiG (like,
the first system uses two's complement and the other uses one's complement).

It's not even clear that the first conversion from unsigned short to signed
short is valid on every platform. ISO C says that unsigned and signed
integer values even with the same size are "different", and conversion from
one type to another signed type which can not represant the value in the
first type is implementation defined.


`Rhubarb is no Egyptian god.' Debian http://www.debian.org brinkmd@debian.org
Marcus Brinkmann              GNU    http://www.gnu.org    marcus@gnu.org

reply via email to

[Prev in Thread] Current Thread [Next in Thread]