Author: emaste
Date: Fri Jan 27 21:31:32 2017
New Revision: 312899
URL: https://svnweb.freebsd.org/changeset/base/312899

Log:
  add octeon+ as an alias for octeon in GCC & binutils
  
  In r208737 jmallett@ added support for the "mips64r2" architecture
  and "octeon" CPU, and the saa/saad instructions.
  
  Upstream binutils also added the "octeon+" CPU, and the saa/saad
  instructions are only available in octeon+, not octeon.  Since our
  base system tool chain already accepts saa/saad with -march=octeon,
  just allow octeon+ as an alias.
  
  This allows the use of octeon+ in kernel config files, for use with both
  external tool chain and in-tree GCC/binutils.
  
  PR:           216516
  MFC after:    1 month
  Sponsored by: The FreeBSD Foundation

Modified:
  head/contrib/binutils/gas/config/tc-mips.c
  head/contrib/gcc/config/mips/mips.c
  head/contrib/gcc/config/mips/mips.h

Modified: head/contrib/binutils/gas/config/tc-mips.c
==============================================================================
--- head/contrib/binutils/gas/config/tc-mips.c  Fri Jan 27 21:26:23 2017        
(r312898)
+++ head/contrib/binutils/gas/config/tc-mips.c  Fri Jan 27 21:31:32 2017        
(r312899)
@@ -15156,6 +15156,7 @@ static const struct mips_cpu_info mips_c
 
   /* Cavium Networks Octeon CPU core */
   { "octeon",         0,      ISA_MIPS64R2,   CPU_OCTEON },
+  { "octeon+",        0,      ISA_MIPS64R2,   CPU_OCTEON },
 
   /* End marker */
   { NULL, 0, 0, 0 }

Modified: head/contrib/gcc/config/mips/mips.c
==============================================================================
--- head/contrib/gcc/config/mips/mips.c Fri Jan 27 21:26:23 2017        
(r312898)
+++ head/contrib/gcc/config/mips/mips.c Fri Jan 27 21:31:32 2017        
(r312899)
@@ -765,6 +765,7 @@ const struct mips_cpu_info mips_cpu_info
 
   /* MIPS64R2 */
   { "octeon", PROCESSOR_OCTEON, 65 },
+  { "octeon+", PROCESSOR_OCTEON, 65 },
 
   /* End marker */
   { 0, 0, 0 }

Modified: head/contrib/gcc/config/mips/mips.h
==============================================================================
--- head/contrib/gcc/config/mips/mips.h Fri Jan 27 21:26:23 2017        
(r312898)
+++ head/contrib/gcc/config/mips/mips.h Fri Jan 27 21:31:32 2017        
(r312899)
@@ -285,7 +285,10 @@ extern const struct mips_rtx_cost_data *
                                                                \
       macro = concat ((PREFIX), "_", (INFO)->name, NULL);      \
       for (p = macro; *p != 0; p++)                            \
-       *p = TOUPPER (*p);                                      \
+       if (*p == '+')                                          \
+         *p = 'P';                                             \
+       else                                                    \
+         *p = TOUPPER (*p);                                    \
                                                                \
       builtin_define (macro);                                  \
       builtin_define_with_value ((PREFIX), (INFO)->name, 1);   \
_______________________________________________
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"

Reply via email to