This is the mail archive of the
mailing list for the GCC project.
Ping #1: [Patch,AVR]: Add builtins.def and fix some ICE, add tests
- From: Georg-Johann Lay <avr at gjlay dot de>
- To: gcc-patches at gcc dot gnu dot org
- Cc: Denis Chertykov <chertykov at gmail dot com>, Eric Weddington <eric dot weddington at atmel dot com>
- Date: Fri, 24 Feb 2012 19:44:36 +0100
- Subject: Ping #1: [Patch,AVR]: Add builtins.def and fix some ICE, add tests
- References: <4F3C199A.email@example.com>
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?
> * gcc.target/avr/torture/builtins-1.c: New test.
> * gcc.target/avr/torture/builtins-error.c: New test.
> * 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.