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: [PATCH] New target-hook: mode_rep_extended


Richard Sandiford writes:
>    for (in_mode = GET_CLASS_NARROWEST_MODE (MODE_INT); in_mode != VOIDmode;
>         in_mode = GET_MODE_WIDER_MODE (in_mode))
>      {
>        /* Set END_MODE to the first mode that does not require
>           sign-extension.  */
>        end_mode = GET_CLASS_NARROWEST_MODE (MODE_INT);
>        for (mode = start_mode; mode != in_mode;
>             mode = GET_MODE_WIDER_MODE (mode))
>          if (targetm.mode_rep_extended (in_mode, mode) == SIGN_EXTEND)
>            end_mode = GET_MODE_WIDER_MODE (mode);
> 
>        /* Set up num_sign_bit_copies_in_rep for all target modes in the
>           range [GET_CLASS_NARROWEST_MODE (MODE_INT), END_MODE).  */
>        for (mode = GET_CLASS_NARROWEST_MODE (MODE_INT); mode != end_mode;
>             mode = GET_MODE_WIDER_MODE (mode))
>          num_sign_bit_copies_in_rep[mode][in_mode]
>            = GET_MODE_BITSIZE (in_mode) - GET_MODE_BITSIZE (mode);
>      }

Yes, I think I got the idea.

But anyway do you mind if I keep my version after of course fixing to
cut the second loop short?

Adam


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