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=-1.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,64599bfe530783cd X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2003-10-19 09:54:04 PST Path: archiver1.google.com!news2.google.com!news.maxwell.syr.edu!newsfeed2.netcologne.de!news.netcologne.de!newsfeed.stueberl.de!newsr1.ipcore.viaginterkom.de!btnet-peer1!btnet-peer0!btnet-feed5!btnet!news.btopenworld.com!not-for-mail From: "Martin Dowie" Newsgroups: comp.lang.ada Subject: Re: Any examples of Byte Ordering Functions Date: Sun, 19 Oct 2003 16:53:18 +0000 (UTC) Organization: BT Openworld Message-ID: References: <1066243458.911546@master.nyc.kbcfp.com> NNTP-Posting-Host: host81-129-50-50.in-addr.btopenworld.com X-Trace: sparta.btinternet.com 1066582398 18338 81.129.50.50 (19 Oct 2003 16:53:18 GMT) X-Complaints-To: news-complaints@lists.btinternet.com NNTP-Posting-Date: Sun, 19 Oct 2003 16:53:18 +0000 (UTC) X-Newsreader: Microsoft Outlook Express 6.00.2800.1158 X-MSMail-Priority: Normal X-Priority: 3 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165 Xref: archiver1.google.com comp.lang.ada:1145 Date: 2003-10-19T16:53:18+00:00 List-Id: "chris" wrote in message news:muwkb.3583$KA5.30712@newsfep4-glfd.server.ntli.net... > architectures into account at compile time! Can I expect the compiler > (gnat say) to optimise multiplication of modular types by *powers of > two* to shift lefts (and divisions by powers of two to shift rights)? You don't need to look up the RM (Annex B.2) wrt the predefined modular types in package "Interfaces" and there you will find Shift_Left/Shift_Right/etc routines. These are defined as "Intrinsic", which means they are "built in" to the compiler - i.e. it should have a blinking good idea of a good representation of this on the target h/w. If you want "shifts" and "adds", just be explicit to the compiler. Cheers, Martin