Compare commits

...

1 Commits

Author SHA1 Message Date
Tim Newsome 83a87b2ccc Fix clobbering s2 in read_memory_progbuf(increment=0)
Fixes #632.

Change-Id: Ic884823faf67749f1ac8fbd91fe67ff9ebdd8fd0
Signed-off-by: Tim Newsome <tim@sifive.com>
2021-07-22 11:44:38 -07:00
1 changed files with 1 additions and 1 deletions

View File

@ -3457,7 +3457,7 @@ static int read_memory_progbuf(struct target *target, target_addr_t address,
return ERROR_FAIL; return ERROR_FAIL;
if (register_read(target, &s1, GDB_REGNO_S1) != ERROR_OK) if (register_read(target, &s1, GDB_REGNO_S1) != ERROR_OK)
return ERROR_FAIL; return ERROR_FAIL;
if (increment == 0 && register_read(target, &s2, GDB_REGNO_S1) != ERROR_OK) if (increment == 0 && register_read(target, &s2, GDB_REGNO_S2) != ERROR_OK)
return ERROR_FAIL; return ERROR_FAIL;
/* Write the program (load, increment) */ /* Write the program (load, increment) */