Re: How to avoid sign or zero extension

2012-06-04 Thread Michael Hope
On 3 June 2012 17:06, i-love-spam wrote: > I'm writing some optimized functions for gcc-arm in a library that obuses > shorts. So the problem I have is that in extremely many places resutls of my > optimized functions are needlessly sign or zero extended. That is, gcc adds > UXTH or SXTH opcode

How to avoid sign or zero extension

2012-06-02 Thread i-love-spam
I'm writing some optimized functions for gcc-arm in a library that obuses shorts. So the problem I have is that in extremely many places resutls of my optimized functions are needlessly sign or zero extended. That is, gcc adds UXTH or SXTH opcode. For example, imagine if I use clz instructions