AnsweredAssumed Answered

inline assembly problem

Question asked by Andreas Schmidt on Nov 25, 2014
Latest reply on Nov 26, 2014 by Andreas Schmidt



I want to code a delay loop in gcc inline assembly for a K64:


    asm("push {r4}");
   asm("mov r4, delay_val");
   asm("add r4, r4, #-1");
   asm("bne .Lab");
   asm("pop {r4}");


I have the push/pop instructions in here, because I have no idea how to get otherwise a free register that I can use for the small loop.

But with the push/pop instructions the exe works unstable. Any idea for a better solution?


Best Regards