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.4 required=5.0 tests=AC_FROM_MANY_DOTS,BAYES_00 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-30 03:53:47 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!newsfeed.icl.net!newsfeed.icl.net!news-x2.support.nl!psinet-eu-nl!psiuk-p4!uknet!psiuk-p3!uknet!psiuk-n!news.pace.co.uk!nh.pace.co.uk!not-for-mail From: "Marin David Condic" Newsgroups: comp.lang.ada Subject: Re: 64 bit integers Date: Wed, 29 May 2002 12:35:59 -0400 Organization: Posted on a server owned by Pace Micro Technology plc Message-ID: References: <3CF4F374.5010306@yahoo.com> NNTP-Posting-Host: dhcp-200-133.miami.pace.co.uk X-Trace: nh.pace.co.uk 1022690159 17593 136.170.200.133 (29 May 2002 16:35:59 GMT) X-Complaints-To: newsmaster@news.cam.pace.co.uk NNTP-Posting-Date: 29 May 2002 16:35:59 GMT X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 5.50.4522.1200 X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4522.1200 Xref: archiver1.google.com comp.lang.ada:24999 Date: 2002-05-29T16:35:59+00:00 List-Id: 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 >