This is the mail archive of the 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: [avr] Use unsigned int rather than double_int for insert_bits

2013/11/3 Richard Sandiford <>:
> The __builtin_avr_insert_bits code uses a double_int to handle the mask,
> but AIUI the mask has exactly 32 bits.  Is that right?  If so, would it be
> OK to use "unsigned int" instead?  I realise this might seem like pointless
> churn, but it would help out with the wide_int conversion.
> Doing this also gets rid of the last use of the %X avr_[fe]dump format.
> It looks like %D is already unused.  So would it be OK to get rid of them
> at the same time?  The hope is that wide_int will remove all remaining
> uses of double_int, so new uses are unlikely to pop up.
> I tested this by compiling builtin_insert_bits-{1,2}.c before and after
> the patch at various optimisation levels and checking that they produce
> the same code.  OK to install?
> Thanks,
> Richard
> gcc/
>         * config/avr/avr-log.c (avr_double_int_pop_digit): Delete.
>         (avr_dump_double_int_hex): Likewise.
>         (avr_log_vadump): Remove %D and %X handling.
>         * config/avr/avr.c (avr_double_int_push_digit): Delete.
>         (avr_map_op_t): Change map from double_int to unsigned int.
>         (avr_map_op): Update accordingly.
>         (avr_map, avr_map_metric, avr_has_nibble_0xf, avr_map_decompose)
>         (avr_move_bits, avr_out_insert_bits, avr_fold_builtin): Operate on
>         unsigned ints rather than double_ints.

Please apply.


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