Tim
Excellent !!
http://forum.niosforum.com/work2/style_emoticons/<#EMO_DIR#>/biggrin.gif
Only one thing to remember...
I have entered the 'overriding' code in one of my SDK (I still using legacy code) libraries and compiled via 'make all' in the lib directory.
The thing to remember is to make the function global otherwise the old __mulsi3 will stick like mud on a bumper!
.global __mulsi3
.type __mulsi3, @function
__mulsi3:
custom 0,r2,r4,r5
ret
I haven't done major code benchmarks but I did see serious improvements with the custom instruction.
Be careful of the compiler! It is smart. Don't just multiply something and then check the speed. Make sure that your code can't be optimized out into add instructions. Look at your .objdump to see if the code really uses <__mulsi3>.
"Now go forth and multiply..."
Victor