This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Ping #1: [Patch,AVR]: Add builtins.def and fix some ICE, add tests


2012/2/24 Georg-Johann Lay <avr@gjlay.de>:
> http://gcc.gnu.org/ml/gcc-patches/2012-02/msg00843.html
>
> Georg-Johann Lay wrote:
>> This patch introduces a new file builtins.def that is used as central registry
>> to hold built-ins' information.
>>
>> The file is used by defining DEF_BUILTIN macre and then including the file as
>> described in the head comment of builtins.def.
>>
>> Up to here it's all code clean-up and no functional change.
>>
>> Moreover there are some minor changes and ICE fixes:
>>
>> * Fold __builtin_avr_swap to rotate <<< 4
>> * Don't fold __builtin_avr_insert_bits if first arg is non-const (was ICE)
>> * Don't expand __builtin_avr_delay_cycles if arg is not-const (was ICE)
>>
>> Ok for trunk?
>>
>> Johann
>>
>> gcc/testsuite/
>> Â Â Â * gcc.target/avr/torture/builtins-1.c: New test.
>> Â Â Â * gcc.target/avr/torture/builtins-error.c: New test.
>> gcc/
>> Â Â Â * config/avr/builtins.def: New file.
>> Â Â Â * config/avr/t-avr (avr.o, avr-c.o): Depend on it.
>> Â Â Â * config/avr/avr.c (enum avr_builtin_id): Use it.
>> Â Â Â (avr_init_builtins): Use it. And use avr_bdesc.
>> Â Â Â (bdesc_1arg): Remove.
>> Â Â Â (bdesc_2arg): Remove.
>> Â Â Â (bdesc_3arg): Remove.
>> Â Â Â (struct avr_builtin_description): Add field n_args.
>> Â Â Â (avr_bdesc): New static variable using builtins.def.
>> Â Â Â (avr_expand_builtin): Use it.
>> Â Â Â Don't call avr_expand_delay_cycles if op0 is not CONST_INT.
>> Â Â Â (avr_fold_builtin): Fold AVR_BUILTIN_SWAP.
>> Â Â Â Don't fold AVR_BUILTIN_INSERT_BITS if arg0 is not INTEGER_CST.
>
>


Approved.

Denis.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]