[PATCH, committed] PPC405 atomic support (PR target/21760)

David Edelsohn dje@watson.ibm.com
Mon Jun 27 17:18:00 GMT 2005


	I committed the following to remove the use of undefined CPP
behavior. 

David

	* config/rs6000/rs6000.c (rs6000_file_start): Note PPC405 erratum
	in verbose_asm output.
	* config/rs6000/rs6000.h (PPC405_ERRATUM77): Bracket with
	CONFIG_PPC405CR.
	* config.gcc (powerpc with_which): Define CONFIG_PPC405CR for
	405cr.

Index: rs6000.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/rs6000/rs6000.c,v
retrieving revision 1.843
diff -c -p -r1.843 rs6000.c
*** rs6000.c	25 Jun 2005 01:22:07 -0000	1.843
--- rs6000.c	27 Jun 2005 17:10:42 -0000
*************** rs6000_file_start (void)
*** 1850,1855 ****
--- 1850,1863 ----
  	    }
  	}
  
+ #ifdef CONFIG_PPC405CR
+       if (rs6000_cpu == PROCESSOR_PPC405)
+ 	{
+ 	  fprint (file, "%s PPC405CR_ERRATUM77", start);
+ 	  start = "";
+ 	}
+ #endif
+ 
  #ifdef USING_ELFOS_H
        switch (rs6000_sdata)
  	{
Index: rs6000.h
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/rs6000/rs6000.h,v
retrieving revision 1.374
diff -c -p -r1.374 rs6000.h
*** rs6000.h	26 Jun 2005 11:42:11 -0000	1.374
--- rs6000.h	27 Jun 2005 17:10:42 -0000
***************
*** 50,57 ****
  #endif
  
  /* If configured for PPC405, support PPC405CR Erratum77.  */
! #define PPC405_CPU_DEFAULT ("405")
! #if #TARGET_CPU_DEFAULT == #PPC405_CPU_DEFAULT
  #define PPC405_ERRATUM77 (rs6000_cpu == PROCESSOR_PPC405)
  #else
  #define PPC405_ERRATUM77 0
--- 50,56 ----
  #endif
  
  /* If configured for PPC405, support PPC405CR Erratum77.  */
! #ifdef CONFIG_PPC405CR
  #define PPC405_ERRATUM77 (rs6000_cpu == PROCESSOR_PPC405)
  #else
  #define PPC405_ERRATUM77 0
Index: config.gcc
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config.gcc,v
retrieving revision 1.550
diff -c -p -r1.550 config.gcc
*** config.gcc	25 Jun 2005 01:59:35 -0000	1.550
--- config.gcc	27 Jun 2005 17:10:54 -0000
*************** case "${target}" in
*** 2637,2642 ****
--- 2637,2646 ----
  				with_which="with_$which"
  				eval $with_which=
  				;;
+ 			405cr)
+ 				tm_defines="${tm_defines} CONFIG_PPC405CR"
+ 				eval "with_$which=405"
+ 				;;
  			"" | common \
  			| power | power[2345] | powerpc | powerpc64 \
  			| rios | rios1 | rios2 | rsc | rsc1 | rs64a \



More information about the Gcc-patches mailing list