public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [PATCH 8/9] subreg_get_info
@ 2017-04-01 16:48 Andrew Jenner
  2017-04-25 16:43 ` Jeff Law
  0 siblings, 1 reply; 2+ messages in thread
From: Andrew Jenner @ 2017-04-01 16:48 UTC (permalink / raw)
  To: GCC Patches

[-- Attachment #1: Type: text/plain, Size: 390 bytes --]

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  <andrew@codesourcery.com>

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


[-- Attachment #2: gcc_ia16_rtlanal.patch --]
[-- Type: text/x-patch, Size: 500 bytes --]

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.



^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2017-04-25 16:39 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-04-01 16:48 [PATCH 8/9] subreg_get_info Andrew Jenner
2017-04-25 16:43 ` Jeff Law

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).