aboutsummaryrefslogtreecommitdiff
path: root/gdb/riscv-tdep.c
diff options
context:
space:
mode:
authorChungyi Chi <demonic@csie.io>2020-09-17 09:45:50 +0100
committerAndrew Burgess <andrew.burgess@embecosm.com>2020-09-17 09:45:50 +0100
commitd2cd411356b0e6de58e502bf65c1683811b69af6 (patch)
treecbcf679a7a9a99eb0b753d18d78f8eb8d15e0f0a /gdb/riscv-tdep.c
parent848471acef1d11dcc3361b79e5bda69d4700fdf1 (diff)
downloadgdb-d2cd411356b0e6de58e502bf65c1683811b69af6.zip
gdb-d2cd411356b0e6de58e502bf65c1683811b69af6.tar.gz
gdb-d2cd411356b0e6de58e502bf65c1683811b69af6.tar.bz2
gdb/riscv: fix decode of c.sdsp instruction
The decode of c.sdsp was incorrectly claiming to be a 4-byte store instead of an 8-byte store. gdb/ChangeLog: * riscv-tdep.c (riscv-insn::decode): Fix recorded insn type.
Diffstat (limited to 'gdb/riscv-tdep.c')
-rw-r--r--gdb/riscv-tdep.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/gdb/riscv-tdep.c b/gdb/riscv-tdep.c
index a7c2564..ac4ac1b 100644
--- a/gdb/riscv-tdep.c
+++ b/gdb/riscv-tdep.c
@@ -1472,7 +1472,7 @@ riscv_insn::decode (struct gdbarch *gdbarch, CORE_ADDR pc)
else if (is_c_swsp_insn (ival))
decode_css_type_insn (SW, ival, EXTRACT_RVC_SWSP_IMM (ival));
else if (xlen != 4 && is_c_sdsp_insn (ival))
- decode_css_type_insn (SW, ival, EXTRACT_RVC_SDSP_IMM (ival));
+ decode_css_type_insn (SD, ival, EXTRACT_RVC_SDSP_IMM (ival));
/* C_JR and C_MV have the same opcode. If RS2 is 0, then this is a C_JR.
So must try to match C_JR first as it ahs more bits in mask. */
else if (is_c_jr_insn (ival))