This is the mail archive of the gcc-help@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

mul instruction


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 Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]