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.3 required=5.0 tests=BAYES_00,INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,ad84be6ce1cbae14 X-Google-Attributes: gid103376,public From: Rainer Aigner Subject: Re: Take controll of the assignment operator Date: 2000/04/12 Message-ID: <38F437C5.D525C847@newtec.de>#1/1 X-Deja-AN: 610027500 References: <38F2FF84.C44AC279@newtec.de> X-Accept-Language: en Content-Type: multipart/mixed; boundary="------------A5C81FBD08357C970A195E09" Organization: NewTec Mime-Version: 1.0 Newsgroups: comp.lang.ada Date: 2000-04-12T00:00:00+00:00 List-Id: This is a multi-part message in MIME format. --------------A5C81FBD08357C970A195E09 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Robert A Duff wrote: > > "Rainer Aigner Tel. XXXX" writes: > > > Up to here everythings fine. > > Now, my question: How can I make sure that the compiler uses the right > > assembler for load and store operations? > > I'm not sure exactly what you're asking, but you might want to look up > the Atomic and Volatile pragmas. > > - Bob Hello Bob, all right I thougth of that too, but maybe I rearange the question: I got two types one is 8-Bit and the other is 16-Bits wide. I make two variables, one of eache type, and tell the compiler where they are located (eg. registers). Now I make a simple read from both variables to a temp variable of each. (for modify and write back). And I want to make sure, that a read with the 8-bit type is performed by a "load byte", and the 16-bit type by a "load halfword" assembler statement. The pragmas You told me, would do (correct me if I didn't get right) volatile: make sure that the compiler doesn't opimize them out. eg. two consecutive writes and a subsequent read. atomic: Is trying to perform the load and store in a single assembler statment. That okay, but it's only half the rent. In addition to this I want that the compiler thates care of the size. unfortunatly the compiler I have to use doesn't work with the pragma volatile (still some bug). thank You for the answer. cu rainer --------------A5C81FBD08357C970A195E09 Content-Type: text/x-vcard; charset=us-ascii; name="aigner.vcf" Content-Transfer-Encoding: 7bit Content-Description: Card for Rainer Aigner Content-Disposition: attachment; filename="aigner.vcf" begin:vcard n:Aigner;Rainer x-mozilla-html:FALSE org:NewTec GmbH;Software developer adr:;;;;;; version:2.1 email;internet:aigner@newtec.de x-mozilla-cpt:;0 fn:Rainer Aigner end:vcard --------------A5C81FBD08357C970A195E09--