Commit Graph

62 Commits

Author SHA1 Message Date
Ryan Libby
1a11bb8f76 gnu binutils: FSGSBASE assembly/disassembly
Enable the in-tree binutils to assemble and disassemble amd64 FSGSBASE
instructions (rdfsbase, rdgsbase, wrfsbase, wrgsbase), used in the base
system since r322763.

This gives one last gasp for in-tree gcc, and provides a small
enhancement for in-tree binutils objdump.

Reviewed by:	dim, kib
Approved by:	markj (mentor)
Sponsored by:	Dell EMC Isilon
Differential Revision:	https://reviews.freebsd.org/D12222
2017-09-05 19:04:07 +00:00
Justin Hibbits
e0b603cb9e Add rfdi opcode to binutils
The rfdi instruction is part of the e500mc and derivative cores.  It came into
binutils in a GPLv3 patch, along with the rest of the e500mc instruction set.
Currently only rfdi is planned to be used, so rather than attempt to backport
the full patch, take a surgical route and add instructions as needed.

MFC after:	2 weeks
2017-02-01 02:42:45 +00:00
Dimitry Andric
54e1e8cb67 In binutils' arm-dis.c, avoid left-shifting a negative number.
Submitted by:	dan.mcgregor_usask.ca (Dan McGregor)
MFC after:	3 days
Differential Revision: https://reviews.freebsd.org/D3376
2015-09-22 09:35:35 +00:00
Nathan Whitehorn
8a5843ad02 Add some opcodes for assembling forthcoming VSX (Vector-Scalar eXtension)
support in the kernel. Userspace programs are expected to rely on LLVM's
integrated assembler or newer binutils.
2015-02-22 20:52:29 +00:00
John Baldwin
2ea259616a Add support for the 'rdseed' instruction. 2014-05-18 03:57:54 +00:00
Dimitry Andric
aa5cdf0136 For GNU as, add two missing modes for each of the fcomip and fucomip
instructions.  Partially obtained from OpenBSD by Pedro Giffuni, while I
added the fcomip variants.

Apparently this should help with compiling certain variants of WebKit.

MFC after:	3 days
2014-04-07 21:12:09 +00:00
Pedro F. Giffuni
887bf737ad binutils: add support for Intel SMAP-related instructions
Add support for stac/clac instructions to manipulate the flag
that controls the behaviour of Intel's Supervisor Mode Access
Prevention (SMAP) feature.

Tested by:	dim
Obtained from:	OpenBSD
MFC after:	5 days
2014-01-26 00:37:21 +00:00
Marcel Moolenaar
e153be43ae Fix cross-compilation of ia64 target code with clang. 2013-12-28 22:52:46 +00:00
Sean Bruno
a9f8a8772a Queisce warning about attempting to add char * together and use explicit
array indexing to indicate what is meant to be done
2013-10-31 18:53:39 +00:00
Dimitry Andric
e1a5a8a74a Add support for assembling and disassembling Intel Random Number
Generator extensions (e.g. the 'rdrand' mnemonic) to our copy of
binutils.

Approved by:	re (kib)
Obtained from:	OpenBSD, via pfg
MFC after:	1 week
2013-10-07 16:33:16 +00:00
John Baldwin
dffe0dc4d2 Add support for the 'invpcid' instruction to binutils and DDB's
disassembler on amd64.

MFC after:	1 month
2013-09-03 21:21:47 +00:00
John-Mark Gurney
ed7ce02c2c reorder so all the flags are together and make the PCLMUL flag unique..
This fixes the problem on amd64 miscompiling mpboot.s causing boot
issues...  We are still using gas for a few files in the kernel...

Submitted by:	kib
MFC after:	1 month
2013-02-21 19:13:19 +00:00
John-Mark Gurney
c9ad522755 add support for AES and PCLMULQDQ instructions to binutils...
Thanks to Mike Belopuhov for the pointer to the OpenBSD patch, though
OpenBSD's gcc is very different that it only helped w/ where to modify,
not how...  Thanks to jhb for some early reviews...

Reviewed by:	imp, kib
MFC after:	1 month
2013-02-19 21:35:17 +00:00
John Baldwin
11a08d62da Add support for the 'invept' and 'invvpid' instructions. Beyond simply
adding appropriate table entries, the assembler had to be adjusted as
these are the first non-SSE instructions to use a 3-byte opcode (and a
mandatory prefix to boot).

MFC after:	1 month
2012-07-06 14:28:18 +00:00
John Baldwin
22f9e86238 Add support for the 'xsave', 'xrstor', 'xsaveopt', 'xgetbv', and 'xsetbv'
instructions.  I reimplemented this from scratch based on the Intel
manuals and the existing support for handling the fxsave and fxrstor
instructions.  This will let us use these instructions natively with GCC
rather than hardcoding the opcodes in hex.

Reviewed by:	kib
MFC after:	1 month
2012-07-04 22:12:10 +00:00
Ben Laurie
5f301949ef Fix clang warnings.
Approved by:	philip (mentor)
2011-06-18 13:56:33 +00:00
Dimitry Andric
97d40d3d4a Merge ^/vendor/binutils/dist@214571 into contrib/binutils, which brings
us up to version 2.17.50.20070703, at the last GPLv2 commit.

Amongst others, this added upstream support for some FreeBSD-specific
things that we previously had to manually hack in, such as the OSABI
label support, and so on.

There are also quite a number of new files, some for cpu's (e.g. SPU)
that we may or may not be interested in, but those can be cleaned up
later on, if needed.
2010-11-01 19:35:33 +00:00
Dimitry Andric
88afd39b79 Make contrib/binutils/opcodes/mips-dic.c compile without warnings. 2010-10-22 18:07:29 +00:00
Dimitry Andric
dfd2f2d4bb Merge ^vendor/binutils/dist@214082 into contrib/binutils. 2010-10-21 19:11:14 +00:00
Dimitry Andric
c9a933bd0b Merge ^vendor/binutils/dist@214033 into contrib/binutils.
The change made to bfd/elf.c in upstream revision 1.217.4.3 (which was a
revert of an earlier change), caused objcopy on powerpc to fail to copy
debug info from kernel modules.  This had to be fixed by applying the
diff from upstream revision 1.243 on top of it.
2010-10-19 20:14:32 +00:00
Juli Mallett
5619a3e4bf Add/improve mips64r2, Octeon, n32 and n64 support in the toolchain.
o) Add TARGET_ABI to the MIPS toolchain build process.  This sets the default
   ABI to one of o32, n32 or n64.  If it is not set, o32 is assumed as that is
   the current default.
o) Set the default GCC cpu type to any specified TARGET_CPUTYPE.  This is
   necessary to have a working "cc" if e.g. mips64 is specified, as binutils
   will refuse to link objects using different ISAs in some cases.
o) Add support for n32 and n64 ABIs to binutils and GCC.
o) Add additional required libgcc2 stubs for n32 and n64.
o) Add support for the "mips64r2" architecture to GCC.  Add the "octeon"
o) When static linking, wrap default libraries in --start-group and
   --end-group.  This is required for static linking to work on n64 with the
   interdependencies between libraries there.  This is what other OSes that
   support n64 seem to do, as well.
o) Fix our GCC spec to define __mips64 for 64-bit targets, not __mips64__, the
   former being what libgcc, etc., check and the latter seemingly being a
   misspelling of a hand merge from a Linux spec.
o) When no TARGET_CPUTYPE is specified at build time, make GCC take the default
   ISA from the ABI.  Our old defaults were too liberal and assumed that 64-bit
   ABIs should default to the MIPS64 ISA and that 32-bit ABIs should default to
   the MIPS32 ISA, when we are supporting or will support some systems based on
   earlier 32-bit and 64-bit ISAs, most notably MIPS-III.
o) Merge a new opcode file (and support code) from a later version of binutils
   and add flags and code necessary to support Octeon-specific instructions.
   This should also make merging opcodes for other modern architectures easier.

Reviewed by:	imp
2010-06-02 11:06:03 +00:00
David E. O'Brien
f51ee0a16d Rename vendor/binutils/*/contrib to vendor/binutils/*/x
Binutils has a "contrib" subdirectory - thus flattening cannot happen
without renaming the upper level contrib directory in a first pass.

Also, don't record this move and remove any keyword expansion.
2009-01-19 17:25:17 +00:00
David E. O'Brien
b7e4108c6b Import of Binutils from the FSF 2.15 branch (just post-.0 release).
These bits are taken from the FSF anoncvs repo on 23-May-2004 04:41:00 UTC.
2008-05-29 02:29:59 +00:00
David E. O'Brien
de582f44b4 This commit was generated by cvs2svn to compensate for changes in r179404,
which included commits to RCS files with non-trunk default branches.
2008-05-29 02:29:59 +00:00
John Birrell
962e1ce30f Fix strict alias warnings. 2007-11-23 23:56:03 +00:00
David E. O'Brien
362c19dcb0 Fix bogus fmov* SPARC opcodes.
(Note this makes the vendor branch not represent Binutils in the vendor's
CVS repository at any point in time.  Portmgr did not like the state of
Binutils on Sparc that represented the point in time the vendor fixed this
issue.  I'd rather have fixed this on RELENG_6.)

Approved by:	re
2005-07-07 22:06:54 +00:00
David E. O'Brien
43c1498efa This commit was generated by cvs2svn to compensate for changes in r147824,
which included commits to RCS files with non-trunk default branches.
2005-07-07 22:06:54 +00:00
David E. O'Brien
da03bc7002 Import of Binutils from the FSF 2.15 branch (just post-.0 release).
These bits are taken from the FSF anoncvs repo on 23-May-2004 04:41:00 UTC.
2004-06-16 05:45:41 +00:00
David E. O'Brien
ad6e3f2b73 This commit was generated by cvs2svn to compensate for changes in r130561,
which included commits to RCS files with non-trunk default branches.
2004-06-16 05:45:41 +00:00
David E. O'Brien
18dcca33ad Things that never should have been imported. 2003-03-02 19:10:30 +00:00
David E. O'Brien
ca88f70eac GC some stuff I thought was long gone. 2002-12-02 09:14:25 +00:00
David E. O'Brien
898696a8b3 Import of Binutils from the FSF 2.13 branch (just pre-.2 release).
These bits are taken from the FSF anoncvs repo on 27-Oct-2002 21:12:00 EST.
2002-12-02 09:06:04 +00:00
David E. O'Brien
6c3a332e94 This commit was generated by cvs2svn to compensate for changes in r107492,
which included commits to RCS files with non-trunk default branches.
2002-12-02 09:06:04 +00:00
David E. O'Brien
88e5f95a93 Import of Binutils from the FSF 2.13 branch (just pre-.1 release).
These bits are taken from the FSF anoncvs repo on 11-Oct-2002 22:39:35 PDT.
2002-10-11 06:01:20 +00:00
David E. O'Brien
8febaae8e2 This commit was generated by cvs2svn to compensate for changes in r104834,
which included commits to RCS files with non-trunk default branches.
2002-10-11 06:01:20 +00:00
David E. O'Brien
c7549e32a4 Import of Binutils from the FSF 2.12 branch (just post-.1 release).
These bits are taken from the FSF anoncvs repo on 22-June-2002 23:28:00 EDT.
2002-07-05 20:16:34 +00:00
David E. O'Brien
95cd50e6d7 This commit was generated by cvs2svn to compensate for changes in r99461,
which included commits to RCS files with non-trunk default branches.
2002-07-05 20:16:34 +00:00
David E. O'Brien
0aecce1e34 Import of Binutils from the FSF 2.12 branch.
(this fixes several linker problems and coredumps)
These bits are taken from the FSF anoncvs repo on 10-April-2002 13:24 Zulu
2002-04-12 19:33:52 +00:00
David E. O'Brien
d31ed8e471 This commit was generated by cvs2svn to compensate for changes in r94536,
which included commits to RCS files with non-trunk default branches.
2002-04-12 19:33:52 +00:00
David E. O'Brien
55ba99bb8d Import of Binutils from the FSF 2.12 branch (just post-.0 release).
These bits are taken from the FSF anoncvs repo on 20-March-2002 13:33:33 PST.
2002-03-20 21:37:13 +00:00
David E. O'Brien
771ecfb273 This commit was generated by cvs2svn to compensate for changes in r92828,
which included commits to RCS files with non-trunk default branches.
2002-03-20 21:37:13 +00:00
David E. O'Brien
eb1d121cb5 Import of Binutils from the FSF 2.12 branch (pre-.0 release).
These bits are taken from the FSF anoncvs repo on 21-Feburary-2002 20:15 PST.
2002-02-22 04:18:42 +00:00
David E. O'Brien
9e68b78882 This commit was generated by cvs2svn to compensate for changes in r91041,
which included commits to RCS files with non-trunk default branches.
2002-02-22 04:18:42 +00:00
David E. O'Brien
dbbf32dd39 Enlist the FreeBSD-CURRENT users as testers of what is to become Binutils
version 2.12.0.  These bits are taken from the FSF anoncvs repo on
27-January-2002 03:41 PST.
2002-01-27 12:00:11 +00:00
David E. O'Brien
e85f989710 This commit was generated by cvs2svn to compensate for changes in r89857,
which included commits to RCS files with non-trunk default branches.
2002-01-27 12:00:11 +00:00
David E. O'Brien
adc940bfc7 Halloween import of Binutils from the FSF 2.11 branch.
This fixes some IA-64 related bugs.
2001-11-01 09:24:29 +00:00
David E. O'Brien
71523ea656 This commit was generated by cvs2svn to compensate for changes in r85815,
which included commits to RCS files with non-trunk default branches.
2001-11-01 09:24:29 +00:00
David E. O'Brien
ca8d09641f Import the extra bits needed to target IA-64, PowerPC, and sparc64.
(this is Binutils from the FSF 2.11 branch [checked out 19-July-2001])
2001-10-13 01:47:52 +00:00
David E. O'Brien
45a7ac086f This commit was generated by cvs2svn to compensate for changes in r84865,
which included commits to RCS files with non-trunk default branches.
2001-10-13 01:47:52 +00:00
David E. O'Brien
e3bf29e1d6 Import of Binutils from the FSF 2.11 branch [checked out 19-July-2001].
This fixes an annoying `ld' bug.
2001-07-20 03:29:51 +00:00