binutils-gdb/include
Jiawei 9132c8152b RISC-V: Support Zcmp push/pop instructions.
Support zcmp extension push/pop/popret and popret zero instructions.
The `reg_list' is a list containing 1 to 13 registers, we can use:
"{ra}, {ra, s0}, {ra, s0-s1}, {ra, s0-s2} ... {ra, s0-sN}"
to present this feature.

Passed gcc/binutils regressions of riscv-gnu-toolchain.

Most of work was finished by Sinan Lin.
Co-Authored by: Charlie Keaney <charlie.keaney@embecosm.com>
Co-Authored by: Mary Bennett <mary.bennett@embecosm.com>
Co-Authored by: Nandni Jamnadas <nandni.jamnadas@embecosm.com>
Co-Authored by: Sinan Lin <sinan.lin@linux.alibaba.com>
Co-Authored by: Simon Cook <simon.cook@embecosm.com>
Co-Authored by: Shihua Liao <shihua@iscas.ac.cn>
Co-Authored by: Yulong Shi <yulong@iscas.ac.cn>

bfd/ChangeLog:

        * elfxx-riscv.c (riscv_implicit_subset): Imply zca for zcmp.
	(riscv_supported_std_z_ext): Added zcmp with version 1.0.
	(riscv_parse_check_conflicts): Zcmp conflicts with d/zcd.
        (riscv_multi_subset_supports): Handle zcmp.
        (riscv_multi_subset_supports_ext): Ditto.

gas/ChangeLog:

	* NEWS: Updated.
        * config/tc-riscv.c (regno_to_reg_list): New function, used to map
	register to reg_list number.
        (reglist_lookup): Called reglist_lookup_internal.  Return false if
	reg_list number is zero, which is an invalid value.
	(reglist_lookup_internal): Parse register list, and return the last
	register by regno_to_reg_list.
        (validate_riscv_insn):  New operators.
        (riscv_ip): Ditto.
	* testsuite/gas/riscv/march-help.l: Updated.
        * testsuite/gas/riscv/zcmp-push-pop-fail.d: New test.
        * testsuite/gas/riscv/zcmp-push-pop-fail.l: New test.
        * testsuite/gas/riscv/zcmp-push-pop-fail.s: New test.
        * testsuite/gas/riscv/zcmp-push-pop.d: New test.
        * testsuite/gas/riscv/zcmp-push-pop.s: New test.

include/ChangeLog:

        * opcode/riscv-opc.h (MATCH/MASK_CM_PUSH): New macros for zcmp.
        (MATCH/MASK_CM_POP): Ditto.
        (MATCH/MASK_CM_POPRET): Ditto.
        (MATCH/MASK_CM_POPRETZ): Ditto.
        (DECLARE_INSN): New declarations for zcmp.
        * opcode/riscv.h (EXTRACT/ENCODE/VALID_ZCMP_SPIMM): Handle spimm
	operand for zcmp.
        (OP_MASK_REG_LIST): Handle operand for zcmp register list.
        (OP_SH_REG_LIST): Ditto.
        (ZCMP_SP_ALIGNMENT): New argument, used in riscv_get_sp_base.
        (X_S0, X_S1, X_S2, X_S10, X_S11): New register numbers.
        (enum riscv_insn_class): Added INSN_CLASS_ZCMP.
        (extern riscv_get_sp_base): Added.

opcodes/ChangeLog:

        * riscv-dis.c (print_reg_list): New function, used to get zcmp
	reg_list field.
        (riscv_get_spimm): New function, used to get zcmp sp adjustment
	immediate.
        (print_insn_args): Handle new operands for zcmp.
        * riscv-opc.c (riscv_get_sp_base): New function, used by gas and
	objdump.  Get sp base adjustment.
	(riscv_opcodes): Added zcmp instructions.
2024-04-09 15:56:12 +08:00
..
aout Update year range in copyright notice of binutils files 2024-01-04 22:58:12 +10:30
cgen Update year range in copyright notice of binutils files 2024-01-04 22:58:12 +10:30
coff riscv64-pei uninitialised data writing relocs 2024-01-25 08:41:14 +10:30
elf RISC-V: Add TLSDESC reloc definitions. 2024-02-29 15:02:49 +08:00
gdb Update year range in copyright notice of binutils files 2024-01-04 22:58:12 +10:30
mach-o Update year range in copyright notice of binutils files 2024-01-04 22:58:12 +10:30
opcode RISC-V: Support Zcmp push/pop instructions. 2024-04-09 15:56:12 +08:00
sim sim: Fix -Werror=shadow=local by changing mem to addr in sim_{read,write} 2024-01-22 14:22:30 +01:00
som Update year range in copyright notice of binutils files 2024-01-04 22:58:12 +10:30
vms Update year range in copyright notice of binutils files 2024-01-04 22:58:12 +10:30
alloca-conf.h Update year range in copyright notice of binutils files 2024-01-04 22:58:12 +10:30
ansidecl.h Update year range in copyright notice of binutils files 2024-01-04 22:58:12 +10:30
bfdlink.h Update year range in copyright notice of binutils files 2024-01-04 22:58:12 +10:30
binary-io.h Update year range in copyright notice of binutils files 2024-01-04 22:58:12 +10:30
bout.h Update year range in copyright notice of binutils files 2024-01-04 22:58:12 +10:30
ChangeLog gdb: ignore -Wregister instead of -Wdeprecated-register 2024-04-07 22:57:39 -04:00
ChangeLog-0415 binutils ChangeLog rotation 2016-01-01 22:59:17 +10:30
ChangeLog-2016 ChangeLog rotation 2017-01-02 13:55:05 +10:30
ChangeLog-2017 ChangeLog rotation 2018-01-03 17:49:42 +10:30
ChangeLog-2018 ChangeLog rotation 2019-01-01 21:25:40 +10:30
ChangeLog-2019 ChangeLog rotation 2020-01-01 18:12:08 +10:30
ChangeLog-2020 ChangeLog rotation 2021-01-01 10:31:02 +10:30
ChangeLog-9103 Add copyright notices 2012-12-10 12:48:03 +00:00
collectorAPI.h Update year range in copyright notice of binutils files 2024-01-04 22:58:12 +10:30
COPYING
COPYING3
ctf-api.h Update year range in copyright notice of binutils files 2024-01-04 22:58:12 +10:30
ctf.h Update year range in copyright notice of binutils files 2024-01-04 22:58:12 +10:30
demangle.h Import gcc commit 65388b28656d65595bdaf191df85af81c35ca63 which adds support for explicit object member function mangling. 2024-01-17 12:06:48 +00:00
diagnostics.h gdb: ignore -Wregister instead of -Wdeprecated-register 2024-04-07 22:57:39 -04:00
dis-asm.h Update year range in copyright notice of binutils files 2024-01-04 22:58:12 +10:30
dwarf2.def Update year range in copyright notice of binutils files 2024-01-04 22:58:12 +10:30
dwarf2.h Update year range in copyright notice of binutils files 2024-01-04 22:58:12 +10:30
dyn-string.h Update year range in copyright notice of binutils files 2024-01-04 22:58:12 +10:30
environ.h Update year range in copyright notice of binutils files 2024-01-04 22:58:12 +10:30
fibheap.h Update year range in copyright notice of binutils files 2024-01-04 22:58:12 +10:30
filenames.h Update year range in copyright notice of binutils files 2024-01-04 22:58:12 +10:30
floatformat.h Update year range in copyright notice of binutils files 2024-01-04 22:58:12 +10:30
fnmatch.h Update year range in copyright notice of binutils files 2024-01-04 22:58:12 +10:30
fopen-bin.h Update year range in copyright notice of binutils files 2024-01-04 22:58:12 +10:30
fopen-same.h Update year range in copyright notice of binutils files 2024-01-04 22:58:12 +10:30
fopen-vms.h Update year range in copyright notice of binutils files 2024-01-04 22:58:12 +10:30
gcc-c-fe.def Synchronize GCC compile plugin headers 2024-02-29 15:34:38 -07:00
gcc-c-interface.h Synchronize GCC compile plugin headers 2024-02-29 15:34:38 -07:00
gcc-cp-fe.def Update year range in copyright notice of binutils files 2024-01-04 22:58:12 +10:30
gcc-cp-interface.h Synchronize GCC compile plugin headers 2024-02-29 15:34:38 -07:00
gcc-interface.h Update year range in copyright notice of binutils files 2024-01-04 22:58:12 +10:30
getopt.h Update year range in copyright notice of binutils files 2024-01-04 22:58:12 +10:30
hashtab.h Update year range in copyright notice of binutils files 2024-01-04 22:58:12 +10:30
hp-symtab.h Update year range in copyright notice of binutils files 2024-01-04 22:58:12 +10:30
leb128.h Update year range in copyright notice of binutils files 2024-01-04 22:58:12 +10:30
libcollector.h Update year range in copyright notice of binutils files 2024-01-04 22:58:12 +10:30
libfcollector.h Update year range in copyright notice of binutils files 2024-01-04 22:58:12 +10:30
libiberty.h Update year range in copyright notice of binutils files 2024-01-04 22:58:12 +10:30
longlong.h Update year range in copyright notice of binutils files 2024-01-04 22:58:12 +10:30
lto-symtab.h Update year range in copyright notice of binutils files 2024-01-04 22:58:12 +10:30
MAINTAINERS Update year range in copyright notice of binutils files 2024-01-04 22:58:12 +10:30
md5.h Update year range in copyright notice of binutils files 2024-01-04 22:58:12 +10:30
oasys.h Update year range in copyright notice of binutils files 2024-01-04 22:58:12 +10:30
objalloc.h Update year range in copyright notice of binutils files 2024-01-04 22:58:12 +10:30
obstack.h Update year range in copyright notice of binutils files 2024-01-04 22:58:12 +10:30
os9k.h Update year range in copyright notice of binutils files 2024-01-04 22:58:12 +10:30
partition.h Update year range in copyright notice of binutils files 2024-01-04 22:58:12 +10:30
plugin-api.h Update year range in copyright notice of binutils files 2024-01-04 22:58:12 +10:30
safe-ctype.h Update year range in copyright notice of binutils files 2024-01-04 22:58:12 +10:30
sframe-api.h Update year range in copyright notice of binutils files 2024-01-04 22:58:12 +10:30
sframe.h Update year range in copyright notice of binutils files 2024-01-04 22:58:12 +10:30
sha1.h Update year range in copyright notice of binutils files 2024-01-04 22:58:12 +10:30
simple-object.h Update year range in copyright notice of binutils files 2024-01-04 22:58:12 +10:30
sort.h Update year range in copyright notice of binutils files 2024-01-04 22:58:12 +10:30
splay-tree.h Update year range in copyright notice of binutils files 2024-01-04 22:58:12 +10:30
symcat.h Update year range in copyright notice of binutils files 2024-01-04 22:58:12 +10:30
timeval-utils.h Update year range in copyright notice of binutils files 2024-01-04 22:58:12 +10:30
vtv-change-permission.h Update year range in copyright notice of binutils files 2024-01-04 22:58:12 +10:30
xregex2.h Update year range in copyright notice of binutils files 2024-01-04 22:58:12 +10:30
xregex.h merge from gcc 2011-07-25 17:11:48 +00:00
xtensa-config.h Update year range in copyright notice of binutils files 2024-01-04 22:58:12 +10:30
xtensa-dynconfig.h Update year range in copyright notice of binutils files 2024-01-04 22:58:12 +10:30
xtensa-isa-internal.h Update year range in copyright notice of binutils files 2024-01-04 22:58:12 +10:30
xtensa-isa.h Update year range in copyright notice of binutils files 2024-01-04 22:58:12 +10:30