diff options
author | Alan Modra <amodra@gmail.com> | 2021-03-31 10:42:05 +1030 |
---|---|---|
committer | Alan Modra <amodra@gmail.com> | 2021-03-31 10:49:23 +1030 |
commit | 5b7c81bd8cc80253a48c7045e4d2c8d2bf178eb9 (patch) | |
tree | d97ac6b8c17baeb684390888df2dd716cc125bb6 /gas/config/tc-nios2.c | |
parent | f38a2680c2f04db6eac4fd87380cd3cf7bcb3bcc (diff) | |
download | gdb-5b7c81bd8cc80253a48c7045e4d2c8d2bf178eb9.zip gdb-5b7c81bd8cc80253a48c7045e4d2c8d2bf178eb9.tar.gz gdb-5b7c81bd8cc80253a48c7045e4d2c8d2bf178eb9.tar.bz2 |
Use bool in gas
* as.h (POISON_BFD_BOOLEAN): Define.
* as.c, * as.h, * atof-generic.c, * config/atof-ieee.c,
* config/bfin-aux.h, * config/obj-coff.c, * config/obj-ecoff.c,
* config/obj-elf.c, * config/obj-elf.h, * config/obj-som.c,
* config/tc-aarch64.c, * config/tc-alpha.c, * config/tc-arc.c,
* config/tc-arc.h, * config/tc-arm.c, * config/tc-arm.h,
* config/tc-avr.c, * config/tc-avr.h, * config/tc-bfin.c,
* config/tc-bfin.h, * config/tc-bpf.c, * config/tc-cris.c,
* config/tc-csky.c, * config/tc-csky.h, * config/tc-d10v.c,
* config/tc-d10v.h, * config/tc-d30v.c, * config/tc-d30v.h,
* config/tc-dlx.c, * config/tc-dlx.h, * config/tc-epiphany.c,
* config/tc-epiphany.h, * config/tc-fr30.c, * config/tc-fr30.h,
* config/tc-frv.c, * config/tc-frv.h, * config/tc-ft32.c,
* config/tc-ft32.h, * config/tc-h8300.c, * config/tc-hppa.c,
* config/tc-i386-intel.c, * config/tc-i386.c, * config/tc-ia64.c,
* config/tc-ip2k.c, * config/tc-iq2000.c, * config/tc-iq2000.h,
* config/tc-lm32.c, * config/tc-lm32.h, * config/tc-m32c.c,
* config/tc-m32c.h, * config/tc-m32r.c, * config/tc-m32r.h,
* config/tc-m68hc11.c, * config/tc-m68k.c, * config/tc-mcore.c,
* config/tc-mcore.h, * config/tc-mep.c, * config/tc-mep.h,
* config/tc-metag.c, * config/tc-metag.h,
* config/tc-microblaze.c, * config/tc-mips.c, * config/tc-mips.h,
* config/tc-mmix.c, * config/tc-mn10200.c, * config/tc-mn10300.c,
* config/tc-mn10300.h, * config/tc-moxie.c, * config/tc-msp430.c,
* config/tc-msp430.h, * config/tc-mt.c, * config/tc-mt.h,
* config/tc-nds32.c, * config/tc-nds32.h, * config/tc-nios2.c,
* config/tc-ns32k.c, * config/tc-or1k.c, * config/tc-or1k.h,
* config/tc-pdp11.c, * config/tc-ppc.c, * config/tc-pru.c,
* config/tc-pru.h, * config/tc-riscv.c, * config/tc-riscv.h,
* config/tc-rx.c, * config/tc-rx.h, * config/tc-s12z.c,
* config/tc-s12z.h, * config/tc-s390.c, * config/tc-score.c,
* config/tc-score.h, * config/tc-score7.c, * config/tc-sh.c,
* config/tc-sh.h, * config/tc-spu.c, * config/tc-tic54x.c,
* config/tc-tic6x.c, * config/tc-tic6x.h, * config/tc-tilegx.c,
* config/tc-tilepro.c, * config/tc-v850.c, * config/tc-v850.h,
* config/tc-visium.c, * config/tc-visium.h, * config/tc-wasm32.c,
* config/tc-wasm32.h, * config/tc-xc16x.c, * config/tc-xgate.c,
* config/tc-xstormy16.c, * config/tc-xstormy16.h,
* config/tc-xtensa.c, * config/tc-xtensa.h, * config/tc-z80.c,
* config/tc-z8k.c, * config/xtensa-istack.h,
* config/xtensa-relax.c, * config/xtensa-relax.h, * dw2gencfi.c,
* dwarf2dbg.c, * dwarf2dbg.h, * expr.c, * expr.h, * frags.c,
* frags.h, * listing.c, * macro.c, * output-file.c, * read.c,
* read.h, * stabs.c, * symbols.c, * write.c: Replace bfd_boolean
with bool, FALSE with false, and TRUE with true.
Diffstat (limited to 'gas/config/tc-nios2.c')
-rw-r--r-- | gas/config/tc-nios2.c | 60 |
1 files changed, 30 insertions, 30 deletions
diff --git a/gas/config/tc-nios2.c b/gas/config/tc-nios2.c index be4536c..7e2a398 100644 --- a/gas/config/tc-nios2.c +++ b/gas/config/tc-nios2.c @@ -103,12 +103,12 @@ static struct and macro expansions generate a warning. .set at -> noat = 0, assembly code using at warn but macro expansions do not generate warnings. */ - bfd_boolean noat; + bool noat; /* .set nobreak -> nobreak = 1 allows assembly code to use ba,bt without warning. .set break -> nobreak = 0, assembly code using ba,bt warns. */ - bfd_boolean nobreak; + bool nobreak; /* .cmd line option -relax-all allows all branches and calls to be replaced with longer versions. @@ -117,7 +117,7 @@ static struct a section. */ relax_optionT relax; -} nios2_as_options = {FALSE, FALSE, relax_section}; +} nios2_as_options = {false, false, relax_section}; typedef struct nios2_insn_reloc @@ -391,7 +391,7 @@ nios2_align (int log_size, const char *pfill, symbolS *label) if (label != NULL && !switched_seg_p) { symbolS *sym; - int label_seen = FALSE; + int label_seen = false; struct frag *old_frag; valueT old_value; valueT new_value; @@ -417,7 +417,7 @@ nios2_align (int log_size, const char *pfill, symbolS *label) if (symbol_get_frag (sym) == old_frag && S_GET_VALUE (sym) == old_value) { - label_seen = TRUE; + label_seen = true; symbol_set_frag (sym, frag_now); S_SET_VALUE (sym, new_value); } @@ -579,17 +579,17 @@ s_nios2_set (int equiv) SKIP_WHITESPACE (); if (is_end_of_line[(unsigned char) *input_line_pointer]) { - bfd_boolean done = TRUE; + bool done = true; *endline = 0; if (!strcmp (directive, "noat")) - nios2_as_options.noat = TRUE; + nios2_as_options.noat = true; else if (!strcmp (directive, "at")) - nios2_as_options.noat = FALSE; + nios2_as_options.noat = false; else if (!strcmp (directive, "nobreak")) - nios2_as_options.nobreak = TRUE; + nios2_as_options.nobreak = true; else if (!strcmp (directive, "break")) - nios2_as_options.nobreak = FALSE; + nios2_as_options.nobreak = false; else if (!strcmp (directive, "norelax")) nios2_as_options.relax = relax_none; else if (!strcmp (directive, "relaxsection")) @@ -597,7 +597,7 @@ s_nios2_set (int equiv) else if (!strcmp (directive, "relaxall")) nios2_as_options.relax = relax_all; else - done = FALSE; + done = false; if (done) { @@ -789,7 +789,7 @@ nios2_relax_frag (segT segment, fragS *fragp, long stretch) fragS *sym_frag = symbol_get_frag (symbolp); offsetT offset; int n; - bfd_boolean is_cdx = FALSE; + bool is_cdx = false; target += S_GET_VALUE (symbolp); @@ -809,11 +809,11 @@ nios2_relax_frag (segT segment, fragS *fragp, long stretch) if (IS_CDXBRANCH (subtype) && IS_UBRANCH (subtype) && offset >= -1024 && offset < 1024) /* PC-relative CDX branch with 11-bit offset. */ - is_cdx = TRUE; + is_cdx = true; else if (IS_CDXBRANCH (subtype) && IS_CBRANCH (subtype) && offset >= -128 && offset < 128) /* PC-relative CDX branch with 8-bit offset. */ - is_cdx = TRUE; + is_cdx = true; else if (offset >= -32768 && offset < 32768) /* Fits in PC-relative branch. */ n = 0; @@ -883,7 +883,7 @@ md_convert_frag (bfd *headers ATTRIBUTE_UNUSED, segT segment ATTRIBUTE_UNUSED, unsigned int addend_mask, addi_mask, op; offsetT addend, remainder; int i; - bfd_boolean is_r2 = (bfd_get_mach (stdoutput) == bfd_mach_nios2r2); + bool is_r2 = (bfd_get_mach (stdoutput) == bfd_mach_nios2r2); /* If this is a CDX branch we're not relaxing, just generate the fixup. */ if (IS_CDXBRANCH (subtype)) @@ -1100,7 +1100,7 @@ md_convert_frag (bfd *headers ATTRIBUTE_UNUSED, segT segment ATTRIBUTE_UNUSED, /** Fixups and overflow checking. */ /* Check a fixup for overflow. */ -static bfd_boolean +static bool nios2_check_overflow (valueT fixup, reloc_howto_type *howto) { /* If there is a rightshift, check that the low-order bits are @@ -1109,7 +1109,7 @@ nios2_check_overflow (valueT fixup, reloc_howto_type *howto) { if ((~(~((valueT) 0) << howto->rightshift) & fixup) && howto->complain_on_overflow != complain_overflow_dont) - return TRUE; + return true; fixup = ((signed)fixup) >> howto->rightshift; } @@ -1121,31 +1121,31 @@ nios2_check_overflow (valueT fixup, reloc_howto_type *howto) case complain_overflow_bitfield: if ((fixup >> howto->bitsize) != 0 && ((signed) fixup >> howto->bitsize) != -1) - return TRUE; + return true; break; case complain_overflow_signed: if ((fixup & 0x80000000) > 0) { /* Check for negative overflow. */ if ((signed) fixup < (signed) (~0U << (howto->bitsize - 1))) - return TRUE; + return true; } else { /* Check for positive overflow. */ if (fixup >= ((unsigned) 1 << (howto->bitsize - 1))) - return TRUE; + return true; } break; case complain_overflow_unsigned: if ((fixup >> howto->bitsize) != 0) - return TRUE; + return true; break; default: as_bad (_("error checking for overflow - broken assembler")); break; } - return FALSE; + return false; } /* Emit diagnostic for fixup overflow. */ @@ -3099,7 +3099,7 @@ nios2_parse_args (nios2_insn_infoS *insn, char *argstr, int i; p = argstr; i = 0; - bfd_boolean terminate = FALSE; + bool terminate = false; /* This rest of this function is it too fragile and it mostly works, therefore special case this one. */ @@ -3136,7 +3136,7 @@ nios2_parse_args (nios2_insn_infoS *insn, char *argstr, } if (*parsestr == '\0' || (p != NULL && *p == '\0')) - terminate = TRUE; + terminate = true; ++i; } @@ -3350,7 +3350,7 @@ output_ubranch (nios2_insn_infoS *insn) symbolS *symp = reloc->reloc_expression.X_add_symbol; offsetT offset = reloc->reloc_expression.X_add_number; char *f; - bfd_boolean is_cdx = (insn->insn_nios2_opcode->size == 2); + bool is_cdx = (insn->insn_nios2_opcode->size == 2); /* Tag dwarf2 debug info to the address at the start of the insn. We must do it before frag_var() below closes off the frag. */ @@ -3382,7 +3382,7 @@ output_cbranch (nios2_insn_infoS *insn) symbolS *symp = reloc->reloc_expression.X_add_symbol; offsetT offset = reloc->reloc_expression.X_add_number; char *f; - bfd_boolean is_cdx = (insn->insn_nios2_opcode->size == 2); + bool is_cdx = (insn->insn_nios2_opcode->size == 2); /* Tag dwarf2 debug info to the address at the start of the insn. We must do it before frag_var() below closes off the frag. */ @@ -3640,8 +3640,8 @@ md_begin (void) as_fatal (_("duplicate %s"), nios2_ps_insn_info_structs[i].pseudo_insn); /* Assembler option defaults. */ - nios2_as_options.noat = FALSE; - nios2_as_options.nobreak = FALSE; + nios2_as_options.noat = false; + nios2_as_options.nobreak = false; /* Initialize the alignment data. */ nios2_current_align_seg = now_seg; @@ -3660,7 +3660,7 @@ md_assemble (char *op_str) unsigned long saved_pinfo = 0; nios2_insn_infoS thisinsn; nios2_insn_infoS *insn = &thisinsn; - bfd_boolean ps_error = FALSE; + bool ps_error = false; /* Make sure we are aligned on an appropriate boundary. */ if (nios2_current_align < nios2_min_align) @@ -3710,7 +3710,7 @@ md_assemble (char *op_str) { ps_insn = nios2_translate_pseudo_insn (insn); if (!ps_insn) - ps_error = TRUE; + ps_error = true; } /* If we found invalid pseudo-instruction syntax, the error's already |