I do not understand how this should work.
The GCC built-in assembler is a pain to get right, but very specific with respect to labeling information about clobbing, so that the compiler knows what you are doing.
The Microsoft Visual C ++ inline assember is very easy to use (it always seems Just Work), but I have no idea what guarantees or assumptions it makes about your code.
Does VC ++ perform "automatic discovery", which registers are down? How does he know how registers and stack pointer will be changed? Are there any suggestions? If so, how do you circumvent these assumptions?
c gcc inline-assembly visual-c ++
Mehrdad
source share