In the course of working with the ia16 port, I found a case of subreg shape (I think it was a 32-bit value in one 16-bit register and two 8-bit registers) which is not currently supported by subreg_get_info but which easily could be, with the attached change.

2017-04-01  Andrew Jenner  <and...@codesourcery.com>

        * rtlanal.c (subreg_get_info): set info->nregs from hard_regno_nregs.

Index: gcc/rtlanal.c
===================================================================
--- gcc/rtlanal.c	(revision 475331)
+++ gcc/rtlanal.c	(revision 475455)
@@ -3730,7 +3730,7 @@ subreg_get_info (unsigned int xregno, ma
       rknown = true;
     }
   info->offset = (y_offset / (mode_multiple / nregs_multiple)) * nregs_ymode;
-  info->nregs = nregs_ymode;
+  info->nregs = hard_regno_nregs[xregno + info->offset][ymode];
 }

 /* This function returns the regno offset of a subreg expression.


Reply via email to