A question about code optimization

Hello all,
I am experiencing problems with the following piece of code:

lp_R0 = g_tcb[g_running_task].r0_ptr ;

// restoring next task settings
__asm
{
MOV R15, lp_R0
MOV R0, [R15]
POP R15
POP R14
.
.
All the compiler's optimizations are enabled (common tail merging, register coloring, reorder instructions for pipline, alias checking, but not use static memory for non register automatics). the first line does not generate assembly (= I'm dead after the first MOV :-) ) even after declaring lp_R0 as 'volatile'. is there a way to disable optimizations locally?
or maybe the only resort is to write the assembly for the line that the compiler won't generate?

More questions in this forum