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=unavailable autolearn_force=no version=3.4.4 Path: eternal-september.org!reader01.eternal-september.org!reader02.eternal-september.org!feeder.eternal-september.org!nntp-feed.chiark.greenend.org.uk!ewrotcd!newsfeed.xs3.de!io.xs3.de!news.jacob-sparre.dk!franka.jacob-sparre.dk!pnx.dk!.POSTED.rrsoftware.com!not-for-mail From: "Randy Brukardt" Newsgroups: comp.lang.ada Subject: Re: AI12-0218: What is the portable representation clause for processing IETF packets on little-endian machines? Date: Tue, 15 May 2018 16:39:24 -0500 Organization: JSA Research & Innovation Message-ID: References: <87lgcphdxq.fsf@nightsong.com> <87lgcld9yu.fsf@nightsong.com> Injection-Date: Tue, 15 May 2018 21:39:25 -0000 (UTC) Injection-Info: franka.jacob-sparre.dk; posting-host="rrsoftware.com:24.196.82.226"; logging-data="25886"; mail-complaints-to="news@jacob-sparre.dk" X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2900.5931 X-RFC2646: Format=Flowed; Original X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.7246 Xref: reader02.eternal-september.org comp.lang.ada:52363 Date: 2018-05-15T16:39:24-05:00 List-Id: "Paul Rubin" wrote in message news:87lgcld9yu.fsf@nightsong.com... >> What's "BSWAP"? It's not an instruction I'm familar with on x86. > > http://www.felixcloutier.com/x86/BSWAP.html > >> (Admittedly, I don't usually use newer instructions because of the >> need to have some sort of alternative to run on older processors.) > > It was introduced with the 486 so I think it runs on almost any x86 that > anyone is currently using. My bad; it definitely is in the printed Pentium manual on my shelf. Never had a reason to use it, I guess. >> In any case, one has to build such support into the back-end. > > In GCC you can write intrinsics by using pragmas that include the > desired assembly code. You can write assembly code in Janus/Ada, but that would be terrible quality as that doesn't tie into the register manager and thus has to use memory to get operands in and out. Randy.