]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commit
gdb: fix size of z80 "add ii,rr" and "ld (ii+d),n" instructions
authorAaron Griffith <aargri@gmail.com>
Mon, 9 Jun 2025 19:19:41 +0000 (15:19 -0400)
committerTom Tromey <tromey@adacore.com>
Wed, 11 Jun 2025 19:36:45 +0000 (13:36 -0600)
commit5d3355989230b25a617461641e607e0a38344830
treeff32f449f7c1909ef568020ae24121e087e8193b
parent3729db958391969afe8631535af637e0e577aefb
gdb: fix size of z80 "add ii,rr" and "ld (ii+d),n" instructions

The tables in z80-tdep.c previously either gave these instructions the
wrong size, or failed to recognize them by using the wrong masks, or
both. The fixed instructions alongside their representation in octal are:

* add ii,rr:   [0335] 00r1 (where r & 1 == 1)
               [0375] 00r1
* ld (ii+d,n): [0335] 0066 <d> <n>
               [0375] 0066 <d> <n>

Prefix bytes inside [] do not count towards instruction length in
these tables.

Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=33066
Approved-By: Tom Tromey <tom@tromey.com>
gdb/z80-tdep.c