Altera_Forum
Honored Contributor
21 years agoSign Extend operation
Hi,
Now I am worry about performance of Sign Extend operation. for example, char sc(unsgined char uc) { return (signed char) uc; } Nios II GCC will generates following code. slli ra,rb,24 srai rb,ra,24 On Stratix, it is reasonable. On Cyclone, it takes over 50 clocks!? That's awful... Nios I GCC has "-muser-opecode-extv(extzv)=" to use a custom instruction for sign extend operation. But Nios II GCC does not support such kind of option. Any ideas? I think "-muser-opecode-xxx=" option was very useful. I hope the revivals of this feature for Nios II.