linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* Inline Assembly queries
@ 2009-06-27 19:46 kernel mailz
       [not found] ` <abe8a1fd0906271249k479e5a87gfe1ee9c02798a234@mail.gmail.com>
  0 siblings, 1 reply; 13+ messages in thread
From: kernel mailz @ 2009-06-27 19:46 UTC (permalink / raw)
  To: gcc-help, gcc-help-help, linuxppc-dev

Hello All the gurus,

I've been fiddling my luck with gcc 4.3.2 inline assembly on powerpc
There are a few queries

1. asm volatile or simply asm produce the same assembly code.
Tried with a few examples but didnt find any difference by adding
volatile with asm

2. Use of "memory" and clobbered registers.

"memory" -
a. announce to the compiler that the memory has been modified
b. this instruction writes to some memory (other than a listed output)
and GCC shouldn=92t cache memory values in registers across this asm.

I tried with stw and stwcx instruction, adding "memory" has no effect.

Is there any example scenerio where gcc would generate different
assembly by adding / removing "memory" ?


-TZ

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

end of thread, other threads:[~2009-06-30 10:49 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-06-27 19:46 Inline Assembly queries kernel mailz
     [not found] ` <abe8a1fd0906271249k479e5a87gfe1ee9c02798a234@mail.gmail.com>
     [not found]   ` <m3ab3t4623.fsf@google.com>
2009-06-28  4:57     ` kernel mailz
2009-06-29 15:49       ` kernel mailz
2009-06-29 19:27         ` Scott Wood
2009-06-30  5:27           ` kernel mailz
2009-06-30 10:41             ` Benjamin Herrenschmidt
2009-06-29 21:29         ` Ian Lance Taylor
2009-06-30  5:53           ` kernel mailz
2009-06-30  9:30             ` Andrew Haley
2009-06-30  9:52             ` Paul Mackerras
2009-06-29 15:57       ` David Howells
2009-06-29 21:27         ` Ian Lance Taylor
2009-06-30 10:43         ` Benjamin Herrenschmidt

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 NNTP newsgroup(s).