comp.lang.ada
 help / color / mirror / Atom feed
From: "Marin David Condic" <dont.bother.mcondic.auntie.spam@[acm.org>
Subject: Re: 64 bit integers
Date: Wed, 29 May 2002 12:35:59 -0400
Date: 2002-05-29T16:35:59+00:00	[thread overview]
Message-ID: <ad301f$h5p$1@nh.pace.co.uk> (raw)
In-Reply-To: 3CF4F374.5010306@yahoo.com

The only way to be sure is to conduct tests and/or check documentation
and/or call your vendor. Ada will let you express representation, so you
should feel confident that you're actually going to get 64 bits, etc. (or an
error message if the compiler can't support it.) But what you're going to
get for instructions & registers is not certain. One would hope that a
reasonable implementation for a machine that supported 64 bit numbers would
give you what you expect. It would be surprisingly inefficient for a mature,
reputable compiler to do something else, but at the end of the day you don't
get any guarantees from the language. Early, inefficient implementations of
Ada83 often generated subroutine calls to synthesize lots of math operations
because it was the simplest way to guarantee they satisfied the language
rules. Hopefully, things are better these days with your compiler. :-) Try
coding up an example and get the compiler to spit out assembly code & see
what you get.

MDC
--
Marin David Condic
Senior Software Engineer
Pace Micro Technology Americas    www.pacemicro.com
Enabling the digital revolution
e-Mail:    marin.condic@pacemicro.com


"David Rasmussen" <pinkfloydhomer@yahoo.com> wrote in message
news:3CF4F374.5010306@yahoo.com...
> Can I be reasonably sure that if I use some sort of 64-bit integer in
> Ada, that it will be represented by native 64-bit registers on a 64-bit
> machine, and perhaps even more important, that it will be represented by
> some very effecient double 32-bit registers scheme on a 32-bit processor?
>
> For instance, with GNAT, will it be as fast to use Ada for this kind of
> thing as it will be to use long long with GNU's C or C++ compiler?
>
> /David
>





  reply	other threads:[~2002-05-29 16:35 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-05-29 15:27 64 bit integers David Rasmussen
2002-05-29 16:35 ` Marin David Condic [this message]
2002-05-31  8:11   ` Antonio Duran
2002-05-29 18:07 ` Jeffrey Carter
replies disabled

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