diff options
author | Pierre Langlois <pierre.langlois@arm.com> | 2015-09-11 16:47:20 +0100 |
---|---|---|
committer | Pierre Langlois <pierre.langlois@arm.com> | 2015-09-11 16:47:20 +0100 |
commit | 4d50586db70d366d7d9eaf42062bf23bb6073695 (patch) | |
tree | f4c04e7302df6167c89a6f5682fdcaea77adfe66 /gdb | |
parent | 6dcaef99fab7e59e3eeb16a95d4c29b7b499b408 (diff) | |
download | gdb-4d50586db70d366d7d9eaf42062bf23bb6073695.zip gdb-4d50586db70d366d7d9eaf42062bf23bb6073695.tar.gz gdb-4d50586db70d366d7d9eaf42062bf23bb6073695.tar.bz2 |
[AArch64] Fix incorrect mask when decoding b.cond instruction
The encoding of the b.cond instruction is described in the architecture
reference manual as:
b.cond 0101 0100 iiii iiii iiii iiii iii0 cccc
So the mask should be 0xff000010.
gdb/ChangeLog:
* aarch64-tdep.c (decode_bcond): Fix incorrect mask.
Diffstat (limited to 'gdb')
-rw-r--r-- | gdb/ChangeLog | 4 | ||||
-rw-r--r-- | gdb/aarch64-tdep.c | 3 |
2 files changed, 6 insertions, 1 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 705b7eb..0942986 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,7 @@ +2015-09-11 Pierre Langlois <pierre.langlois@arm.com> + + * aarch64-tdep.c (decode_bcond): Fix incorrect mask. + 2015-09-11 Mihail-Marian Nistor <mihail.nistor@freescale.com> PR gdb/18947 diff --git a/gdb/aarch64-tdep.c b/gdb/aarch64-tdep.c index 9a44446..a4d8186 100644 --- a/gdb/aarch64-tdep.c +++ b/gdb/aarch64-tdep.c @@ -339,7 +339,8 @@ decode_b (CORE_ADDR addr, uint32_t insn, int *is_bl, int32_t *offset) static int decode_bcond (CORE_ADDR addr, uint32_t insn, unsigned *cond, int32_t *offset) { - if (decode_masked_match (insn, 0xfe000000, 0x54000000)) + /* b.cond 0101 0100 iiii iiii iiii iiii iii0 cccc */ + if (decode_masked_match (insn, 0xff000010, 0x54000000)) { *cond = (insn >> 0) & 0xf; *offset = extract_signed_bitfield (insn, 19, 5) << 2; |