ARM mode Thumb mode switching

Note: This was originally posted on 13th January 2011 at http://forums.arm.com

Hi,

Let me explain my problem,
i come across one situation

cmp r1,#0
beq labels_of1

i would like to merge both the instructions in to one. for that i would like to use cbz (thumb instruction)

but my compiler shows an error message that this particular instruction not present in the Instruction.

Since the instruction is cbz the compilation should be in thum mode. how can i modify my make file and how can i switch the mode from ARM to thumb for execute the optimized instruction.

please let me know the mode change needs any extra cycle.


Rgds
Dave
Parents
  • Note: This was originally posted on 17th January 2011 at http://forums.arm.com


    How can optimize the above condition ladder using thumb instructions.
    i replace the abs() library function by substraction.

    Have you actually looked at what the C-compiler actually generated? Did it really make a call to a library function, or was it already inlined.

    s.
Reply
  • Note: This was originally posted on 17th January 2011 at http://forums.arm.com


    How can optimize the above condition ladder using thumb instructions.
    i replace the abs() library function by substraction.

    Have you actually looked at what the C-compiler actually generated? Did it really make a call to a library function, or was it already inlined.

    s.
Children
No data
More questions in this forum