asm memory barrier question

jhjk jhj mmore_benq@hotmail.com
Tue Mar 16 14:05:00 GMT 2004


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



More information about the Gcc mailing list