avr-gcc-list
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [avr-gcc-list] AVR Libc int32_t and uint32_t typedefsareincorrect


From: Weddington, Eric
Subject: Re: [avr-gcc-list] AVR Libc int32_t and uint32_t typedefsareincorrect
Date: Fri, 13 Jan 2012 12:19:15 -0700


> -----Original Message-----
> From: address@hidden
> [mailto:address@hidden On
> Behalf Of David Brown
> Sent: Friday, January 13, 2012 10:48 AM
> To: address@hidden
> Subject: Re: [avr-gcc-list] AVR Libc int32_t and uint32_t
> typedefsareincorrect
> 

> 
> Here is an idea to try out - instead of using "unsigned char" and
> "signed char" as your basis for 8-bit data, try using C++ classes
around
> them with arithmetic operators defined.  In many cases, you can get
more
> efficient code since there are no promotions for C++ classes.
> 
> It was a while back that I tried this, and although some code was
> smaller and faster than using normal uint8_t, other code was much
worse.
>   But it would be fun to try again.

Interesting approach!

It might be nice to work up a kind of "test suite" with those C++
classes to be able to compare the codegen of many kinds of operations
with the C compiler output.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]