This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: Ping #1: [Patch,AVR]: Add builtins.def and fix some ICE, add tests
- From: Denis Chertykov <chertykov at gmail dot com>
- To: Georg-Johann Lay <avr at gjlay dot de>
- Cc: gcc-patches at gcc dot gnu dot org, Eric Weddington <eric dot weddington at atmel dot com>
- Date: Sat, 25 Feb 2012 15:10:00 +0400
- Subject: Re: Ping #1: [Patch,AVR]: Add builtins.def and fix some ICE, add tests
- Authentication-results: mr.google.com; spf=pass (google.com: domain of chertykov@gmail.com designates 10.152.134.200 as permitted sender) smtp.mail=chertykov@gmail.com; dkim=pass header.i=chertykov@gmail.com
- References: <4F3C199A.2090309@gjlay.de> <4F47DA94.1030308@gjlay.de>
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.