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

Shortest code for memory to memory transfer

Note: This was originally posted on 16th March 2009 at http://forums.arm.com

Hi All,
    Can anyone tell me what is the shortest code I can use for cortex M3 to transfer (a few words) from one memory location to other(without using the DMA).  It should be genric(the number of words to transfer is not constant).

Regards
Subin
Parents
  • Note: This was originally posted on 17th March 2009 at http://forums.arm.com

    I would expect pre-indexed addressing to be used so that the base registers are updated and point to the next free location. That is, there are missing "!" characters after many of the "]" characters. See the ARM Archiecture Reference Manual on ARM's infocentre about this.

    A good way to see how to hand-code this type of high-performance loop is to look at the libraries that come with compilers, e.g. implemenations of memcpy(). Some will be better than others of course, and they will take different compromises between speed and size.
Reply
  • Note: This was originally posted on 17th March 2009 at http://forums.arm.com

    I would expect pre-indexed addressing to be used so that the base registers are updated and point to the next free location. That is, there are missing "!" characters after many of the "]" characters. See the ARM Archiecture Reference Manual on ARM's infocentre about this.

    A good way to see how to hand-code this type of high-performance loop is to look at the libraries that come with compilers, e.g. implemenations of memcpy(). Some will be better than others of course, and they will take different compromises between speed and size.
Children
No data