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

Can RealView compiler generate SMLAL/UMLAL instructions?

Is there any way the RealView compiler can take advantage of the multiply-and-accumulate instructions of the Cortex M3?

I wrote a simple MAC loop and the compiler didn't generate any SMLAL or UMLAL instructions, which was disappointing.

Thanks,
Andrew Queisser
HP

Parents
  • Hi Andy,

    Totally agree about HLL and specific machine instructions. However, in this case I'm not using the compiler as a HLL but as the frontend to the assembler. That way I don't have to remember the calling conventions and exact syntax of the assembler. Once I've forced the compiler to generate close to what I want, in this case the MAC instructions, I throw away the C-code and tweak the assembly. The ASM file is what goes into source control.

    Andrew

Reply
  • Hi Andy,

    Totally agree about HLL and specific machine instructions. However, in this case I'm not using the compiler as a HLL but as the frontend to the assembler. That way I don't have to remember the calling conventions and exact syntax of the assembler. Once I've forced the compiler to generate close to what I want, in this case the MAC instructions, I throw away the C-code and tweak the assembly. The ASM file is what goes into source control.

    Andrew

Children
  • Andrew,

    is it worth the effort? The ARM compiler is so good that you can hardly beat it. My suggestion is to write your application in HLL and put only time-critical functions (cpu intensive) to assembly module and optimize it. You might even discover that there is no need for the assembly at all.

    The project overview, maintenance later, etc. is much better in HLL.

    Franc

  • Hi Franc,

    Reading through my messages in this thread I realize I wan't really clear. The vast majority of our code is in C and we only resort to assembly for small time critical chunks, just as you suggest.

    I agree that assembly is hard to maintain although at this point ARM is so prevalent (the last three projects I was on used it) that learning ARM assembly seems to be a good investment.

    Thanks,
    Andrew