diff options
author | Marc Schink <openocd-dev@marcschink.de> | 2019-02-26 14:03:49 +0100 |
---|---|---|
committer | Tomas Vanek <vanekt@fbl.cz> | 2019-03-06 16:13:00 +0000 |
commit | 093f9d1c8538c2b31fefbb3391c40021cdeb2e47 (patch) | |
tree | 4b396b9c65d389547364ccdb093dd988c644ca18 /src/target/armv8.c | |
parent | 8c8c93c185f9cce51855bf2d495fd2aaec16d6c1 (diff) | |
download | riscv-openocd-093f9d1c8538c2b31fefbb3391c40021cdeb2e47.zip riscv-openocd-093f9d1c8538c2b31fefbb3391c40021cdeb2e47.tar.gz riscv-openocd-093f9d1c8538c2b31fefbb3391c40021cdeb2e47.tar.bz2 |
target/armv8: Use 'bool' data type
Change-Id: I65def33f24187ab336db5732ce35200ca5cd8f5f
Signed-off-by: Marc Schink <openocd-dev@marcschink.de>
Reviewed-on: http://openocd.zylin.com/4956
Tested-by: jenkins
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
Diffstat (limited to 'src/target/armv8.c')
-rw-r--r-- | src/target/armv8.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/src/target/armv8.c b/src/target/armv8.c index 76a2d98..c8cfcae 100644 --- a/src/target/armv8.c +++ b/src/target/armv8.c @@ -678,8 +678,8 @@ void armv8_set_cpsr(struct arm *arm, uint32_t cpsr) */ if (arm->cpsr) { buf_set_u32(arm->cpsr->value, 0, 32, cpsr); - arm->cpsr->valid = 1; - arm->cpsr->dirty = 0; + arm->cpsr->valid = true; + arm->cpsr->dirty = false; } /* Older ARMs won't have the J bit */ @@ -1518,17 +1518,17 @@ static int armv8_set_core_reg(struct reg *reg, uint8_t *buf) armv8_set_cpsr(arm, (uint32_t)value); else { buf_set_u64(reg->value, 0, reg->size, value); - reg->valid = 1; + reg->valid = true; } } else if (reg->size <= 128) { uint64_t hvalue = buf_get_u64(buf + 8, 0, reg->size - 64); buf_set_u64(reg->value, 0, 64, value); buf_set_u64(reg->value + 8, 0, reg->size - 64, hvalue); - reg->valid = 1; + reg->valid = true; } - reg->dirty = 1; + reg->dirty = true; return ERROR_OK; } @@ -1585,11 +1585,11 @@ static int armv8_set_core_reg32(struct reg *reg, uint8_t *buf) uint64_t value64 = buf_get_u64(buf, 0, 64); buf_set_u64(reg->value, 0, 64, value64); } - reg->valid = 1; - reg64->valid = 1; + reg->valid = true; + reg64->valid = true; } - reg64->dirty = 1; + reg64->dirty = true; return ERROR_OK; } |