From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-0.9 required=5.0 tests=BAYES_00,FREEMAIL_FROM, FREEMAIL_REPLY autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,f73321fd39537dd2 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2002-05-31 01:11:08 PST Path: archiver1.google.com!postnews1.google.com!not-for-mail From: antonio_duran@hotmail.com (Antonio Duran) Newsgroups: comp.lang.ada Subject: Re: 64 bit integers Date: 31 May 2002 01:11:07 -0700 Organization: http://groups.google.com/ Message-ID: References: <3CF4F374.5010306@yahoo.com> NNTP-Posting-Host: 192.101.1.126 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit X-Trace: posting.google.com 1022832668 29101 127.0.0.1 (31 May 2002 08:11:08 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: 31 May 2002 08:11:08 GMT Xref: archiver1.google.com comp.lang.ada:25059 Date: 2002-05-31T08:11:08+00:00 List-Id: "Marin David Condic" wrote in message news:... > 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" 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 > > What you can expect is that the Ada implementation will choose a representation that fit the needs for 64 bit integers. If there is a definite representation or performance requirement you should evaluate different Ada compiler vendors and products and choose the one that fits your specific needs. On the other hand you could be reasonably sure that you can develop your software (I mean code, test, and debug) using one compiler and, when you find other that meets your requirements, port easily the code to that implementation. That is undoubtly a huge advantage over a lot of nasty #ifdef directives. Antonio Duran