From: Rainer Aigner <aigner@newtec.de>
Subject: Re: Take controll of the assignment operator
Date: 2000/04/12
Date: 2000-04-12T00:00:00+00:00 [thread overview]
Message-ID: <38F437C5.D525C847@newtec.de> (raw)
In-Reply-To: wccvh1oiuvz.fsf@world.std.com
[-- Attachment #1: Type: text/plain, Size: 1368 bytes --]
Robert A Duff wrote:
>
> "Rainer Aigner Tel. XXXX" <aigner@newtec.de> 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
[-- Attachment #2: Card for Rainer Aigner --]
[-- Type: text/x-vcard, Size: 184 bytes --]
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
next prev parent reply other threads:[~2000-04-12 0:00 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2000-04-11 0:00 Take controll of the assignment operator Rainer Aigner Tel. XXXX
2000-04-11 0:00 ` Robert A Duff
2000-04-12 0:00 ` Rainer Aigner [this message]
2000-04-12 0:00 ` Robert A Duff
2000-04-12 0:00 ` Jean-Pierre Rosen
2000-04-12 0:00 ` Robert Dewar
2000-04-13 0:00 ` Rainer Aigner
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox