From 78933a4ad9ae9c2e274d41e6b3036ea582c47810 Mon Sep 17 00:00:00 2001 From: Alan Modra Date: Wed, 31 Mar 2021 10:36:19 +1030 Subject: Use bool in opcodes cpu/ * frv.opc: Replace bfd_boolean with bool, FALSE with false, and TRUE with true throughout. opcodes/ * sysdep.h (POISON_BFD_BOOLEAN): Define. * aarch64-asm-2.c, * aarch64-asm.c, * aarch64-asm.h, * aarch64-dis-2.c, * aarch64-dis.c, * aarch64-dis.h, * aarch64-gen.c, * aarch64-opc.c, * aarch64-opc.h, * arc-dis.c, * arc-dis.h, * arc-fxi.h, * arc-opc.c, * arm-dis.c, * bfin-dis.c, * cris-dis.c, * csky-dis.c, * csky-opc.h, * dis-buf.c, * disassemble.c, * frv-opc.c, * frv-opc.h, * h8300-dis.c, * i386-dis.c, * m68k-dis.c, * metag-dis.c, * microblaze-dis.c, * microblaze-dis.h, * micromips-opc.c, * mips-dis.c, * mips-formats.h, * mips-opc.c, * mips16-opc.c, * mmix-dis.c, * msp430-dis.c, * nds32-dis.c, * nfp-dis.c, * nios2-dis.c, * ppc-dis.c, * riscv-dis.c, * score-dis.c, * score7-dis.c, * tic6x-dis.c, * v850-dis.c, * vax-dis.c, * wasm32-dis.c, * xtensa-dis.c: Replace bfd_boolean with bool, FALSE with false, and TRUE with true throughout. --- opcodes/ChangeLog | 18 ++ opcodes/aarch64-asm-2.c | 2 +- opcodes/aarch64-asm.c | 256 +++++++++--------- opcodes/aarch64-asm.h | 13 +- opcodes/aarch64-dis-2.c | 2 +- opcodes/aarch64-dis.c | 424 +++++++++++++++--------------- opcodes/aarch64-dis.h | 8 +- opcodes/aarch64-gen.c | 4 +- opcodes/aarch64-opc.c | 136 +++++----- opcodes/aarch64-opc.h | 20 +- opcodes/arc-dis.c | 110 ++++---- opcodes/arc-dis.h | 2 +- opcodes/arc-fxi.h | 81 +++--- opcodes/arc-opc.c | 186 ++++++------- opcodes/arm-dis.c | 660 +++++++++++++++++++++++------------------------ opcodes/bfin-dis.c | 42 +-- opcodes/cris-dis.c | 28 +- opcodes/csky-dis.c | 22 +- opcodes/csky-opc.h | 2 +- opcodes/dis-buf.c | 4 +- opcodes/disassemble.c | 12 +- opcodes/frv-opc.c | 136 +++++----- opcodes/frv-opc.h | 18 +- opcodes/h8300-dis.c | 2 +- opcodes/i386-dis.c | 8 +- opcodes/m68k-dis.c | 2 +- opcodes/metag-dis.c | 162 ++++++------ opcodes/microblaze-dis.c | 54 ++-- opcodes/microblaze-dis.h | 8 +- opcodes/micromips-opc.c | 44 ++-- opcodes/mips-dis.c | 76 +++--- opcodes/mips-formats.h | 16 +- opcodes/mips-opc.c | 44 ++-- opcodes/mips16-opc.c | 40 +-- opcodes/mmix-dis.c | 8 +- opcodes/msp430-dis.c | 18 +- opcodes/nds32-dis.c | 30 +-- opcodes/nfp-dis.c | 74 +++--- opcodes/nios2-dis.c | 2 +- opcodes/ppc-dis.c | 22 +- opcodes/riscv-dis.c | 14 +- opcodes/score-dis.c | 12 +- opcodes/score7-dis.c | 20 +- opcodes/sysdep.h | 2 + opcodes/tic6x-dis.c | 222 ++++++++-------- opcodes/v850-dis.c | 12 +- opcodes/vax-dis.c | 24 +- opcodes/wasm32-dis.c | 58 ++--- opcodes/xtensa-dis.c | 4 +- 49 files changed, 1591 insertions(+), 1573 deletions(-) (limited to 'opcodes') diff --git a/opcodes/ChangeLog b/opcodes/ChangeLog index ae4dea9..6d29147 100644 --- a/opcodes/ChangeLog +++ b/opcodes/ChangeLog @@ -1,5 +1,23 @@ 2021-03-31 Alan Modra + * sysdep.h (POISON_BFD_BOOLEAN): Define. + * aarch64-asm-2.c, * aarch64-asm.c, * aarch64-asm.h, + * aarch64-dis-2.c, * aarch64-dis.c, * aarch64-dis.h, + * aarch64-gen.c, * aarch64-opc.c, * aarch64-opc.h, * arc-dis.c, + * arc-dis.h, * arc-fxi.h, * arc-opc.c, * arm-dis.c, * bfin-dis.c, + * cris-dis.c, * csky-dis.c, * csky-opc.h, * dis-buf.c, + * disassemble.c, * frv-opc.c, * frv-opc.h, * h8300-dis.c, + * i386-dis.c, * m68k-dis.c, * metag-dis.c, * microblaze-dis.c, + * microblaze-dis.h, * micromips-opc.c, * mips-dis.c, + * mips-formats.h, * mips-opc.c, * mips16-opc.c, * mmix-dis.c, + * msp430-dis.c, * nds32-dis.c, * nfp-dis.c, * nios2-dis.c, + * ppc-dis.c, * riscv-dis.c, * score-dis.c, * score7-dis.c, + * tic6x-dis.c, * v850-dis.c, * vax-dis.c, * wasm32-dis.c, + * xtensa-dis.c: Replace bfd_boolean with bool, FALSE with false, + and TRUE with true throughout. + +2021-03-31 Alan Modra + * aarch64-dis.c: Include stdint.h in place of bfd_stdint.h. * aarch64-dis.h: Likewise. * aarch64-opc.c: Likewise. diff --git a/opcodes/aarch64-asm-2.c b/opcodes/aarch64-asm-2.c index abc6d68..26d61da 100644 --- a/opcodes/aarch64-asm-2.c +++ b/opcodes/aarch64-asm-2.c @@ -603,7 +603,7 @@ aarch64_find_real_opcode (const aarch64_opcode *opcode) return aarch64_opcode_table + value; } -bfd_boolean +bool aarch64_insert_operand (const aarch64_operand *self, const aarch64_opnd_info *info, aarch64_insn *code, const aarch64_inst *inst, diff --git a/opcodes/aarch64-asm.c b/opcodes/aarch64-asm.c index eae652e..fa1612c 100644 --- a/opcodes/aarch64-asm.c +++ b/opcodes/aarch64-asm.c @@ -79,31 +79,31 @@ insert_all_fields (const aarch64_operand *self, aarch64_insn *code, /* Operand inserters. */ /* Insert nothing. */ -bfd_boolean +bool aarch64_ins_none (const aarch64_operand *self ATTRIBUTE_UNUSED, const aarch64_opnd_info *info ATTRIBUTE_UNUSED, aarch64_insn *code ATTRIBUTE_UNUSED, const aarch64_inst *inst ATTRIBUTE_UNUSED, aarch64_operand_error *errors ATTRIBUTE_UNUSED) { - return TRUE; + return true; } /* Insert register number. */ -bfd_boolean +bool aarch64_ins_regno (const aarch64_operand *self, const aarch64_opnd_info *info, aarch64_insn *code, const aarch64_inst *inst ATTRIBUTE_UNUSED, aarch64_operand_error *errors ATTRIBUTE_UNUSED) { insert_field (self->fields[0], code, info->reg.regno, 0); - return TRUE; + return true; } /* Insert register number, index and/or other data for SIMD register element operand, e.g. the last source operand in SQDMLAL , , .[]. */ -bfd_boolean +bool aarch64_ins_reglane (const aarch64_operand *self, const aarch64_opnd_info *info, aarch64_insn *code, const aarch64_inst *inst, aarch64_operand_error *errors ATTRIBUTE_UNUSED) @@ -188,11 +188,11 @@ aarch64_ins_reglane (const aarch64_operand *self, const aarch64_opnd_info *info, assert (0); } } - return TRUE; + return true; } /* Insert regno and len field of a register list operand, e.g. Vn in TBL. */ -bfd_boolean +bool aarch64_ins_reglist (const aarch64_operand *self, const aarch64_opnd_info *info, aarch64_insn *code, const aarch64_inst *inst ATTRIBUTE_UNUSED, @@ -202,12 +202,12 @@ aarch64_ins_reglist (const aarch64_operand *self, const aarch64_opnd_info *info, insert_field (self->fields[0], code, info->reglist.first_regno, 0); /* len */ insert_field (FLD_len, code, info->reglist.num_regs - 1, 0); - return TRUE; + return true; } /* Insert Rt and opcode fields for a register list operand, e.g. Vt in AdvSIMD load/store instructions. */ -bfd_boolean +bool aarch64_ins_ldst_reglist (const aarch64_operand *self ATTRIBUTE_UNUSED, const aarch64_opnd_info *info, aarch64_insn *code, const aarch64_inst *inst, @@ -246,12 +246,12 @@ aarch64_ins_ldst_reglist (const aarch64_operand *self ATTRIBUTE_UNUSED, } insert_field (FLD_opcode, code, value, 0); - return TRUE; + return true; } /* Insert Rt and S fields for a register list operand, e.g. Vt in AdvSIMD load single structure to all lanes instructions. */ -bfd_boolean +bool aarch64_ins_ldst_reglist_r (const aarch64_operand *self ATTRIBUTE_UNUSED, const aarch64_opnd_info *info, aarch64_insn *code, const aarch64_inst *inst, @@ -272,12 +272,12 @@ aarch64_ins_ldst_reglist_r (const aarch64_operand *self ATTRIBUTE_UNUSED, value = (aarch64_insn) 1; insert_field (FLD_S, code, value, 0); - return TRUE; + return true; } /* Insert Q, opcode<2:1>, S, size and Rt fields for a register element list operand e.g. Vt in AdvSIMD load/store single element instructions. */ -bfd_boolean +bool aarch64_ins_ldst_elemlist (const aarch64_operand *self ATTRIBUTE_UNUSED, const aarch64_opnd_info *info, aarch64_insn *code, const aarch64_inst *inst ATTRIBUTE_UNUSED, @@ -321,13 +321,13 @@ aarch64_ins_ldst_elemlist (const aarch64_operand *self ATTRIBUTE_UNUSED, gen_sub_field (FLD_asisdlso_opcode, 1, 2, &field); insert_field_2 (&field, code, opcodeh2, 0); - return TRUE; + return true; } /* Insert fields immh:immb and/or Q for e.g. the shift immediate in SSHR ., ., # or SSHR , , #. */ -bfd_boolean +bool aarch64_ins_advsimd_imm_shift (const aarch64_operand *self ATTRIBUTE_UNUSED, const aarch64_opnd_info *info, aarch64_insn *code, const aarch64_inst *inst, @@ -377,12 +377,12 @@ aarch64_ins_advsimd_imm_shift (const aarch64_operand *self ATTRIBUTE_UNUSED, imm = info->imm.value + (8 << (unsigned)val); insert_fields (code, imm, 0, 2, FLD_immb, FLD_immh); - return TRUE; + return true; } /* Insert fields for e.g. the immediate operands in BFM , , #, #. */ -bfd_boolean +bool aarch64_ins_imm (const aarch64_operand *self, const aarch64_opnd_info *info, aarch64_insn *code, const aarch64_inst *inst ATTRIBUTE_UNUSED, @@ -396,12 +396,12 @@ aarch64_ins_imm (const aarch64_operand *self, const aarch64_opnd_info *info, if (operand_need_shift_by_four (self)) imm >>= 4; insert_all_fields (self, code, imm); - return TRUE; + return true; } /* Insert immediate and its shift amount for e.g. the last operand in MOVZ , #{, LSL #}. */ -bfd_boolean +bool aarch64_ins_imm_half (const aarch64_operand *self, const aarch64_opnd_info *info, aarch64_insn *code, const aarch64_inst *inst, aarch64_operand_error *errors) @@ -410,12 +410,12 @@ aarch64_ins_imm_half (const aarch64_operand *self, const aarch64_opnd_info *info aarch64_ins_imm (self, info, code, inst, errors); /* hw */ insert_field (FLD_hw, code, info->shifter.amount >> 4, 0); - return TRUE; + return true; } /* Insert cmode and "a:b:c:d:e:f:g:h" fields for e.g. the last operand in MOVI ., # {, LSL #}. */ -bfd_boolean +bool aarch64_ins_advsimd_imm_modified (const aarch64_operand *self ATTRIBUTE_UNUSED, const aarch64_opnd_info *info, aarch64_insn *code, @@ -443,7 +443,7 @@ aarch64_ins_advsimd_imm_modified (const aarch64_operand *self ATTRIBUTE_UNUSED, insert_fields (code, imm, 0, 2, FLD_defgh, FLD_abc); if (kind == AARCH64_MOD_NONE) - return TRUE; + return true; /* shift amount partially in cmode */ assert (kind == AARCH64_MOD_LSL || kind == AARCH64_MOD_MSL); @@ -455,7 +455,7 @@ aarch64_ins_advsimd_imm_modified (const aarch64_operand *self ATTRIBUTE_UNUSED, /* For 8-bit move immediate, the optional LSL #0 does not require encoding. */ if (esize == 1) - return TRUE; + return true; amount >>= 3; if (esize == 4) gen_sub_field (FLD_cmode, 1, 2, &field); /* per word */ @@ -470,22 +470,22 @@ aarch64_ins_advsimd_imm_modified (const aarch64_operand *self ATTRIBUTE_UNUSED, } insert_field_2 (&field, code, amount, 0); - return TRUE; + return true; } /* Insert fields for an 8-bit floating-point immediate. */ -bfd_boolean +bool aarch64_ins_fpimm (const aarch64_operand *self, const aarch64_opnd_info *info, aarch64_insn *code, const aarch64_inst *inst ATTRIBUTE_UNUSED, aarch64_operand_error *errors ATTRIBUTE_UNUSED) { insert_all_fields (self, code, info->imm.value); - return TRUE; + return true; } /* Insert 1-bit rotation immediate (#90 or #270). */ -bfd_boolean +bool aarch64_ins_imm_rotate1 (const aarch64_operand *self, const aarch64_opnd_info *info, aarch64_insn *code, const aarch64_inst *inst, @@ -494,11 +494,11 @@ aarch64_ins_imm_rotate1 (const aarch64_operand *self, uint64_t rot = (info->imm.value - 90) / 180; assert (rot < 2U); insert_field (self->fields[0], code, rot, inst->opcode->mask); - return TRUE; + return true; } /* Insert 2-bit rotation immediate (#0, #90, #180 or #270). */ -bfd_boolean +bool aarch64_ins_imm_rotate2 (const aarch64_operand *self, const aarch64_opnd_info *info, aarch64_insn *code, const aarch64_inst *inst, @@ -507,24 +507,24 @@ aarch64_ins_imm_rotate2 (const aarch64_operand *self, uint64_t rot = info->imm.value / 90; assert (rot < 4U); insert_field (self->fields[0], code, rot, inst->opcode->mask); - return TRUE; + return true; } /* Insert # for the immediate operand in fp fix-point instructions, e.g. SCVTF
, , #. */ -bfd_boolean +bool aarch64_ins_fbits (const aarch64_operand *self, const aarch64_opnd_info *info, aarch64_insn *code, const aarch64_inst *inst ATTRIBUTE_UNUSED, aarch64_operand_error *errors ATTRIBUTE_UNUSED) { insert_field (self->fields[0], code, 64 - info->imm.value, 0); - return TRUE; + return true; } /* Insert arithmetic immediate for e.g. the last operand in SUBS , , # {, }. */ -bfd_boolean +bool aarch64_ins_aimm (const aarch64_operand *self, const aarch64_opnd_info *info, aarch64_insn *code, const aarch64_inst *inst ATTRIBUTE_UNUSED, aarch64_operand_error *errors ATTRIBUTE_UNUSED) @@ -534,18 +534,18 @@ aarch64_ins_aimm (const aarch64_operand *self, const aarch64_opnd_info *info, insert_field (self->fields[0], code, value, 0); /* imm12 (unsigned) */ insert_field (self->fields[1], code, info->imm.value, 0); - return TRUE; + return true; } /* Common routine shared by aarch64_ins{,_inv}_limm. INVERT_P says whether the operand should be inverted before encoding. */ -static bfd_boolean +static bool aarch64_ins_limm_1 (const aarch64_operand *self, const aarch64_opnd_info *info, aarch64_insn *code, - const aarch64_inst *inst, bfd_boolean invert_p, + const aarch64_inst *inst, bool invert_p, aarch64_operand_error *errors ATTRIBUTE_UNUSED) { - bfd_boolean res; + bool res; aarch64_insn value; uint64_t imm = info->imm.value; int esize = aarch64_get_qualifier_esize (inst->operands[0].qualifier); @@ -562,7 +562,7 @@ aarch64_ins_limm_1 (const aarch64_operand *self, /* Insert logical/bitmask immediate for e.g. the last operand in ORR , , #. */ -bfd_boolean +bool aarch64_ins_limm (const aarch64_operand *self, const aarch64_opnd_info *info, aarch64_insn *code, const aarch64_inst *inst, aarch64_operand_error *errors ATTRIBUTE_UNUSED) @@ -572,18 +572,18 @@ aarch64_ins_limm (const aarch64_operand *self, const aarch64_opnd_info *info, } /* Insert a logical/bitmask immediate for the BIC alias of AND (etc.). */ -bfd_boolean +bool aarch64_ins_inv_limm (const aarch64_operand *self, const aarch64_opnd_info *info, aarch64_insn *code, const aarch64_inst *inst, aarch64_operand_error *errors ATTRIBUTE_UNUSED) { - return aarch64_ins_limm_1 (self, info, code, inst, TRUE, errors); + return aarch64_ins_limm_1 (self, info, code, inst, true, errors); } /* Encode Ft for e.g. STR , [, {, {}}] or LDP , , [], #. */ -bfd_boolean +bool aarch64_ins_ft (const aarch64_operand *self, const aarch64_opnd_info *info, aarch64_insn *code, const aarch64_inst *inst, aarch64_operand_error *errors) @@ -616,11 +616,11 @@ aarch64_ins_ft (const aarch64_operand *self, const aarch64_opnd_info *info, insert_fields (code, value, 0, 2, FLD_ldst_size, FLD_opc1); } - return TRUE; + return true; } /* Encode the address operand for e.g. STXRB , , [{,#0}]. */ -bfd_boolean +bool aarch64_ins_addr_simple (const aarch64_operand *self ATTRIBUTE_UNUSED, const aarch64_opnd_info *info, aarch64_insn *code, const aarch64_inst *inst ATTRIBUTE_UNUSED, @@ -628,12 +628,12 @@ aarch64_ins_addr_simple (const aarch64_operand *self ATTRIBUTE_UNUSED, { /* Rn */ insert_field (FLD_Rn, code, info->addr.base_regno, 0); - return TRUE; + return true; } /* Encode the address operand for e.g. STR , [, {, {}}]. */ -bfd_boolean +bool aarch64_ins_addr_regoff (const aarch64_operand *self ATTRIBUTE_UNUSED, const aarch64_opnd_info *info, aarch64_insn *code, const aarch64_inst *inst ATTRIBUTE_UNUSED, @@ -662,12 +662,12 @@ aarch64_ins_addr_regoff (const aarch64_operand *self ATTRIBUTE_UNUSED, S = info->shifter.operator_present && info->shifter.amount_present; insert_field (FLD_S, code, S, 0); - return TRUE; + return true; } /* Encode the address operand for e.g. stlur , [{, }]. */ -bfd_boolean +bool aarch64_ins_addr_offset (const aarch64_operand *self ATTRIBUTE_UNUSED, const aarch64_opnd_info *info, aarch64_insn *code, const aarch64_inst *inst ATTRIBUTE_UNUSED, @@ -686,11 +686,11 @@ aarch64_ins_addr_offset (const aarch64_operand *self ATTRIBUTE_UNUSED, assert (info->addr.preind == 1 && info->addr.postind == 0); insert_field (self->fields[2], code, 1, 0); } - return TRUE; + return true; } /* Encode the address operand for e.g. LDRSW , [, #]!. */ -bfd_boolean +bool aarch64_ins_addr_simm (const aarch64_operand *self, const aarch64_opnd_info *info, aarch64_insn *code, @@ -720,11 +720,11 @@ aarch64_ins_addr_simm (const aarch64_operand *self, insert_field (self->fields[1], code, 1, 0); } - return TRUE; + return true; } /* Encode the address operand for e.g. LDRAA , [{, #}]. */ -bfd_boolean +bool aarch64_ins_addr_simm10 (const aarch64_operand *self, const aarch64_opnd_info *info, aarch64_insn *code, @@ -745,11 +745,11 @@ aarch64_ins_addr_simm10 (const aarch64_operand *self, assert (info->addr.preind == 1 && info->addr.postind == 0); insert_field (self->fields[3], code, 1, 0); } - return TRUE; + return true; } /* Encode the address operand for e.g. LDRSW , [{, #}]. */ -bfd_boolean +bool aarch64_ins_addr_uimm12 (const aarch64_operand *self, const aarch64_opnd_info *info, aarch64_insn *code, @@ -762,12 +762,12 @@ aarch64_ins_addr_uimm12 (const aarch64_operand *self, insert_field (self->fields[0], code, info->addr.base_regno, 0); /* uimm12 */ insert_field (self->fields[1], code,info->addr.offset.imm >> shift, 0); - return TRUE; + return true; } /* Encode the address operand for e.g. LD1 {., ., .}, [], >. */ -bfd_boolean +bool aarch64_ins_simd_addr_post (const aarch64_operand *self ATTRIBUTE_UNUSED, const aarch64_opnd_info *info, aarch64_insn *code, const aarch64_inst *inst ATTRIBUTE_UNUSED, @@ -780,11 +780,11 @@ aarch64_ins_simd_addr_post (const aarch64_operand *self ATTRIBUTE_UNUSED, insert_field (FLD_Rm, code, info->addr.offset.regno, 0); else insert_field (FLD_Rm, code, 0x1f, 0); - return TRUE; + return true; } /* Encode the condition operand for e.g. CSEL , , , . */ -bfd_boolean +bool aarch64_ins_cond (const aarch64_operand *self ATTRIBUTE_UNUSED, const aarch64_opnd_info *info, aarch64_insn *code, const aarch64_inst *inst ATTRIBUTE_UNUSED, @@ -792,11 +792,11 @@ aarch64_ins_cond (const aarch64_operand *self ATTRIBUTE_UNUSED, { /* cond */ insert_field (FLD_cond, code, info->cond->value, 0); - return TRUE; + return true; } /* Encode the system register operand for e.g. MRS , . */ -bfd_boolean +bool aarch64_ins_sysreg (const aarch64_operand *self ATTRIBUTE_UNUSED, const aarch64_opnd_info *info, aarch64_insn *code, const aarch64_inst *inst, @@ -820,7 +820,7 @@ aarch64_ins_sysreg (const aarch64_operand *self ATTRIBUTE_UNUSED, detail->kind = AARCH64_OPDE_SYNTAX_ERROR; detail->error = _("specified register cannot be read from"); detail->index = info->idx; - detail->non_fatal = TRUE; + detail->non_fatal = true; } else if (opcode_flags == F_SYS_WRITE && sysreg_flags @@ -829,17 +829,17 @@ aarch64_ins_sysreg (const aarch64_operand *self ATTRIBUTE_UNUSED, detail->kind = AARCH64_OPDE_SYNTAX_ERROR; detail->error = _("specified register cannot be written to"); detail->index = info->idx; - detail->non_fatal = TRUE; + detail->non_fatal = true; } } /* op0:op1:CRn:CRm:op2 */ insert_fields (code, info->sysreg.value, inst->opcode->mask, 5, FLD_op2, FLD_CRm, FLD_CRn, FLD_op1, FLD_op0); - return TRUE; + return true; } /* Encode the PSTATE field operand for e.g. MSR , #. */ -bfd_boolean +bool aarch64_ins_pstatefield (const aarch64_operand *self ATTRIBUTE_UNUSED, const aarch64_opnd_info *info, aarch64_insn *code, const aarch64_inst *inst ATTRIBUTE_UNUSED, @@ -848,11 +848,11 @@ aarch64_ins_pstatefield (const aarch64_operand *self ATTRIBUTE_UNUSED, /* op1:op2 */ insert_fields (code, info->pstatefield, inst->opcode->mask, 2, FLD_op2, FLD_op1); - return TRUE; + return true; } /* Encode the system instruction op operand for e.g. AT , . */ -bfd_boolean +bool aarch64_ins_sysins_op (const aarch64_operand *self ATTRIBUTE_UNUSED, const aarch64_opnd_info *info, aarch64_insn *code, const aarch64_inst *inst ATTRIBUTE_UNUSED, @@ -861,12 +861,12 @@ aarch64_ins_sysins_op (const aarch64_operand *self ATTRIBUTE_UNUSED, /* op1:CRn:CRm:op2 */ insert_fields (code, info->sysins_op->value, inst->opcode->mask, 4, FLD_op2, FLD_CRm, FLD_CRn, FLD_op1); - return TRUE; + return true; } /* Encode the memory barrier option operand for e.g. DMB
, , #. */ -bfd_boolean +bool aarch64_ext_fbits (const aarch64_operand *self ATTRIBUTE_UNUSED, aarch64_opnd_info *info, const aarch64_insn code, const aarch64_inst *inst ATTRIBUTE_UNUSED, aarch64_operand_error *errors ATTRIBUTE_UNUSED) { info->imm.value = 64- extract_field (FLD_scale, code, 0); - return TRUE; + return true; } /* Decode arithmetic immediate for e.g. SUBS , , # {, }. */ -bfd_boolean +bool aarch64_ext_aimm (const aarch64_operand *self ATTRIBUTE_UNUSED, aarch64_opnd_info *info, const aarch64_insn code, const aarch64_inst *inst ATTRIBUTE_UNUSED, @@ -831,18 +831,18 @@ aarch64_ext_aimm (const aarch64_operand *self ATTRIBUTE_UNUSED, /* shift */ value = extract_field (FLD_shift, code, 0); if (value >= 2) - return FALSE; + return false; info->shifter.amount = value ? 12 : 0; /* imm12 (unsigned) */ info->imm.value = extract_field (FLD_imm12, code, 0); - return TRUE; + return true; } /* Return true if VALUE is a valid logical immediate encoding, storing the decoded value in *RESULT if so. ESIZE is the number of bytes in the decoded immediate. */ -static bfd_boolean +static bool decode_limm (uint32_t esize, aarch64_insn value, int64_t *result) { uint64_t imm, mask; @@ -870,7 +870,7 @@ decode_limm (uint32_t esize, aarch64_insn value, int64_t *result) case 0x30 ... 0x37: /* 110xxx */ simd_size = 8; S &= 0x7; break; case 0x38 ... 0x3b: /* 1110xx */ simd_size = 4; S &= 0x3; break; case 0x3c ... 0x3d: /* 11110x */ simd_size = 2; S &= 0x1; break; - default: return FALSE; + default: return false; } mask = (1ull << simd_size) - 1; /* Top bits are IGNORED. */ @@ -878,11 +878,11 @@ decode_limm (uint32_t esize, aarch64_insn value, int64_t *result) } if (simd_size > esize * 8) - return FALSE; + return false; /* NOTE: if S = simd_size - 1 we get 0xf..f which is rejected. */ if (S == simd_size - 1) - return FALSE; + return false; /* S+1 consecutive bits to 1. */ /* NOTE: S can't be 63 due to detection above. */ imm = (1ull << (S + 1)) - 1; @@ -908,11 +908,11 @@ decode_limm (uint32_t esize, aarch64_insn value, int64_t *result) *result = imm & ~((uint64_t) -1 << (esize * 4) << (esize * 4)); - return TRUE; + return true; } /* Decode a logical immediate for e.g. ORR , , #. */ -bfd_boolean +bool aarch64_ext_limm (const aarch64_operand *self, aarch64_opnd_info *info, const aarch64_insn code, const aarch64_inst *inst, @@ -928,21 +928,21 @@ aarch64_ext_limm (const aarch64_operand *self, } /* Decode a logical immediate for the BIC alias of AND (etc.). */ -bfd_boolean +bool aarch64_ext_inv_limm (const aarch64_operand *self, aarch64_opnd_info *info, const aarch64_insn code, const aarch64_inst *inst, aarch64_operand_error *errors) { if (!aarch64_ext_limm (self, info, code, inst, errors)) - return FALSE; + return false; info->imm.value = ~info->imm.value; - return TRUE; + return true; } /* Decode Ft for e.g. STR , [, {, {}}] or LDP , , [], #. */ -bfd_boolean +bool aarch64_ext_ft (const aarch64_operand *self ATTRIBUTE_UNUSED, aarch64_opnd_info *info, const aarch64_insn code, const aarch64_inst *inst, @@ -966,7 +966,7 @@ aarch64_ext_ft (const aarch64_operand *self ATTRIBUTE_UNUSED, case 0: qualifier = AARCH64_OPND_QLF_S_S; break; case 1: qualifier = AARCH64_OPND_QLF_S_D; break; case 2: qualifier = AARCH64_OPND_QLF_S_Q; break; - default: return FALSE; + default: return false; } info->qualifier = qualifier; } @@ -975,15 +975,15 @@ aarch64_ext_ft (const aarch64_operand *self ATTRIBUTE_UNUSED, /* opc1:size */ value = extract_fields (code, 0, 2, FLD_opc1, FLD_ldst_size); if (value > 0x4) - return FALSE; + return false; info->qualifier = get_sreg_qualifier_from_value (value); } - return TRUE; + return true; } /* Decode the address operand for e.g. STXRB , , [{,#0}]. */ -bfd_boolean +bool aarch64_ext_addr_simple (const aarch64_operand *self ATTRIBUTE_UNUSED, aarch64_opnd_info *info, aarch64_insn code, @@ -992,12 +992,12 @@ aarch64_ext_addr_simple (const aarch64_operand *self ATTRIBUTE_UNUSED, { /* Rn */ info->addr.base_regno = extract_field (FLD_Rn, code, 0); - return TRUE; + return true; } /* Decode the address operand for e.g. stlur , [{, }]. */ -bfd_boolean +bool aarch64_ext_addr_offset (const aarch64_operand *self ATTRIBUTE_UNUSED, aarch64_opnd_info *info, aarch64_insn code, const aarch64_inst *inst, @@ -1015,12 +1015,12 @@ aarch64_ext_addr_offset (const aarch64_operand *self ATTRIBUTE_UNUSED, info->addr.writeback = 1; info->addr.preind = 1; } - return TRUE; + return true; } /* Decode the address operand for e.g. STR , [, {, {}}]. */ -bfd_boolean +bool aarch64_ext_addr_regoff (const aarch64_operand *self ATTRIBUTE_UNUSED, aarch64_opnd_info *info, aarch64_insn code, const aarch64_inst *inst, @@ -1035,7 +1035,7 @@ aarch64_ext_addr_regoff (const aarch64_operand *self ATTRIBUTE_UNUSED, /* option */ value = extract_field (FLD_option, code, 0); info->shifter.kind = - aarch64_get_operand_modifier_from_value (value, TRUE /* extend_p */); + aarch64_get_operand_modifier_from_value (value, true /* extend_p */); /* Fix-up the shifter kind; although the table-driven approach is efficient, it is slightly inflexible, thus needing this fix-up. */ if (info->shifter.kind == AARCH64_MOD_UXTX) @@ -1060,11 +1060,11 @@ aarch64_ext_addr_regoff (const aarch64_operand *self ATTRIBUTE_UNUSED, info->shifter.amount_present = 1; } - return TRUE; + return true; } /* Decode the address operand for e.g. LDRSW , [], #. */ -bfd_boolean +bool aarch64_ext_addr_simm (const aarch64_operand *self, aarch64_opnd_info *info, aarch64_insn code, const aarch64_inst *inst, aarch64_operand_error *errors ATTRIBUTE_UNUSED) @@ -1097,11 +1097,11 @@ aarch64_ext_addr_simm (const aarch64_operand *self, aarch64_opnd_info *info, info->addr.postind = 1; } - return TRUE; + return true; } /* Decode the address operand for e.g. LDRSW , [{, #}]. */ -bfd_boolean +bool aarch64_ext_addr_uimm12 (const aarch64_operand *self, aarch64_opnd_info *info, aarch64_insn code, const aarch64_inst *inst ATTRIBUTE_UNUSED, @@ -1114,11 +1114,11 @@ aarch64_ext_addr_uimm12 (const aarch64_operand *self, aarch64_opnd_info *info, info->addr.base_regno = extract_field (self->fields[0], code, 0); /* uimm12 */ info->addr.offset.imm = extract_field (self->fields[1], code, 0) << shift; - return TRUE; + return true; } /* Decode the address operand for e.g. LDRAA , [{, #}]. */ -bfd_boolean +bool aarch64_ext_addr_simm10 (const aarch64_operand *self, aarch64_opnd_info *info, aarch64_insn code, const aarch64_inst *inst ATTRIBUTE_UNUSED, @@ -1136,12 +1136,12 @@ aarch64_ext_addr_simm10 (const aarch64_operand *self, aarch64_opnd_info *info, info->addr.writeback = 1; info->addr.preind = 1; } - return TRUE; + return true; } /* Decode the address operand for e.g. LD1 {., ., .}, [], >. */ -bfd_boolean +bool aarch64_ext_simd_addr_post (const aarch64_operand *self ATTRIBUTE_UNUSED, aarch64_opnd_info *info, aarch64_insn code, const aarch64_inst *inst, @@ -1171,11 +1171,11 @@ aarch64_ext_simd_addr_post (const aarch64_operand *self ATTRIBUTE_UNUSED, info->addr.offset.is_reg = 1; info->addr.writeback = 1; - return TRUE; + return true; } /* Decode the condition operand for e.g. CSEL , , , . */ -bfd_boolean +bool aarch64_ext_cond (const aarch64_operand *self ATTRIBUTE_UNUSED, aarch64_opnd_info *info, aarch64_insn code, const aarch64_inst *inst ATTRIBUTE_UNUSED, @@ -1185,11 +1185,11 @@ aarch64_ext_cond (const aarch64_operand *self ATTRIBUTE_UNUSED, /* cond */ value = extract_field (FLD_cond, code, 0); info->cond = get_cond_from_value (value); - return TRUE; + return true; } /* Decode the system register operand for e.g. MRS , . */ -bfd_boolean +bool aarch64_ext_sysreg (const aarch64_operand *self ATTRIBUTE_UNUSED, aarch64_opnd_info *info, aarch64_insn code, @@ -1214,11 +1214,11 @@ aarch64_ext_sysreg (const aarch64_operand *self ATTRIBUTE_UNUSED, info->sysreg.flags = F_REG_WRITE; } - return TRUE; + return true; } /* Decode the PSTATE field operand for e.g. MSR , #. */ -bfd_boolean +bool aarch64_ext_pstatefield (const aarch64_operand *self ATTRIBUTE_UNUSED, aarch64_opnd_info *info, aarch64_insn code, const aarch64_inst *inst ATTRIBUTE_UNUSED, @@ -1229,13 +1229,13 @@ aarch64_ext_pstatefield (const aarch64_operand *self ATTRIBUTE_UNUSED, info->pstatefield = extract_fields (code, 0, 2, FLD_op1, FLD_op2); for (i = 0; aarch64_pstatefields[i].name != NULL; ++i) if (aarch64_pstatefields[i].value == (aarch64_insn)info->pstatefield) - return TRUE; + return true; /* Reserved value in . */ - return FALSE; + return false; } /* Decode the system instruction op operand for e.g. AT , . */ -bfd_boolean +bool aarch64_ext_sysins_op (const aarch64_operand *self ATTRIBUTE_UNUSED, aarch64_opnd_info *info, aarch64_insn code, @@ -1262,7 +1262,7 @@ aarch64_ext_sysins_op (const aarch64_operand *self ATTRIBUTE_UNUSED, aarch64_sys_regs_sr[]. */ value = value & ~(0x7); break; - default: assert (0); return FALSE; + default: assert (0); return false; } for (i = 0; sysins_ops[i].name != NULL; ++i) @@ -1273,15 +1273,15 @@ aarch64_ext_sysins_op (const aarch64_operand *self ATTRIBUTE_UNUSED, info->sysins_op->name, (unsigned)info->sysins_op->value, aarch64_sys_ins_reg_has_xt (info->sysins_op), i); - return TRUE; + return true; } - return FALSE; + return false; } /* Decode the memory barrier option operand for e.g. DMB