This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Mixing C-Assembly language code, Optimization ON, Code ouput Incorrect

Greetings,

I have C source code, which call an assembly function and this assembly function access global variables, passed as argument to this function.

Now code works fine when optimization is OFF and gives wrong output when Optimization is ON.

plus ,if i replace that assembly function with its C function and optimization is ON. Code works fine.

i Dont know where the problem is.

Do there are things to kept in mind for compiler optimization,while working with MIX C/ASM source code.

i tried using call assumption options,but that was giving build error in different part of code.reason unknown.

Any INFO will be helpfull.

Thanks.