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] MIPS: 64bit floating point support for MIPS32R2


Richard Sandiford wrote:


I'm still a little worried about that cannot_change_mode_class hunk; do you know off-hand why it's needed?

hmm. If I still recall this correctly. The check (FP_INC > 1) is no longer valid for gp32+fp64, but there still needs a reg_classes_intersect_p (FP_REGS, class) check to ensure we ain't simply converting between 32bit integer and 64bit floats. The check at the end of the function will catch 32bit -> 64bit float, but not 64bit -> 32bit.
It should allow pattens such as subreg:SI (reg:DF) or even the paradoxical subreg:DI (reg:SF) provided they fit. But subreg:SF (reg:DI) is a no no.
I first saw this problem in gdb.base/complex.c test back in the days of gcc 3.4.
I tried taking out this check to see the damage, the numbers of failures are 112 and it has affected some ieee complex test, and basically generates wrong code for the others.



mips_class_max_nregs might also need changing btw.



I guess we should add something like


  if (class == FP_REGS)
    return (GET_MODE_SIZE (mode) + UNITS_PER_FPREG - 1) / UNITS_PER_FPREG;

David


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