aboutsummaryrefslogtreecommitdiff
path: root/sim/m32c
diff options
context:
space:
mode:
authorNelson Chu <nelson.chu@sifive.com>2021-05-13 11:48:26 +0800
committerNelson Chu <nelson.chu@sifive.com>2021-05-13 15:21:38 +0800
commit7671eff8f08de314d8c9837225eba95ed5ea053b (patch)
tree4bfdac07f53e9d347866344421f5a85c2e7d8e6e /sim/m32c
parentcf893b0ef7482ec11df3787772f35e820ef2592a (diff)
downloadbinutils-7671eff8f08de314d8c9837225eba95ed5ea053b.zip
binutils-7671eff8f08de314d8c9837225eba95ed5ea053b.tar.gz
binutils-7671eff8f08de314d8c9837225eba95ed5ea053b.tar.bz2
RISC-V: Record implicit subsets in a table, to avoid repeated codes.
Add a new table, riscv_implicit_subsets, to record all implicit information. So that we add all implicit subsets according to the table, to avoid too many repeated codes in the riscv_parse_add_implicit_subsets. Besides, the check_func is used to check whether we should add this implicit subset. For example, check_implicit_for_i checks the version of i, and we only add zicsr and zifencei implicitly only when the version less than 2.1. bfd/ * elfxx-riscv.c (check_implicit_always): The check_func, always add the implicit subset without checking. (check_implicit_for_i): The check_func for i, only add zicsr and zifencei when the version of i less than 2.1. (struct riscv_implicit_subset): Record the subsets and their corresponding implicit subsets. (riscv_implicit_subsets): Table records all implicit informations. (riscv_parse_add_implicit_subsets): Updated and add implicit subsets according to riscv_implicit_subsets. Remove the redundant codes.
Diffstat (limited to 'sim/m32c')
0 files changed, 0 insertions, 0 deletions