From: Ribamar Santarosa de Sousa <ribamar.sousa@ic.unicamp.br>
To: linux-assembly@vger.kernel.org
Subject: newbie question about integers size/portabilty.
Date: Tue, 28 Dec 2004 10:29:16 -0200 [thread overview]
Message-ID: <20041228122916.GA7137@ic.unicamp.br> (raw)
Hi all,
(about this question is about C programming, i think the
"assemblers-guys" are most likely to answers quickly than not so
advanced c programmers.... :)
in the c style guide:
http://www.psgd.org/paul/docs/cstyle/cstyle16.htm
we can found a table (shown bellow) for integer data sizes.
there we can se that some architecture have more than one possible
value for the same size, depending on -- i guess -- the compiler.
Does anyone know where i can get a accurate table for gcc compiler?
Can those values change from a processor in the x86 to another with
fixed-size word (e.g. 486 -> 586)? (The document provides a "safe
minimal size" table, but note, as i am mixing several integer types
to pass to a hardware data structure, this is not enough, i need
exact values).
TIA, Riba.
type pdp11 VAX/11 68000 Cray-2 Unisys Harris 80386
series family 1100 H800
_________________________________________________________________
char 8 8 8 8 9 8 8
short 16 16 8/16 64(32) 18 24 8/16
int 16 32 16/32 64(32) 36 24 16/32
long 32 32 32 64 36 48 32
char* 16 32 32 64 72 24 16/32/48
int* 16 32 32 64(24) 72 24 16/32/48
int(*)() 16 32 32 64 576 24 16/32/48
next reply other threads:[~2004-12-28 12:29 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-12-28 12:29 Ribamar Santarosa de Sousa [this message]
2004-12-28 13:35 ` newbie question about integers size/portabilty Richard Cooper
2004-12-28 15:20 ` Ribamar Santarosa de Sousa
2004-12-30 9:10 ` Frederic Marmond
2004-12-28 22:38 ` Brian Raiter
2004-12-28 23:52 ` Ribamar Santarosa de Sousa
2004-12-29 0:17 ` Brian Raiter
2004-12-29 1:05 ` Ribamar Santarosa de Sousa
2004-12-29 1:31 ` Herbert Poetzl
2004-12-29 7:21 ` OT: " Richard Cooper
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20041228122916.GA7137@ic.unicamp.br \
--to=ribamar.sousa@ic.unicamp.br \
--cc=linux-assembly@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.