public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [Xtensa] fix subword loads from constant pool
@ 2008-04-04  4:36 Bob Wilson
  0 siblings, 0 replies; only message in thread
From: Bob Wilson @ 2008-04-04  4:36 UTC (permalink / raw)
  To: gcc-patches

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

I'm committing this patch to fix an ICE for the Xtensa port.  A QImode or HImode 
reload from the constant pool requires a scratch register because Xtensa can 
only load 32-bit values from the constant pool.  I ran the testsuite for an 
xtensa-elf target to check for regressions and I verified that this fixes the 
original problem for an xtensa-linux-uclibc target.  I'll apply this on the 4.2 
branch as well.

2008-04-03  Bob Wilson  <bob.wilson@acm.org>

         * config/xtensa/xtensa.c (xtensa_secondary_reload_class): Use a
         secondary input reload for subword loads from the constant pool.

[-- Attachment #2: gcc-subword-l32r.patch --]
[-- Type: text/plain, Size: 418 bytes --]

Index: config/xtensa/xtensa.c
===================================================================
--- config/xtensa/xtensa.c	(revision 133873)
+++ config/xtensa/xtensa.c	(working copy)
@@ -2839,7 +2839,8 @@
 
   if (!isoutput)
     {
-      if (class == FP_REGS && constantpool_mem_p (x))
+      if ((class == FP_REGS || GET_MODE_SIZE (mode) < UNITS_PER_WORD)
+	  && constantpool_mem_p (x))
 	return RL_REGS;
     }
 

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2008-04-04  3:55 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-04-04  4:36 [Xtensa] fix subword loads from constant pool Bob Wilson

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).