[prev in list] [next in list] [prev in thread] [next in thread]
List: gcc
Subject: Inline Assembly queries
From: kernel mailz <kernelmailz () googlemail ! com>
Date: 2009-06-27 20:01:51
Message-ID: abe8a1fd0906271249k479e5a87gfe1ee9c02798a234 () mail ! gmail ! com
[Download RAW message or body]
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’t 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
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic