]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commit
kvx: Improve lexing & parsing
authorPaul Iannetta <piannetta@kalrayinc.com>
Fri, 8 Sep 2023 13:22:04 +0000 (15:22 +0200)
committerPaul Iannetta <piannetta@kalrayinc.com>
Tue, 20 Feb 2024 11:07:57 +0000 (12:07 +0100)
commit512707c2e2f5b18e029b2dbdf5438338bda22ea9
treef90de745e7987fc7de4fd44d0de1747ee163f340
parent04e46d3bd9a2fff58de16af6b45f387b330bcd88
kvx: Improve lexing & parsing

Up until now, we used ENV.PROMOTE_IMMEDIATE to get the next candidates,
however this candidate can be directly extracted from the array (in
kvx-parse.h) registering all the immediates.

During lexing, we ignored trailing characters after a number, this is
not good enough since now number can be followed by a modifier.  The
function READ_TOKEN and GET_TOKEN_CLASS have been update to take this
into account.

gas/ChangeLog:

* config/kvx-parse.c (promote_token): Do not rely on
  env.promote_immediate anymore.
(get_token_class): Do not ignore trailing characters after a
number.
(read_token): Likewise.
(print_token_list): THIS SHOULD NOT BE HERE.
gas/config/kvx-parse.c