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]

m68k PIC stuff



Don missed a couple things when he fixed the PIC register.

First he only fixed it in the SUN_FPA case.  Opps.

Second, the register also needs to be marked as call_used.

The net result of these changes (as a whole) is to prevent the register
allocators and reload pass from using %a5 to hold other values (possibly
clobbering the GOT when we really needed it).


        * m68k.h (CONDITIONAL_REGISTER_USAGE): Define for !SUN_FPA
        case.  Also make the PIC register call_used.

Index: m68k.h
===================================================================
RCS file: /egcs/carton/cvsfiles/egcs/gcc/config/m68k/m68k.h,v
retrieving revision 1.35
diff -c -3 -p -r1.35 m68k.h
*** m68k.h	1999/06/28 04:39:42	1.35
--- m68k.h	1999/06/28 12:09:02
*************** extern int target_flags;
*** 457,463 ****
  	fixed_regs[i] = call_used_regs[i] = 1; 	\
      } 						\
    if (flag_pic)					\
!     fixed_regs[PIC_OFFSET_TABLE_REGNUM] = 1	\
  }
  
  #endif /* defined SUPPORT_SUN_FPA */
--- 457,471 ----
  	fixed_regs[i] = call_used_regs[i] = 1; 	\
      } 						\
    if (flag_pic)					\
!     fixed_regs[PIC_OFFSET_TABLE_REGNUM]		\
!       = call_used_regs[PIC_OFFSET_TABLE_REGNUM] = 1;\
! }
! #else
! #define CONDITIONAL_REGISTER_USAGE \
! { 						\
!   if (flag_pic)					\
!     fixed_regs[PIC_OFFSET_TABLE_REGNUM]		\
!       = call_used_regs[PIC_OFFSET_TABLE_REGNUM] = 1;\
  }
  
  #endif /* defined SUPPORT_SUN_FPA */



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