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,148d39ae0d22411d X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2001-09-30 14:19:17 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!netnews.com!xfer02.netnews.com!newsfeed2.earthlink.net!newsfeed.earthlink.net!newsmaster1.prod.itd.earthlink.net!newsread1.prod.itd.earthlink.net.POSTED!not-for-mail Message-ID: <3BB78C4D.66484277@acm.org> From: Jeffrey Carter X-Mailer: Mozilla 4.7 [en] (Win98; U) X-Accept-Language: en MIME-Version: 1.0 Newsgroups: comp.lang.ada Subject: Re: Pragma Volatile References: <3BB08F9C.BFB01047@raytheon.com> <3BB10D52.4D455DBA@raytheon.com> <3BB60733.4A80708A@avercom.net> <3BB64B13.81AFFB4D@acm.org> <5ee5b646.0109300510.71255128@posting.google.com> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Date: Sun, 30 Sep 2001 21:19:17 GMT NNTP-Posting-Host: 63.178.182.66 X-Complaints-To: abuse@earthlink.net X-Trace: newsread1.prod.itd.earthlink.net 1001884757 63.178.182.66 (Sun, 30 Sep 2001 14:19:17 PDT) NNTP-Posting-Date: Sun, 30 Sep 2001 14:19:17 PDT Organization: EarthLink Inc. -- http://www.EarthLink.net X-Received-Date: Sun, 30 Sep 2001 14:15:48 PDT (newsmaster1.prod.itd.earthlink.net) Xref: archiver1.google.com comp.lang.ada:13560 Date: 2001-09-30T21:19:17+00:00 List-Id: Robert Dewar wrote: > > Jeffrey Carter wrote in message news:<3BB64B13.81AFFB4D@acm.org>... > > If a register is an Integer, I would generally do > > > > B : Integer; > > for B'Address use Register_Location; > > pragma Volatile (B); > > ... > > B := 0; > > B := 1; > > > > But then, I don't have the C pointer fixation. > > Be very careful about assumptions here. Suppose that > B is a 32-bit word, then there is nothing in the language > that says that > > B := 0; > > has to generate a 32-bit store, it would be perfectly > valid if the compiler generated a call to bcopy that > moved four bytes independently (inefficient, but not > incorrect). Thanks again to Robert Dewar for pointing out implicit assumptions. I was actually responding to Corey Minyard's implicit assumption that a pointer was needed to access a memory-mapped hardware register. -- Jeff Carter "Monsieur Arthur King, who has the brain of a duck, you know." Monty Python & the Holy Grail