aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTim Newsome <tim@sifive.com>2017-12-11 12:58:20 -0800
committerTim Newsome <tim@sifive.com>2017-12-11 12:58:20 -0800
commit0a65a6527d2f0cf1dbd4cbee41924a27cc56bd53 (patch)
tree4bf28e8c180bdbf835c0d920267e5df82dae5945
parente50ee46a6ff414b1af4f51290a92607295f693ff (diff)
downloadriscv-openocd-0a65a6527d2f0cf1dbd4cbee41924a27cc56bd53.zip
riscv-openocd-0a65a6527d2f0cf1dbd4cbee41924a27cc56bd53.tar.gz
riscv-openocd-0a65a6527d2f0cf1dbd4cbee41924a27cc56bd53.tar.bz2
Fix build.
Change-Id: I4e3a36fac77fefa271ae9facbaa990fa330501ae
-rw-r--r--src/target/riscv/riscv-013.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/target/riscv/riscv-013.c b/src/target/riscv/riscv-013.c
index 1768b62..1f3bb74 100644
--- a/src/target/riscv/riscv-013.c
+++ b/src/target/riscv/riscv-013.c
@@ -994,7 +994,7 @@ static int register_write_direct(struct target *target, unsigned number,
if (supports_extension(target, 'D')) {
riscv_program_insert(&program, fmv_d_x(number - GDB_REGNO_FPR0, S0));
} else {
- riscv_program_insert(&program, fmv_s_x(number - GDB_REGNO_FPR0, S0));
+ riscv_program_insert(&program, fmv_w_x(number - GDB_REGNO_FPR0, S0));
}
} else if (number >= GDB_REGNO_CSR0 && number <= GDB_REGNO_CSR4095) {
riscv_program_csrw(&program, S0, number);
@@ -1054,7 +1054,7 @@ static int register_read_direct(struct target *target, uint64_t *value, uint32_t
} else if (supports_extension(target, 'D')) {
riscv_program_insert(&program, fmv_x_d(S0, number - GDB_REGNO_FPR0));
} else {
- riscv_program_insert(&program, fmv_x_s(S0, number - GDB_REGNO_FPR0));
+ riscv_program_insert(&program, fmv_x_w(S0, number - GDB_REGNO_FPR0));
}
} else if (number >= GDB_REGNO_CSR0 && number <= GDB_REGNO_CSR4095) {
riscv_program_csrr(&program, S0, number);