Bug 216516 - Octeon saa/saad instructions require "octeon+" CPU
Summary: Octeon saa/saad instructions require "octeon+" CPU
Status: Closed FIXED
Alias: None
Product: Base System
Classification: Unclassified
Component: bin (show other bugs)
Version: CURRENT
Hardware: mips Any
: --- Affects Some People
Assignee: Ed Maste
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-01-27 04:05 UTC by Ed Maste
Modified: 2017-03-03 00:40 UTC (History)
1 user (show)

See Also:
bugzilla: maintainer-feedback? (bapt)


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Ed Maste freebsd_committer freebsd_triage 2017-01-27 04:05:03 UTC
mips64-binutils-2.27_5,1       devel/mips64-binutils
mips64-gcc-6.3.0               devel/mips64-gcc

--- cvmx-srio.o ---
{standard input}: Assembler messages:
{standard input}:75: Error: opcode not supported on this processor: octeon (mips64r2) `saa $2,($5)'
{standard input}:4293: Error: opcode not supported on this processor: octeon (mips64r2) `saa $11,($2)'
{standard input}:4565: Error: opcode not supported on this processor: octeon (mips64r2) `saa $9,($2)'
{standard input}:5122: Error: opcode not supported on this processor: octeon (mips64r2) `saa $3,($2)'
*** [cvmx-srio.o] Error code 1

Added to base as in r208737
https://svnweb.freebsd.org/base?view=revision&revision=208737
Comment 1 Ed Maste freebsd_committer freebsd_triage 2017-01-27 20:23:32 UTC
The correct CPU type for saa/saad support is octeon+, and devel/mips64-binutils does support saa/saad for -march=octeon+.
Comment 2 commit-hook freebsd_committer freebsd_triage 2017-01-27 21:32:05 UTC
A commit references this bug:

Author: emaste
Date: Fri Jan 27 21:31:32 UTC 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

Changes:
  head/contrib/binutils/gas/config/tc-mips.c
  head/contrib/gcc/config/mips/mips.c
  head/contrib/gcc/config/mips/mips.h
Comment 3 commit-hook freebsd_committer freebsd_triage 2017-03-03 00:40:18 UTC
A commit references this bug:

Author: emaste
Date: Fri Mar  3 00:39:30 UTC 2017
New revision: 314573
URL: https://svnweb.freebsd.org/changeset/base/314573

Log:
  MFC r312899: add octeon+ as an alias for octeon in GCC & binutils

  r208737 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.

  Also includes GCC FBSD_CC_VER bump (r313041 in HEAD)

  PR:		216516
  Sponsored by:	The FreeBSD Foundation

Changes:
_U  stable/11/
  stable/11/contrib/binutils/gas/config/tc-mips.c
  stable/11/contrib/gcc/config/mips/mips.c
  stable/11/contrib/gcc/config/mips/mips.h
  stable/11/gnu/usr.bin/cc/cc_tools/freebsd-native.h
Comment 4 Ed Maste freebsd_committer freebsd_triage 2017-03-03 00:40:55 UTC
Committed to HEAD and stable/11