Commit 0118dc5e authored by Marc Schink's avatar Marc Schink Committed by Tomas Vanek
Browse files

target/arm_semihosting: Use 'bool' data type



Change-Id: I05245b7dc9c37ea8e0e40672070fb3e87cb7683f
Signed-off-by: default avatarMarc Schink <openocd-dev@marcschink.de>
Reviewed-on: http://openocd.zylin.com/4965


Tested-by: jenkins
Reviewed-by: default avatarAntonio Borneo <borneo.antonio@gmail.com>
parent 8be87420
......@@ -94,12 +94,12 @@ static int post_result(struct target *target)
/* return value in R0 */
buf_set_u32(arm->core_cache->reg_list[0].value, 0, 32, target->semihosting->result);
arm->core_cache->reg_list[0].dirty = 1;
arm->core_cache->reg_list[0].dirty = true;
/* LR --> PC */
buf_set_u32(arm->core_cache->reg_list[15].value, 0, 32,
buf_get_u32(arm_reg_current(arm, 14)->value, 0, 32));
arm->core_cache->reg_list[15].dirty = 1;
arm->core_cache->reg_list[15].dirty = true;
/* saved PSR --> current PSR */
spsr = buf_get_u32(arm->spsr->value, 0, 32);
......@@ -109,7 +109,7 @@ static int post_result(struct target *target)
*/
buf_set_u32(arm->cpsr->value, 0, 32, spsr);
arm->cpsr->dirty = 1;
arm->cpsr->dirty = true;
arm->core_mode = spsr & 0x1f;
if (spsr & 0x20)
arm->core_state = ARM_STATE_THUMB;
......@@ -118,11 +118,11 @@ static int post_result(struct target *target)
if (arm->core_state == ARM_STATE_AARCH64) {
/* return value in R0 */
buf_set_u64(arm->core_cache->reg_list[0].value, 0, 64, target->semihosting->result);
arm->core_cache->reg_list[0].dirty = 1;
arm->core_cache->reg_list[0].dirty = true;
uint64_t pc = buf_get_u64(arm->core_cache->reg_list[32].value, 0, 64);
buf_set_u64(arm->pc->value, 0, 64, pc + 4);
arm->pc->dirty = 1;
arm->pc->dirty = true;
}
} else {
/* resume execution, this will be pc+2 to skip over the
......@@ -130,7 +130,7 @@ static int post_result(struct target *target)
/* return result in R0 */
buf_set_u32(arm->core_cache->reg_list[0].value, 0, 32, target->semihosting->result);
arm->core_cache->reg_list[0].dirty = 1;
arm->core_cache->reg_list[0].dirty = true;
}
return ERROR_OK;
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment