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]
Other format: [Raw text]

Re: ppc-eabisim is broken in mainline


Joern.

My combined tree is acting up, so I haven't tested a full build of
ppc-eabi*, but this fixes the -mlittle problem.

Let me know how it goes.

Aldy

	* config/rs6000/sysv4.opt (mlittle): Handle.

	* config/rs6000/rs6000.c (rs6000_handle_option): Set
	target_flags_explicit when appropriate.

Index: config/rs6000/sysv4.opt
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/rs6000/sysv4.opt,v
retrieving revision 1.2
diff -c -p -r1.2 sysv4.opt
*** config/rs6000/sysv4.opt	6 May 2005 19:34:10 -0000	1.2
--- config/rs6000/sysv4.opt	11 May 2005 23:43:45 -0000
*************** mlittle-endian
*** 53,62 ****
  Target Report RejectNegative Mask(LITTLE_ENDIAN)
  Produce little endian code
  
! ; FIXME: Need a way to specify an alias.
! ;mlittle
! ;Target Report RejectNegative Mask(LITTLE_ENDIAN)
! ;Produce little endian code
  
  mbig-endian
  Target Report RejectNegative InverseMask(LITTLE_ENDIAN)
--- 53,61 ----
  Target Report RejectNegative Mask(LITTLE_ENDIAN)
  Produce little endian code
  
! mlittle
! Target Report RejectNegative Mask(LITTLE_ENDIAN) MaskExists
! Produce little endian code
  
  mbig-endian
  Target Report RejectNegative InverseMask(LITTLE_ENDIAN)
Index: config/rs6000/rs6000.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/rs6000/rs6000.c,v
retrieving revision 1.823
diff -c -p -r1.823 rs6000.c
*** config/rs6000/rs6000.c	7 May 2005 18:51:46 -0000	1.823
--- config/rs6000/rs6000.c	11 May 2005 23:43:53 -0000
*************** rs6000_handle_option (size_t code, const
*** 1553,1570 ****
--- 1553,1577 ----
      case OPT_mno_power:
        target_flags &= ~(MASK_POWER | MASK_POWER2
  			| MASK_MULTIPLE | MASK_STRING);
+       target_flags_explicit |= (MASK_POWER | MASK_POWER2
+ 				| MASK_MULTIPLE | MASK_STRING);
        break;
      case OPT_mno_powerpc:
        target_flags &= ~(MASK_POWERPC | MASK_PPC_GPOPT
  			| MASK_PPC_GFXOPT | MASK_POWERPC64);
+       target_flags_explicit |= (MASK_POWERPC | MASK_PPC_GPOPT
+ 				| MASK_PPC_GFXOPT | MASK_POWERPC64);
        break;
      case OPT_mfull_toc:
        target_flags &= ~(MASK_MINIMAL_TOC | MASK_NO_FP_IN_TOC
  			| MASK_NO_SUM_IN_TOC);
+       target_flags_explicit |= (MASK_MINIMAL_TOC | MASK_NO_FP_IN_TOC
+ 				| MASK_NO_SUM_IN_TOC);
  #ifdef TARGET_USES_SYSV4_OPT
        /* Note, V.4 no longer uses a normal TOC, so make -mfull-toc, be
  	 just the same as -mminimal-toc.  */
        target_flags |= MASK_MINIMAL_TOC;
+       target_flags_explicit |= MASK_MINIMAL_TOC;
  #endif
        break;
  
*************** rs6000_handle_option (size_t code, const
*** 1572,1577 ****
--- 1579,1585 ----
      case OPT_mtoc:
        /* Make -mtoc behave like -mminimal-toc.  */
        target_flags |= MASK_MINIMAL_TOC;
+       target_flags_explicit |= MASK_MINIMAL_TOC;
        break;
  #endif
  
*************** rs6000_handle_option (size_t code, const
*** 1581,1586 ****
--- 1589,1596 ----
      case OPT_m64:
  #endif
        target_flags |= MASK_POWERPC64 | MASK_POWERPC | MASK_PPC_GFXOPT;
+       target_flags_explicit |= MASK_POWERPC64 | MASK_POWERPC
+ 	| MASK_PPC_GFXOPT;
        break;
  
  #ifdef TARGET_USES_AIX64_OPT
*************** rs6000_handle_option (size_t code, const
*** 1589,1594 ****
--- 1599,1605 ----
      case OPT_m32:
  #endif
        target_flags &= ~MASK_POWERPC64;
+       target_flags_explicit |= MASK_POWERPC64;
        break;
  
      case OPT_minsert_sched_nops_:
*************** rs6000_handle_option (size_t code, const
*** 1598,1622 ****
      case OPT_mminimal_toc:
        if (value == 1)
  	{
! 	  target_flags &= ~MASK_NO_FP_IN_TOC;
! 	  target_flags &= ~MASK_NO_SUM_IN_TOC;
  	}
        break;
  
      case OPT_mpower:
        if (value == 1)
! 	target_flags |= (MASK_MULTIPLE | MASK_STRING);
        break;
  
      case OPT_mpower2:
        if (value == 1)
! 	target_flags |= (MASK_POWER | MASK_MULTIPLE | MASK_STRING);
        break;
  
      case OPT_mpowerpc_gpopt:
      case OPT_mpowerpc_gfxopt:
        if (value == 1)
! 	target_flags |= MASK_POWERPC;
        break;
  
  #if TARGET_ALTIVEC_VRSAVE != 0
--- 1609,1642 ----
      case OPT_mminimal_toc:
        if (value == 1)
  	{
! 	  target_flags &= ~(MASK_NO_FP_IN_TOC | MASK_NO_SUM_IN_TOC);
! 	  target_flags_explicit |= (MASK_NO_FP_IN_TOC | MASK_NO_SUM_IN_TOC);
  	}
        break;
  
      case OPT_mpower:
        if (value == 1)
! 	{
! 	  target_flags |= (MASK_MULTIPLE | MASK_STRING);
! 	  target_flags_explicit |= (MASK_MULTIPLE | MASK_STRING);
! 	}
        break;
  
      case OPT_mpower2:
        if (value == 1)
! 	{
! 	  target_flags |= (MASK_POWER | MASK_MULTIPLE | MASK_STRING);
! 	  target_flags_explicit |= (MASK_POWER | MASK_MULTIPLE | MASK_STRING);
! 	}
        break;
  
      case OPT_mpowerpc_gpopt:
      case OPT_mpowerpc_gfxopt:
        if (value == 1)
! 	{
! 	  target_flags |= MASK_POWERPC;
! 	  target_flags_explicit |= MASK_POWERPC;
! 	}
        break;
  
  #if TARGET_ALTIVEC_VRSAVE != 0
*************** rs6000_handle_option (size_t code, const
*** 1657,1671 ****
  
      case OPT_mrelocatable:
        if (value == 1)
! 	target_flags |= MASK_MINIMAL_TOC | MASK_NO_FP_IN_TOC;
        break;
  
      case OPT_mrelocatable_lib:
        if (value == 1)
! 	target_flags |= MASK_RELOCATABLE | MASK_MINIMAL_TOC
! 	  | MASK_NO_FP_IN_TOC;
        else
! 	target_flags &= ~MASK_RELOCATABLE;
        break;
  #endif
  
--- 1677,1701 ----
  
      case OPT_mrelocatable:
        if (value == 1)
! 	{
! 	  target_flags |= MASK_MINIMAL_TOC | MASK_NO_FP_IN_TOC;
! 	  target_flags_explicit |= MASK_MINIMAL_TOC | MASK_NO_FP_IN_TOC;
! 	}
        break;
  
      case OPT_mrelocatable_lib:
        if (value == 1)
! 	{
! 	  target_flags |= MASK_RELOCATABLE | MASK_MINIMAL_TOC
! 	    | MASK_NO_FP_IN_TOC;
! 	  target_flags_explicit |= MASK_RELOCATABLE | MASK_MINIMAL_TOC
! 	    | MASK_NO_FP_IN_TOC;
! 	}
        else
! 	{
! 	  target_flags &= ~MASK_RELOCATABLE;
! 	  target_flags_explicit |= MASK_RELOCATABLE;
! 	}
        break;
  #endif
  


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