+#define REAL_EXP(REAL) \
+ ((int)((REAL)->uexp ^ (unsigned int)(1 << (EXP_BITS - 1))) \
+ - (1 << (EXP_BITS - 1)))
I hadn't come across this "(x ^ signbit) - signbit" idiom for
implementing sign-extension before. Nice.
Yeah, I found it great as well when I learned about it in the binutils
list :-)
I don't really like the idiom. It's obfuscated and requires a large
constant, which is costly on some targets. Plain old
(x << EXP_BITS) >> EXP_BITS is much more readable and already gets
recognized by gcc as sign extension.