• M0+ Stack Pointer (PSP/MSP) Clarification

    Sean Dunlevy
    Sean Dunlevy

    Background

     I'm working part-time on a Cortex M0+ based SoC converting a very processor-intensive section of C++ code (inner-loop executed 10s of 1000s of times a second & compiles to over 400 instructions using GNU O3) and after almost 3 months of work…

    • Answered
    • over 1 year ago
    • Processors
    • Cortex-M / M-Profile forum
  • "mov" vs "adds ... #0" (cortex M0)

    Bill Westfeild
    Bill Westfeild

    I've noticed that arm gcc, when compiling code for Cortex-M0 (at least) seems to generate instructions:

       adds r0, r2, #0

    Where I'm pretty sure that it the same as:

       movs r0, r2

    In fact, I can disassemble a relatively substantial program and not…

    • over 2 years ago
    • Open Source Software and Platforms
    • GNU Toolchain forum
  • Count the number of trailing zeros without clz?

    Will
    Will

    I am trying to count the number of trailing zeros in floating points without using the clz command. what would be the easiest way to rewrite this code?


    ctz
            RSB      r1,r0,#0
            CMP…

    • Answered
    • over 3 years ago
    • Processors
    • Cortex-M / M-Profile forum