Usenet comp.sys.dec (1990-2013)
 help / color / mirror / Atom feed
From: Paul Black <paul.black@vf.vodafone.co.uk>
Subject: Re: Size of int on Alpha
Date: 1998/03/04	[thread overview]
Message-ID: <34FD137B.4763@vf.vodafone.co.uk> (raw)
In-Reply-To: 34FD104F.B9FCF863@atlantis-consulting.com


Sivaram Krishnan <sivaram@atlantis-consulting.com> wrote:
> 1) What is the size of int (sizeof(int)) on an Alpha system running
>     Windows NT?

Don't know. I don't program on Windows (of any kind).


> If it is 32-bits or 4-bytes, what is the result of the following
> operation?
> 
>     int i = 0x80000000;  /* left most bit alone set */
>     int j;
> 
>     j = i << 1;                /* left shift i by 1 */
> 
> What is the value of j?

For a 32-bit int, 0, what other value would you expect?


> Since Alpha is a 64-bit architecture and since it does not
> support 32-bit shifts (Alpha has only 64-bit shift instructions),
> does the compiler mask the upper 4 bytes using extra instructions?
> This would seem expensive.  If the size of int is always
> 8 bytes, this problem does not arise.

If the compiler uses 32-bit ints, then it will have to deal with this.


> 2) Is the size of int different on Unix systems on Alpha?

32 bit on DU3.2 (presumably the same on later versions).

Paul



  reply	other threads:[~1998-03-04  5:00 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1998-03-04  5:00 Size of int on Alpha Sivaram Krishnan
1998-03-04  5:00 ` Paul Black [this message]
1998-03-05  5:00   ` Steve Lionel
1998-03-05  5:00 ` Volker Barthelmann
read-only archive

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox