[Patch,AVR]: Built-in for non-contiguous port layouts

Georg-Johann Lay avr@gjlay.de
Tue Feb 14 17:52:00 GMT 2012

Weddington, Eric wrote:
>> This patch set removes __builtin_avr_map8 __builtin_avr_map16
>> built-ins and implements a built-in __builtin_avr_insert_bits instead.
> In your avr_fold_builtin function you have switch (fcode) with only one
> case (and a "default" that just breaks). Are you planning to add more
> cases in the near future? If not, wouldn't it be better to just make it
> an 'if' statement?

The intention was to facilitate adding of other folds by means of other case
entries.  Folding swap is pretty much trivial for example.  And someone
proposed adding things like __builtin_avr_memx_flash_p resp.
__builtin_avr_memx_ram_p that could also be folded easily.


More information about the Gcc-patches mailing list