public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
* asm and "cc" "memory" volatile etc.. (slightly offtopic)
@ 1997-11-11  1:30 Jan Hubicka
  1997-11-11 10:02 ` Jeffrey A Law
  0 siblings, 1 reply; 5+ messages in thread
From: Jan Hubicka @ 1997-11-11  1:30 UTC (permalink / raw)
  To: egcs

Hi
I have some problems with asm keyword. I still dont understand to some
details, and since it seems to be quite high conecentration of gcc
gurus here, I decided to ask at this list..

Imagine that you are writing some memcpy replacement (like rep movsb at intel)

do I need to write "cc" into modified registers, since it changes flags?
is such construction w/o "cc" bug? 

I probably need to write "memory" since it modifies memory, but what for example
in memchr case, wich just reads memory, do I put there "memory" too to force
gcc update all memory locations (and do not store some data in registers)

Is there some way to say gcc, that is just updates given block of memory
(rtl expression for memcpy dont say clobbers:memory but says set BLK...
is there any way to write this in asm?)

When exactly I need to write volatile? Does memcpy implementation need
volatile or fact, that it changes memory is enought for gcc to do not
make "bad" optimizations?
What it memchr case?
I know that I need to write volatile in thinks like "cli" but it is required
here too?

Thank you very much...

Honza
-- 

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~1997-11-11 16:21 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1997-11-11  1:30 asm and "cc" "memory" volatile etc.. (slightly offtopic) Jan Hubicka
1997-11-11 10:02 ` Jeffrey A Law
1997-11-11 12:13   ` Richard Henderson
1997-11-11 16:21     ` Paul Koning
1997-11-11 16:21       ` Richard Henderson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).