From: Wei Liu Date: Fri, 15 Sep 2017 09:16:18 +0000 (+0100) Subject: arm/decode.c: switch to plain bool X-Git-Url: http://xenbits.xensource.com/gitweb?a=commitdiff_plain;h=6c41db976623f1de940f61362c6246291b1efe9a;p=people%2Froyger%2Fxen.git arm/decode.c: switch to plain bool Signed-off-by: Wei Liu Reviewed-by: Julien Grall --- diff --git a/xen/arch/arm/decode.c b/xen/arch/arm/decode.c index 514b7a21a5..8b1e15d118 100644 --- a/xen/arch/arm/decode.c +++ b/xen/arch/arm/decode.c @@ -26,7 +26,7 @@ #include "decode.h" static void update_dabt(struct hsr_dabt *dabt, int reg, - uint8_t size, bool_t sign) + uint8_t size, bool sign) { dabt->reg = reg; dabt->size = size; @@ -47,8 +47,8 @@ static int decode_thumb2(register_t pc, struct hsr_dabt *dabt, uint16_t hw1) { case 12: { - bool_t sign = !!(hw1 & (1 << 8)); - bool_t load = !!(hw1 & (1 << 4)); + bool sign = (hw1 & (1u << 8)); + bool load = (hw1 & (1u << 4)); if ( (hw1 & 0x0110) == 0x0100 ) /* NEON instruction */ @@ -101,16 +101,16 @@ static int decode_thumb(register_t pc, struct hsr_dabt *dabt) switch ( opB & 0x3 ) { case 0: /* Non-signed word */ - update_dabt(dabt, reg, 2, 0); + update_dabt(dabt, reg, 2, false); break; case 1: /* Non-signed halfword */ - update_dabt(dabt, reg, 1, 0); + update_dabt(dabt, reg, 1, false); break; case 2: /* Non-signed byte */ - update_dabt(dabt, reg, 0, 0); + update_dabt(dabt, reg, 0, false); break; case 3: /* Signed byte */ - update_dabt(dabt, reg, 0, 1); + update_dabt(dabt, reg, 0, true); break; } @@ -118,19 +118,19 @@ static int decode_thumb(register_t pc, struct hsr_dabt *dabt) } case 6: /* Load/Store word immediate offset */ - update_dabt(dabt, instr & 7, 2, 0); + update_dabt(dabt, instr & 7, 2, false); break; case 7: /* Load/Store byte immediate offset */ - update_dabt(dabt, instr & 7, 0, 0); + update_dabt(dabt, instr & 7, 0, false); break; case 8: /* Load/Store halfword immediate offset */ - update_dabt(dabt, instr & 7, 1, 0); + update_dabt(dabt, instr & 7, 1, false); break; case 9: /* Load/Store word sp offset */ - update_dabt(dabt, (instr >> 8) & 7, 2, 0); + update_dabt(dabt, (instr >> 8) & 7, 2, false); break; case 14: if ( instr & (1 << 11) )