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,5a51ee2b8ee36d5f X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2001-03-17 07:02:06 PST Path: supernews.google.com!sn-xit-03!supernews.com!nntp.cs.ubc.ca!newsfeed.direct.ca!look.ca!newshub2.rdc1.sfba.home.com!news.home.com!news1.sttls1.wa.home.com.POSTED!not-for-mail From: "DuckE" Newsgroups: comp.lang.ada References: <98ug7e$9oj$1@newpoisson.nosc.mil> Subject: Re: Code Generation Question X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 5.50.4133.2400 X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4133.2400 Message-ID: <6_Ks6.582524$U46.17402833@news1.sttls1.wa.home.com> Date: Sat, 17 Mar 2001 15:00:18 GMT NNTP-Posting-Host: 24.6.221.63 X-Complaints-To: abuse@home.net X-Trace: news1.sttls1.wa.home.com 984841218 24.6.221.63 (Sat, 17 Mar 2001 07:00:18 PST) NNTP-Posting-Date: Sat, 17 Mar 2001 07:00:18 PST Organization: Excite@Home - The Leader in Broadband http://home.com/faster Xref: supernews.google.com comp.lang.ada:5803 Date: 2001-03-17T15:00:18+00:00 List-Id: I have worked with one VME device that required 16 bit reads and writes, but only returned/stored 8 bits at a time. To make things even more difficult the data was in the high order byte of the 16 bit word. This device was one that was built in-house. Apparently it was much easier for the hardware designer to build it this way. On an application developed using GCC on VxWorks I access 16 bit memory by defining a pointer to a 16 bit value, assigning a memory address to the pointer, and then accessing the memory through the pointer. I hope this helps, SteveD "Charles H. Sampson" wrote in message news:98ug7e$9oj$1@newpoisson.nosc.mil... > This is not strictly an Ada issue but, since this group has one of > the best signal to noise ratios in USENET, I'll post it here anyhow. In > my defense, it did arise in an Ada project that I'm currently working > on. > > Our project uses a heavily populated VME rack with a PowerPC as the > CPU. I certainly don't understand all of the VME arcania but it seems > obvious to me that VME is at its root byte oriented. One of the cards > in the rack requires 16-bit reads and writes to its memory. If you at- > tempt an 8-bit read or write there is no indication of error; instead > the board silently zeros the other byte of the 16-bit word. > > This causes quite a bit of problem, as you might guess when you re- > flect on it for a minute. Whenever the module is modified (fortunately, > it's now pretty stable), we have to investigate the code generated by > the compiler to verify that there are no byte reads or writes to the > board's memory. If there are, we have to figure out a way to trick the > compiler into not doing it. > > I consider this wildly unreasonable. My question is this: Are > there compilers, for any language, that give the user the ability to > subset the hardware instruction set used for a compilation? I don't > know of any and I've had experience with 20-30 compilers in my career. > Other people, particularly those in academic settings, might have seen > many more. > > Charlie > > > -- > ****** > > For an email response, my user name is "sampson" and my host > is "spawar.navy.mil".