[riot-devel] bitfeilds

Neil Jones neiljay at gmail.com
Thu Oct 27 21:22:52 CEST 2016


Ok so they are not outright banned but not recommended unless you can prove
there are not any code size penalties?
I'm now very interested in testing this on MIPS and will be querying our
compiler engineers if there is a difference. I wonder if the fact that
volatile acts as a compiler memory barrier that the compiled code is larger?

Neil

On 27 Oct 2016 14:11, "Hauke Petersen" <hauke.petersen at fu-berlin.de> wrote:

> Sorry, saw Olegs mail only after I send mine...
>
> Cheers,
> Hauke
>
> On 27.10.2016 15:06, Martine Lenders wrote:
>
>> Hi,
>>
>> 2016-10-27 15:01 GMT+02:00 Oleg Hahm <oliver.hahm at inria.fr <mailto:
>> oliver.hahm at inria.fr>>:
>>
>>     Hi Martine!
>>
>>     On Thu, Oct 27, 2016 at 01:35:21PM +0200, Martine Lenders wrote:
>>     > >> As example I was able to save several 100 bytes of ROM when
>>     removing the
>>     > >> named bitfield use from the samr21s peripheral drivers.
>>     > >
>>     > >
>>     > I don't know about your specific code, but I was able to show,
>>     that a
>>     > bitfield actually *saves* ROM [1].
>>
>>     In your example the variables were not volatile.
>>
>>
>> Right. That might be a factor ^^".
>>
>> Cheers,
>> Martine
>>
>>
>> _______________________________________________
>> devel mailing list
>> devel at riot-os.org
>> https://lists.riot-os.org/mailman/listinfo/devel
>>
>
> _______________________________________________
> devel mailing list
> devel at riot-os.org
> https://lists.riot-os.org/mailman/listinfo/devel
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.riot-os.org/pipermail/devel/attachments/20161027/5dae2bae/attachment-0001.html>


More information about the devel mailing list