How to handle SCmode.
Ian Lance Taylor
iant@google.com
Tue Jul 7 14:30:00 GMT 2009
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
More information about the Gcc-help
mailing list