mul instruction

stefano carucci stecarucci@hotmail.com
Tue Jun 19 19:55:00 GMT 2007


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



More information about the Gcc-help mailing list