riscv-013: Correct sign extension of address on read_memory for lower bits as well
This commit is contained in:
parent
8462750357
commit
458bb20699
|
@ -1267,7 +1267,7 @@ static int read_memory(struct target *target, uint32_t address,
|
|||
case 64:
|
||||
riscv_program_write_ram(&program, r_addr + 4, (((riscv_addr_t)(address)) - size) >> 32);
|
||||
case 32:
|
||||
riscv_program_write_ram(&program, r_addr, (riscv_addr_t)(address - size));
|
||||
riscv_program_write_ram(&program, r_addr, (riscv_addr_t)(address) - size);
|
||||
break;
|
||||
default:
|
||||
LOG_ERROR("unknown XLEN %d", riscv_xlen(target));
|
||||
|
|
Loading…
Reference in New Issue