This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

How to generate BFI & BFC instruction in C

Hi friends,
I am using TI LM3s6965 micro controller.

I read the thumb-2 instruction set. Some instructions are interesting but as 'C' programmer I don't know how to write code to generate these instruction BFI, BFC.. etc

Is keil C compiler have special macro/function/syntax to generate these instruction??
Or some coding tricks??

Please suggest any application notes which demonstrate "How to write efficient C code for cortex-M3".

Thanks & Regards,
Kishore.

Parents
  • There are many problems with this approach - trying to get the compiler to emit specific instructions by hand-crafting C source code.
    What's your goal? If the goal is to complete a project and meet specific performance requirements, then you should identify performance bottlenecks (through profiling) first and eliminate them by applying appropriate optimization techniques. As you probably have heard, 'Premature optimization is the root of all evil.'
    If you are simply trying to learn the tools, then just say so and you'll save yourself from a lot of lecturing from me and others in this forum :-)

Reply
  • There are many problems with this approach - trying to get the compiler to emit specific instructions by hand-crafting C source code.
    What's your goal? If the goal is to complete a project and meet specific performance requirements, then you should identify performance bottlenecks (through profiling) first and eliminate them by applying appropriate optimization techniques. As you probably have heard, 'Premature optimization is the root of all evil.'
    If you are simply trying to learn the tools, then just say so and you'll save yourself from a lot of lecturing from me and others in this forum :-)

Children