Nelson Chu 19b58b2658 RISC-V/SiFive: Added SiFive custom cache control instructions.
According to the chapter 10 of the following U74-MC manual,
https://sifive.cdn.prismic.io/sifive/6d9a2510-2632-44f3-adb9-d0430f139372_sifive_coreip_U74MC_AXI4_rtl_v19_08p2p0_release_manual.pdf

and the implementations of freedom-metal,
https://github.com/sifive/freedom-metal/blob/v201908-branch/src/cache.c

* Encodings,
31-25   24-20 19-15 14-12  11-7  6-0
FUNCT7  RS2   RS1   FUNCT3 RD    OPCODE
1111110 00000 xxxxx 000    00000 1110011 CFLUSH.D.L1
1111110 00010 xxxxx 000    00000 1110011 CDISCARD.D.L1
1111110 00001 00000 000    00000 1110011 CFLUSH.I.L1

* Extension names,
xsfcflushdlone:   CFLUSH.D.L1.
xsfcdiscarddlone: CDISCARD.D.L1.
xsfcflushilone:   CFLUSH.I.L1.

* Vendor target triples,
For assembler, the target vendor is defined as TARGET_VENDOR in the
gas/config.h, but I don't see any related settings in bfd/config.h
and opcode/config.  Since we may have vendor relocations in the future,
and these relocation numbers may repeat, I add a new RISCV_TARGET_VENDOR
in the bfd/config.h for riscv.  The vendor name will be stored in the
bfd/cpu-riscv.c, so that all tools (gas, bfd, opcode, ...) can get
the vendor name from the configure setting.

If the --with-arch configure option, -march gas option and elf architecture
attributes are not set, then we will generate the default ISA string
according to the chosen target vendor.  For example, if you build the
binutils with the configure option, --target=riscv64-sifive-elf, then
the assembler will find the whole supported extension tables in the
bfd/elfxx-riscv.c, and generate the suitable ISA string.

bfd/
	* configure.ac (RISCV_TARGET_VENDOR): Defined to store target_vendor,
	only when the target is riscv*.
	* config.in: Regenerated.
	* configure: Regenerated.
	* cpu-riscv.c (riscv_vendor_name): Defined to RISCV_TARGET_VENDOR.
	* cpu-riscv.h (enum riscv_spec_class): Added VENDOR_SPEC_CLASS_SIFIVE.
	* elfxx-riscv. (EXT_SIFIVE): Defined to choose the default extensions
	for sifive.
	(riscv_supported_vendor_sifive_ext): Added extensions for sifive cache
	control instructions.
	(riscv_supported_std_ext, riscv_all_supported_ext): Updated.
	(riscv_get_default_ext_version): Updated.
	(riscv_set_default_arch): Updated.
gas/
	* config/tc-riscv.c (VENDOR_SIFIVE_EXT): Added.
	(riscv_extended_subset_supports): Handle INSN_CLASS_XSF*.
	(op_vendor_sifive_hash): Added to store sifive opcodes.
	(md_begin): Init the op_vendor_sifive_hash.
	(riscv_find_extended_opcode_hash): Find the opcodes from
	op_vendor_sifive_hash.
	* testsuite/gas/riscv/extended/sifive-insns.d: New testcase.
	* testsuite/gas/riscv/extended/sifive-insns.s: Likewise.
include/
	* opcode/riscv-opc-extended.h: Added opcodes for sifive cache
	instructions.
	* opcode/riscv.h (enum riscv_extended_insn_class): Added INSN_CLASS_XSF*.
opcodes/
	* riscv-opc.c (riscv_vendor_sifive_opcodes): Added.
	(riscv_extended_opcodes): Updated.
2021-10-28 08:52:25 +08:00
2021-09-09 23:30:12 -04:00

		   README for GNU development tools

This directory contains various GNU compilers, assemblers, linkers, 
debuggers, etc., plus their support routines, definitions, and documentation.

If you are receiving this as part of a GDB release, see the file gdb/README.
If with a binutils release, see binutils/README;  if with a libg++ release,
see libg++/README, etc.  That'll give you info about this
package -- supported targets, how to use it, how to report bugs, etc.

It is now possible to automatically configure and build a variety of
tools with one command.  To build all of the tools contained herein,
run the ``configure'' script here, e.g.:

	./configure 
	make

To install them (by default in /usr/local/bin, /usr/local/lib, etc),
then do:
	make install

(If the configure script can't determine your type of computer, give it
the name as an argument, for instance ``./configure sun4''.  You can
use the script ``config.sub'' to test whether a name is recognized; if
it is, config.sub translates it to a triplet specifying CPU, vendor,
and OS.)

If you have more than one compiler on your system, it is often best to
explicitly set CC in the environment before running configure, and to
also set CC when running make.  For example (assuming sh/bash/ksh):

	CC=gcc ./configure
	make

A similar example using csh:

	setenv CC gcc
	./configure
	make

Much of the code and documentation enclosed is copyright by
the Free Software Foundation, Inc.  See the file COPYING or
COPYING.LIB in the various directories, for a description of the
GNU General Public License terms under which you can copy the files.

REPORTING BUGS: Again, see gdb/README, binutils/README, etc., for info
on where and how to report problems.
Description
Unofficial mirror of sourceware binutils-gdb repository. Updated daily.
Readme 897 MiB
Languages
C 50.6%
Makefile 22.6%
Assembly 13.2%
C++ 5.9%
Roff 1.5%
Other 5.6%