From: davidf@mks.com (David J. Fiander)
Subject: Re: Representation clauses and records
Date: 1997/12/18
Date: 1997-12-18T00:00:00+00:00 [thread overview]
Message-ID: <u90tiqsmz.fsf@davidf-nt.mks.com> (raw)
In-Reply-To: 34979C4A.3C2D3D71@alphalink.com.au
Pascal MALAISE <malaise@alphalink.com.au> writes:
> As far as I know, this problem would not happen in full ADA because the
> instanciation of unchecked_conversion will be compiled as a call to
> something
> like memcpy, a procedure which does not make any assumption about
> alignment of arguments.
> We loose performance but gain reliability.
I've seen other comments that indicate that the runtime cost of a
call to Unchecked_Conversion is going to be a function call of
some sort, and I have just one question: "Why?"
It would seem to me that if I have an object of some sort, and I
call Unchecked_Conversion on it, if the type is small enough
(in C terms converting a pointer to an int), why shouldn't the
compiler just generate a "load ptr/store int" instruction
sequence? Now, for larger objects, the compiler will have to
perform a block move to effect the conversion, either via a
runtime library call or by open-coding the block move, but that
depends entirely on the H/W support for block moves.
- David
next prev parent reply other threads:[~1997-12-18 0:00 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <347000b1.4909762@news.geccs.gecm.com>
1997-11-21 0:00 ` Representation clauses and records Brian Nettleton
1997-11-21 0:00 ` Matthew Heaney
1997-11-21 0:00 ` Brian Nettleton
1997-11-24 0:00 ` Martin M Dowie
1997-11-25 0:00 ` Robert Dewar
1997-11-27 0:00 ` Martin M Dowie
[not found] ` <347a8dc3.3438484@news.geccs.gecm.com>
1997-11-25 0:00 ` Matthew Heaney
1997-12-16 0:00 ` Pascal MALAISE
1997-12-16 0:00 ` Larry Kilgallen
1997-12-17 0:00 ` Pascal MALAISE
1997-12-18 0:00 ` David J. Fiander [this message]
1997-12-18 0:00 ` Tucker Taft
1997-12-18 0:00 ` Robert Dewar
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox