> -----Original Message----- > From: Georg-Johann Lay > Sent: Thursday, January 12, 2012 10:55 AM > To: Weddington, Eric > Cc: Joerg Wunsch; avr-gcc-list@nongnu.org > Subject: Re: [avr-gcc-list] AVR Libc int32_t and uint32_t typedefs > areincorrect > > > sizeof(double) = 4 also breaks the standard...
Hence, one of the reasons to have correct doubles added to the backend. <snip> > As said above, it's not only about optimization as such but also about > promotion rules that cannot be optimized away in all situation. So if you > are > on a target were each byte counts I guess developers will very much > appreciate > -mint8, be it blessed by standard or not... Hmm. One of the biggest complaints from users has to do with promotion rules being overly enforced during a set of operations, and then the result is stored in some variable, typically of a smaller size (typically an unsigned 8-bit variable), thereby truncating the value. In these particular cases the enforcement of the promotion rules has no bearing on the final outcome of the operations, but it does cause an unnecessary increase in code size. In these cases, is there a way to optimize the code such that these promotion rules aren't strictly followed *when it does not affect the outcome of the operation*? The problem that I have with -mint8 is: - it doesn't follow the standard - it breaks avr-libc (or rather, avr-libc isn't adapted to it) - people use it, because the backend hasn't been taught how to do the right thing. The thing is, is if the AVR backend knew how to optimize away these superfluous promotions, then I really don't think that -mint8 would ever really be needed. Why should a user have to specify a switch to get the compiler to do the right thing? How can we get to this point? _______________________________________________ AVR-GCC-list mailing list AVR-GCC-list@nongnu.org https://lists.nongnu.org/mailman/listinfo/avr-gcc-list