Re: Data Types
- From: Erik Mouw <J A K Mouw ITS TUDelft NL>
- To: Helmethead <hoshem mel comcen com au>, gtk-list gnome org
- Subject: Re: Data Types
- Date: Fri, 25 May 2001 11:26:48 +0200
On Fri, May 25, 2001 at 01:19:20PM +1000, Helmethead wrote:
> On Thu, May 24, 2001 at 09:07:44PM +0200, Erik Mouw wrote:
> > Depends on the architecture. On most architectures guint8 is unsigned
> > char, but on 64 bit architectures (like alpha or mips) guint32 (32 bit
> > datatype) is not the same as unsigned int (64 bit datatype).
>
> If ints are 64 bits, how do you get 32 and 16 bit vars? Are 64 bit architectures missing one of these?
Yes, because all 64 bit CPUs I know are RISC CPUs, they don't like
anything else then their native format. So 64 bit CPUs want 64 bit
variables (int is 64 bit), and 32 bit machines want 32 bit variables.
Most ABIs however do allow the user to use smaller than native integer
formats, but at a big price: the compiler has to generate special code
to access those variables (especially if they are not aligned) which
makes the program horribly slow.
Erik
--
J.A.K. (Erik) Mouw, Information and Communication Theory Group, Department
of Electrical Engineering, Faculty of Information Technology and Systems,
Delft University of Technology, PO BOX 5031, 2600 GA Delft, The Netherlands
Phone: +31-15-2783635 Fax: +31-15-2781843 Email: J A K Mouw its tudelft nl
WWW: http://www-ict.its.tudelft.nl/~erik/
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]