mul instruction

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello all.
I have some problem on using gcc for a microblaze soft-core.
I have noticed that the assembler for this simple function


void weighed_sum(int * u, int a, int* v, int b, int size){
int i;
for(i=0;i<size;i++)
   z[i]=a*u[i] + b*v[i];
}


refer to a long routine instead of the one mul Microblaze instruction on esecuting a*u[i] and b*v[i]. So this code snippet takes lots of clock periods to be executed. I am sure the multiplier is available on that architecture because the muli instruction, which takes the multiplier, has been used in the rest of the code. Could anybody tell me what may be wrong with this or how I can improve the performances?

Thank you in advance

Stefano

_________________________________________________________________
Sai cosa è successo oggi? http://notizie.msn.it


[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux