This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Inlining a C-callable ASM routine in a loop

HI,

I have a hand-tuned ASM routine I wrote that is highly efficient.

_my_speedy_ASM_routine(float*, float*, int, int)

However, it gets called within a loop that my goal is to have it be SW pipelined:

for (i=0; i<numChans; ++i)

{

<i1>

<i2>

...

_my_speedy_ASM_routine(pIn, pOut,  size, length)

}

Can I inline this ASM routine in the loop to get the advantages of SW pipelining?

  • Hi Dave,

    Have you checked the assembly file after the file is compiled (compiling with -k option)? 

  • Dave5396 said:
    Can I inline this ASM routine in the loop to get the advantages of SW pipelining?

    No.  Only C code can be inlined.  Perhaps you should attempt creating a C version of your algorithm that uses intrinsics.  It might not be quite as fast as your hand-written version, though perhaps the end result of having it inlined will boost your overall performance.