This is the mail archive of the gcc-help@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: How to handle SCmode.


sumanth <sumanth.gundapneni@redpinesignals.com> writes:

> int hard_regno_mode_ok (reg, mode)
>     enum machine_mode mode;
>     int reg;
> {
>    int width = GET_MODE_SIZE(mode) * BITS_PER_UNIT;
>    if (width == 32 || width == 16 || width == 8)
>    {
>        return 1;
>    }
>    return 0;
> }

This is too restrictive.  gcc wants to be able to store larger values in
registers--in the case of SCmode, a 64-bit value.  gcc will handle this
as a pair of consecutive registers, but you need to tell it that that is
OK.  Typically you would say that a 64-bit value may be stored in any
even register number, or in any register.

Ian


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