diff options
author | Tsukasa OI <research_trasio@irq.a4lg.com> | 2022-02-23 10:47:22 +0900 |
---|---|---|
committer | Nelson Chu <nelson.chu@sifive.com> | 2022-02-25 17:05:01 +0800 |
commit | 0f94906fba909f75cb00402caad8e37be92f9c6f (patch) | |
tree | f65b80ab255729e647f30d9a9f426d3119a775a1 /bfd/elfxx-riscv.c | |
parent | 9a9dfb6880e3b093922e3db0cd760ebbce21fe06 (diff) | |
download | gdb-0f94906fba909f75cb00402caad8e37be92f9c6f.zip gdb-0f94906fba909f75cb00402caad8e37be92f9c6f.tar.gz gdb-0f94906fba909f75cb00402caad8e37be92f9c6f.tar.bz2 |
RISC-V: Remove a loop in the ISA parser
Since commit e601909a3287bf541c6a7d82214bb387d2c76d82 ("RISC-V: Support
to parse the multi-letter prefix in the architecture string.") changed
so that all prefixed extensions are parsed in single
riscv_parse_prefixed_ext call, a "while" loop on riscv_parse_subset
is no longer required.
bfd/ChangeLog:
* elfxx-riscv.c (riscv_parse_subset): Remove unnecessary loop.
Diffstat (limited to 'bfd/elfxx-riscv.c')
-rw-r--r-- | bfd/elfxx-riscv.c | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/bfd/elfxx-riscv.c b/bfd/elfxx-riscv.c index d74e7a5..2915b74 100644 --- a/bfd/elfxx-riscv.c +++ b/bfd/elfxx-riscv.c @@ -2019,14 +2019,11 @@ riscv_parse_subset (riscv_parse_subset_t *rps, if (p == NULL) return false; - /* Parse the different classes of extensions in the specified order. */ - while (*p != '\0') - { - p = riscv_parse_prefixed_ext (rps, arch, p); + /* Parse prefixed extensions. */ + p = riscv_parse_prefixed_ext (rps, arch, p); - if (p == NULL) - return false; - } + if (p == NULL) + return false; /* Finally add implicit extensions according to the current extensions. */ |