aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorTim Newsome <tim@sifive.com>2017-12-11 13:07:35 -0800
committerGitHub <noreply@github.com>2017-12-11 13:07:35 -0800
commit20236ca8170e2e833f4fe5b0219d64c8562d9ffe (patch)
tree4bf28e8c180bdbf835c0d920267e5df82dae5945 /src
parente50ee46a6ff414b1af4f51290a92607295f693ff (diff)
parent0a65a6527d2f0cf1dbd4cbee41924a27cc56bd53 (diff)
downloadriscv-openocd-20236ca8170e2e833f4fe5b0219d64c8562d9ffe.zip
riscv-openocd-20236ca8170e2e833f4fe5b0219d64c8562d9ffe.tar.gz
riscv-openocd-20236ca8170e2e833f4fe5b0219d64c8562d9ffe.tar.bz2
Merge pull request #143 from riscv/fmv
Fix build.
Diffstat (limited to 'src')
-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);