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]

SH: fix PIC


PIC is broken on the SH because two unspecs in an expander have
different modes; they must match exactly.  This fixes things.

Andrew.


2001-08-10  Andrew Haley  <aph@cambridge.redhat.com>

	* config/sh/sh.md: Add modes to unspecs in first insn to match
	those in the second.

Index: config/sh/sh.md
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/sh/sh.md,v
retrieving revision 1.87
diff -c -3 -p -r1.87 sh.md
*** sh.md       2001/07/24 15:52:23     1.87
--- sh.md       2001/08/10 16:39:13
***************
*** 3746,3752 ****
  
  (define_expand "GOTaddr2picreg"
    [(set (reg:SI R0_REG)
!       (unspec [(const (unspec [(match_dup 1)] UNSPEC_PIC))]
                UNSPEC_MOVA))
     (set (match_dup 0) (const:SI (unspec:SI [(match_dup 1)] UNSPEC_PIC)))
     (set (match_dup 0) (plus:SI (match_dup 0) (reg:SI R0_REG)))]
--- 3746,3752 ----
  
  (define_expand "GOTaddr2picreg"
    [(set (reg:SI R0_REG)
!       (unspec [(const:SI (unspec:SI [(match_dup 1)] UNSPEC_PIC))]
                UNSPEC_MOVA))
     (set (match_dup 0) (const:SI (unspec:SI [(match_dup 1)] UNSPEC_PIC)))
     (set (match_dup 0) (plus:SI (match_dup 0) (reg:SI R0_REG)))]


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