This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

asm memory barrier question


I understand that gcc-help might be a more suitable list to send this but I think this is a little advanced question and I would like to have an answer from a developer.

I want to do something like this:

(code)
asm_function_that_alters_general_purpose_registers_WITHOUT_restoring_them();
(other code)

I am quite sure that this will break things. (Right?)

But what about this?

(code)
asm_function-that_alters_general_purpose_registers_without_restoring_them();
asm volatile("" : : : "memory");
(other code)

The program will break?
I am not interested in portability, just gcc.
Thank you in advace for any answer and please CC me.

_________________________________________________________________
The new MSN 8: smart spam protection and 2 months FREE* http://join.msn.com/?page=features/junkmail



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]