We are running a survey to help us improve the experience for all of our members. If you see the survey appear, please take the time to tell us about your experience if you can.
Hello to everyone, i try to make myself familiar with inline assembly. Because its easy to place code in RAM. So i have double speed execution. Everything works fine normaly but now i found that inline-assembly has differences compared to AARM: In the following function the MOVEQ is ignored, it is not translated. Why?
//*************************************************************************** unsigned int my_func(unsigned int x)__ram { __asm { LDR R2,=0xFFFF0000 TST R0,R2 MOVEQ R0,R0,LSL #16 bx lr } return x; } //***************************************************************************
There's no error message. But the MOVEQ is not in the dissassembly when i go thru code step by step. There is my programm in red color. There is what CARM has translated in black color. But the MOVEQ instruction is missing in black color. Who knows?
The CARM compiler will be discountinued and therefore you should switch to the RealView Compiler. The following code just works find:
unsigned int my_func(unsigned int x) { unsigned int v; v = 0xFFFF0000; __asm { TST x,v MOVEQ x,x,LSL #16 } return x; }
The example in C:\Keil\ARM\RV30\Examples\RAM_Function explains how to locate the function in RAM.