From: Darren New <dnew@san.rr.com>
Subject: Question about "for X'Size use ..."
Date: Thu, 09 Aug 2001 17:02:54 GMT
Date: 2001-08-09T17:02:54+00:00 [thread overview]
Message-ID: <3B72C23E.62F7B3D2@san.rr.com> (raw)
Let's say I declare
type Blah is mod 2**12;
for Blah'Size use 12;
Does that "for use" clause actually do anything? I.e., what does that
really mean on a CPU with 8-bit bytes? It doesn't change the size of
registers. Does it affect how things are written to streams?
I understand that if I pack an array or record or whatever, it makes a
difference. But is the compiler going to generate different code if a
Blah never winds up in an array or record or whatever? Will it be stored
in (say) a 16-bit location where it might be more efficient to use a
full 32 bits?
What if I say
type Blah is mod 2**12;
for Blah'Size use 64;
Does this have any effect? Is any compiler going to refuse to compile
those statements because it only has 32-bit registers?
TIA!
--
Darren New / Senior MTS & Free Radical / Invisible Worlds Inc.
San Diego, CA, USA (PST). Cryptokeys on demand. dnew@san.rr.com
"You probably noticed you can't breath underwater. Hence the tank."
-- PADI instruction manual, page 107.
next reply other threads:[~2001-08-09 17:02 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2001-08-09 17:02 Darren New [this message]
2001-08-09 17:37 ` Question about "for X'Size use ..." Florian Weimer
2001-08-09 22:39 ` Robert Dewar
2001-08-10 8:46 ` Florian Weimer
2001-08-10 10:36 ` Larry Kilgallen
2001-08-10 13:15 ` Question about Ted Dennison
2001-08-10 13:54 ` Larry Kilgallen
2001-08-10 17:09 ` Question about "for X'Size use ..." Robert Dewar
2001-08-10 17:11 ` Robert Dewar
2001-08-10 20:25 ` Florian Weimer
2001-08-10 21:43 ` Larry Kilgallen
2001-08-10 20:58 ` Toshitaka KUMANO
2001-08-10 14:46 ` john mann
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox