mirror of
https://sourceware.org/git/binutils-gdb.git
synced 2025-02-11 13:02:10 +08:00
According to the riscv privilege spec, some CSR are only valid when rv32 or the specific extension is set. We extend the DECLARE_CSR and DECLARE_CSR_ALIAS to record more informaton we need, and then check whether the CSR is valid according to these information. We report warning message when the CSR is invalid, so we have a choice between error and warning by --fatal-warnings option. Also, a --no-warn/-W option is used to turn the warnings off, if people don't want the warnings. gas/ * config/tc-riscv.c (enum riscv_csr_class): New enum. Used to decide whether or not this CSR is legal in the current ISA string. (struct riscv_csr_extra): New structure to hold all extra information of CSR. (riscv_init_csr_hash): New function. According to the DECLARE_CSR and DECLARE_CSR_ALIAS, insert CSR extra information into csr_extra_hash. Call hash_reg_name to insert CSR address into reg_names_hash. (md_begin): Call riscv_init_csr_hashes for each DECLARE_CSR. (reg_csr_lookup_internal, riscv_csr_class_check): New functions. Decide whether the CSR is valid according to the csr_extra_hash. (init_opcode_hash): Update 'if (hash_error != NULL)' as hash_error is not a boolean. This is same as riscv_init_csr_hash, so keep the consistent usage. * testsuite/gas/riscv/csr-dw-regnums.d: Add -march=rv32if option. * testsuite/gas/riscv/priv-reg.d: Add f-ext by -march option. * testsuite/gas/riscv/priv-reg-fail-fext.d: New testcase. The source file is `priv-reg.s`, and the ISA is rv32i without f-ext, so the f-ext CSR are not allowed. * testsuite/gas/riscv/priv-reg-fail-fext.l: Likewise. * testsuite/gas/riscv/priv-reg-fail-rv32-only.d: New testcase. The source file is `priv-reg.s`, and the ISA is rv64if, so the rv32-only CSR are not allowed. * testsuite/gas/riscv/priv-reg-fail-rv32-only.l: Likewise. include/ * opcode/riscv-opc.h: Extend DECLARE_CSR and DECLARE_CSR_ALIAS to record riscv_csr_class. opcodes/ * riscv-dis.c (print_insn_args): Updated since the DECLARE_CSR is changed. gdb/ * riscv-tdep.c: Updated since the DECLARE_CSR is changed. * riscv-tdep.h: Likewise. * features/riscv/rebuild-csr-xml.sh: Generate the 64bit-csr.xml without rv32-only CSR. * features/riscv/64bit-csr.xml: Regernated. binutils/ * dwarf.c: Updated since the DECLARE_CSR is changed.
139 lines
3.9 KiB
Plaintext
139 lines
3.9 KiB
Plaintext
2020-02-20 Nelson Chu <nelson.chu@sifive.com>
|
||
|
||
* opcode/riscv-opc.h: Extend DECLARE_CSR and DECLARE_CSR_ALIAS to
|
||
record riscv_csr_class.
|
||
|
||
2020-02-10 Stam Markianos-Wright <stam.markianos-wright@arm.com>
|
||
Matthew Malcomson <matthew.malcomson@arm.com>
|
||
|
||
* opcode/arm.h (ARM_EXT2_CDE): New extension macro.
|
||
(ARM_EXT2_CDE0): New extension macro.
|
||
(ARM_EXT2_CDE1): New extension macro.
|
||
(ARM_EXT2_CDE2): New extension macro.
|
||
(ARM_EXT2_CDE3): New extension macro.
|
||
(ARM_EXT2_CDE4): New extension macro.
|
||
(ARM_EXT2_CDE5): New extension macro.
|
||
(ARM_EXT2_CDE6): New extension macro.
|
||
(ARM_EXT2_CDE7): New extension macro.
|
||
|
||
2020-02-07 Sergey Belyashov <sergey.belyashov@gmail.com>
|
||
|
||
PR 25469
|
||
* coff/internal.h (R_IMM16BE): Define.
|
||
* elf/z80.h (EF_Z80_MACH_Z80N): Define.
|
||
(R_Z80_16_BE): New reloc.
|
||
|
||
2020-02-04 Alan Modra <amodra@gmail.com>
|
||
|
||
* opcode/d30v.h (struct pd_reg): Make value field unsigned.
|
||
|
||
2020-01-16 Jon Turney <jon.turney@dronecode.org.uk>
|
||
|
||
* coff/internal.h (PE_IMAGE_DEBUG_TYPE_VC_FEATURE)
|
||
(PE_IMAGE_DEBUG_TYPE_POGO, PE_IMAGE_DEBUG_TYPE_ILTCG)
|
||
(PE_IMAGE_DEBUG_TYPE_MPX, PE_IMAGE_DEBUG_TYPE_REPRO): Add.
|
||
|
||
2020-01-18 Nick Clifton <nickc@redhat.com>
|
||
|
||
Binutils 2.34 branch created.
|
||
|
||
2020-01-17 Nick Clifton <nickc@redhat.com>
|
||
|
||
* Import from gcc mainline:
|
||
2019-06-10 Martin Liska <mliska@suse.cz>
|
||
|
||
* ansidecl.h (ATTRIBUTE_WARN_UNUSED_RESULT): New macro.
|
||
* libiberty.h (xmalloc): Use it.
|
||
(xrealloc): Likewise.
|
||
(xcalloc): Likewise.
|
||
(xstrdup): Likewise.
|
||
(xstrndup): Likewise.
|
||
(xmemdup): Likewise.
|
||
|
||
2019-06-10 Martin Liska <mliska@suse.cz>
|
||
|
||
* ansidecl.h:
|
||
(ATTRIBUTE_RESULT_SIZE_1): Define new macro.
|
||
(ATTRIBUTE_RESULT_SIZE_2): Likewise.
|
||
(ATTRIBUTE_RESULT_SIZE_1_2): Likewise.
|
||
* libiberty.h (xmalloc): Add RESULT_SIZE attribute.
|
||
(xrealloc): Likewise.
|
||
(xcalloc): Likewise.
|
||
|
||
2019-11-16 Tim Ruehsen <tim.ruehsen@gmx.de>
|
||
|
||
* demangle.h (struct demangle_component): Add member
|
||
d_counting.
|
||
|
||
2019-11-16 Eduard-Mihai Burtescu <eddyb@lyken.rs>
|
||
|
||
* demangle.h (rust_demangle_callback): Add.
|
||
|
||
2019-07-18 Eduard-Mihai Burtescu <eddyb@lyken.rs>
|
||
|
||
* demangle.h (rust_is_mangled): Move to libiberty/rust-demangle.h.
|
||
(rust_demangle_sym): Move to libiberty/rust-demangle.h.
|
||
|
||
2020-01-16 Andre Vieira <andre.simoesdiasvieira@arm.com>
|
||
|
||
PR 25376
|
||
* opcodes/arm.h (FPU_MVE, FPU_MVE_FPU): Move these features to...
|
||
(ARM_EXT2_MVE, ARM_EXT2_MVE_FP): ... the CORE_HIGH space.
|
||
(ARM_ANY): Redefine to not include any MVE bits.
|
||
(ARM_FEATURE_ALL): Removed.
|
||
|
||
2020-01-15 Jozef Lawrynowicz <jozef.l@mittosystems.com>
|
||
|
||
* opcode/msp430.h (enum msp430_expp_e): New.
|
||
(struct msp430_operand_s): Add expp member to struct.
|
||
|
||
2020-01-13 Claudiu Zissulescu <claziss@gmail.com>
|
||
|
||
* elf/arc-cpu.def: Update ARC cpu list.
|
||
|
||
2020-01-13 Alan Modra <amodra@gmail.com>
|
||
|
||
* opcode/tic4x.h (EXTR): Delete.
|
||
(EXTRU, EXTRS, INSERTU, INSERTS): Rewrite without zero/sign
|
||
extension using shifts. Do trim INSERTU value to specified bitfield.
|
||
|
||
2020-01-10 Alan Modra <amodra@gmail.com>
|
||
|
||
* opcode/spu.h: Formatting.
|
||
(UNSIGNED_EXTRACT): Use 1u.
|
||
(SIGNED_EXTRACT): Don't sign extend with shifts.
|
||
(DECODE_INSN_I9a, DECODE_INSN_I9b): Avoid left shift of signed value.
|
||
Keep result signed.
|
||
(DECODE_INSN_U9a, DECODE_INSN_U9b): Delete.
|
||
|
||
2020-01-07 Shahab Vahedi <shahab@synopsys.com>
|
||
|
||
* opcode/arc.h (insn_class_t): Add 'LLOCK' and 'SCOND'.
|
||
|
||
2020-01-02 Sergey Belyashov <sergey.belyashov@gmail.com>
|
||
|
||
* coff/internal.h: Add defintions of Z80 reloc names.
|
||
|
||
2020-01-02 Christian Biesinger <cbiesinger@google.com>
|
||
|
||
* opcode/s12z.h: Undef REG_Y.
|
||
|
||
2020-01-01 Alan Modra <amodra@gmail.com>
|
||
|
||
Update year range in copyright notice of all files.
|
||
|
||
For older changes see ChangeLog-2019
|
||
|
||
Copyright (C) 2020 Free Software Foundation, Inc.
|
||
|
||
Copying and distribution of this file, with or without modification,
|
||
are permitted in any medium without royalty provided the copyright
|
||
notice and this notice are preserved.
|
||
|
||
Local Variables:
|
||
mode: change-log
|
||
left-margin: 8
|
||
fill-column: 74
|
||
version-control: never
|
||
End:
|