aboutsummaryrefslogtreecommitdiff
path: root/gas/config/tc-mn10300.c
diff options
context:
space:
mode:
authorAlan Modra <amodra@gmail.com>2021-03-31 10:42:05 +1030
committerAlan Modra <amodra@gmail.com>2021-03-31 10:49:23 +1030
commit5b7c81bd8cc80253a48c7045e4d2c8d2bf178eb9 (patch)
treed97ac6b8c17baeb684390888df2dd716cc125bb6 /gas/config/tc-mn10300.c
parentf38a2680c2f04db6eac4fd87380cd3cf7bcb3bcc (diff)
downloadfsf-binutils-gdb-5b7c81bd8cc80253a48c7045e4d2c8d2bf178eb9.zip
fsf-binutils-gdb-5b7c81bd8cc80253a48c7045e4d2c8d2bf178eb9.tar.gz
fsf-binutils-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-mn10300.c')
-rw-r--r--gas/config/tc-mn10300.c72
1 files changed, 36 insertions, 36 deletions
diff --git a/gas/config/tc-mn10300.c b/gas/config/tc-mn10300.c
index 2f2e956..37f6733 100644
--- a/gas/config/tc-mn10300.c
+++ b/gas/config/tc-mn10300.c
@@ -323,7 +323,7 @@ reg_name_search (const struct reg_name *regs,
the name and the function returns TRUE. Otherwise the input pointer
is left alone and the function returns FALSE. */
-static bfd_boolean
+static bool
get_register_name (expressionS * expressionP,
const struct reg_name * table,
size_t table_length)
@@ -352,52 +352,52 @@ get_register_name (expressionS * expressionP,
expressionP->X_add_symbol = NULL;
expressionP->X_op_symbol = NULL;
- return TRUE;
+ return true;
}
/* Reset the line as if we had not done anything. */
input_line_pointer = start;
- return FALSE;
+ return false;
}
-static bfd_boolean
+static bool
r_register_name (expressionS *expressionP)
{
return get_register_name (expressionP, r_registers, ARRAY_SIZE (r_registers));
}
-static bfd_boolean
+static bool
xr_register_name (expressionS *expressionP)
{
return get_register_name (expressionP, xr_registers, ARRAY_SIZE (xr_registers));
}
-static bfd_boolean
+static bool
data_register_name (expressionS *expressionP)
{
return get_register_name (expressionP, data_registers, ARRAY_SIZE (data_registers));
}
-static bfd_boolean
+static bool
address_register_name (expressionS *expressionP)
{
return get_register_name (expressionP, address_registers, ARRAY_SIZE (address_registers));
}
-static bfd_boolean
+static bool
float_register_name (expressionS *expressionP)
{
return get_register_name (expressionP, float_registers, ARRAY_SIZE (float_registers));
}
-static bfd_boolean
+static bool
double_register_name (expressionS *expressionP)
{
return get_register_name (expressionP, double_registers, ARRAY_SIZE (double_registers));
}
-static bfd_boolean
+static bool
other_register_name (expressionS *expressionP)
{
int reg_number;
@@ -425,12 +425,12 @@ other_register_name (expressionS *expressionP)
expressionP->X_add_symbol = NULL;
expressionP->X_op_symbol = NULL;
- return TRUE;
+ return true;
}
/* Reset the line as if we had not done anything. */
input_line_pointer = start;
- return FALSE;
+ return false;
}
void
@@ -455,7 +455,7 @@ md_undefined_symbol (char *name ATTRIBUTE_UNUSED)
const char *
md_atof (int type, char *litp, int *sizep)
{
- return ieee_md_atof (type, litp, sizep, FALSE);
+ return ieee_md_atof (type, litp, sizep, false);
}
void
@@ -1073,7 +1073,7 @@ mn10300_cons_fix_new (fragS *frag, int off, int size, expressionS *exp,
fix_new_exp (frag, off, size, &fixup.exp, 0, fixup.reloc);
}
-static bfd_boolean
+static bool
check_operand (const struct mn10300_operand *operand,
offsetT val)
{
@@ -1104,9 +1104,9 @@ check_operand (const struct mn10300_operand *operand,
test = val;
if (test < (offsetT) min || test > (offsetT) max)
- return FALSE;
+ return false;
}
- return TRUE;
+ return true;
}
/* Insert an operand value into an instruction. */
@@ -2155,7 +2155,7 @@ md_assemble (char *str)
}
/* Label this frag as one that contains instructions. */
- frag_now->tc_frag_data = TRUE;
+ frag_now->tc_frag_data = true;
}
/* If while processing a fixup, a reloc really needs to be created
@@ -2278,7 +2278,7 @@ tc_gen_reloc (asection *seg ATTRIBUTE_UNUSED, fixS *fixp)
/* Returns true iff the symbol attached to the frag is at a known location
in the given section, (and hence the relocation to it can be relaxed by
the assembler). */
-static inline bfd_boolean
+static inline bool
has_known_symbol_location (fragS * fragp, asection * sec)
{
symbolS * sym = fragp->fr_symbol;
@@ -2400,37 +2400,37 @@ md_apply_fix (fixS * fixP, valueT * valP, segT seg)
/* Return zero if the fixup in fixp should be left alone and not
adjusted. */
-bfd_boolean
+bool
mn10300_fix_adjustable (struct fix *fixp)
{
if (fixp->fx_pcrel)
{
if (TC_FORCE_RELOCATION_LOCAL (fixp))
- return FALSE;
+ return false;
}
/* Non-relative relocs can (and must) be adjusted if they do
not meet the criteria below, or the generic criteria. */
else if (TC_FORCE_RELOCATION (fixp))
- return FALSE;
+ return false;
/* Do not adjust relocations involving symbols in code sections,
because it breaks linker relaxations. This could be fixed in the
linker, but this fix is simpler, and it pretty much only affects
object size a little bit. */
if (S_GET_SEGMENT (fixp->fx_addsy)->flags & SEC_CODE)
- return FALSE;
+ return false;
/* Likewise, do not adjust symbols that won't be merged, or debug
symbols, because they too break relaxation. We do want to adjust
other mergeable symbols, like .rodata, because code relaxations
need section-relative symbols to properly relax them. */
if (! (S_GET_SEGMENT (fixp->fx_addsy)->flags & SEC_MERGE))
- return FALSE;
+ return false;
if (strncmp (S_GET_SEGMENT (fixp->fx_addsy)->name, ".debug", 6) == 0)
- return FALSE;
+ return false;
- return TRUE;
+ return true;
}
static void
@@ -2549,10 +2549,10 @@ const pseudo_typeS md_pseudo_table[] =
subtraction of two same-section symbols cannot be computed by
the assembler. */
-bfd_boolean
+bool
mn10300_allow_local_subtract (expressionS * left, expressionS * right, segT section)
{
- bfd_boolean result;
+ bool result;
fragS * left_frag;
fragS * right_frag;
fragS * frag;
@@ -2560,11 +2560,11 @@ mn10300_allow_local_subtract (expressionS * left, expressionS * right, segT sect
/* If we are not performing linker relaxation then we have nothing
to worry about. */
if (linkrelax == 0)
- return TRUE;
+ return true;
/* If the symbols are not in a code section then they are OK. */
if ((section->flags & SEC_CODE) == 0)
- return TRUE;
+ return true;
/* Otherwise we have to scan the fragments between the two symbols.
If any instructions are found then we have to assume that linker
@@ -2576,11 +2576,11 @@ mn10300_allow_local_subtract (expressionS * left, expressionS * right, segT sect
if (left_frag == right_frag)
return ! left_frag->tc_frag_data;
- result = TRUE;
+ result = true;
for (frag = left_frag; frag != NULL; frag = frag->fr_next)
{
if (frag->tc_frag_data)
- result = FALSE;
+ result = false;
if (frag == right_frag)
break;
}
@@ -2589,7 +2589,7 @@ mn10300_allow_local_subtract (expressionS * left, expressionS * right, segT sect
for (frag = right_frag; frag != NULL; frag = frag->fr_next)
{
if (frag->tc_frag_data)
- result = FALSE;
+ result = false;
if (frag == left_frag)
break;
}
@@ -2597,7 +2597,7 @@ mn10300_allow_local_subtract (expressionS * left, expressionS * right, segT sect
if (frag == NULL)
/* The two symbols are on disjoint fragment chains
- we cannot possibly compute their difference. */
- return FALSE;
+ return false;
return result;
}
@@ -2622,17 +2622,17 @@ mn10300_handle_align (fragS *frag)
The offset from the symbol is used to record the power-of-two alignment
value. The size is set to 0 because the frag may already be aligned,
thus causing cvt_frag_to_fill to reduce the size of the frag to zero. */
- fix_new (frag, frag->fr_fix, 0, & abs_symbol, frag->fr_offset, FALSE,
+ fix_new (frag, frag->fr_fix, 0, & abs_symbol, frag->fr_offset, false,
BFD_RELOC_MN10300_ALIGN);
}
-bfd_boolean
+bool
mn10300_force_relocation (struct fix * fixp)
{
if (linkrelax
&& (fixp->fx_pcrel
|| fixp->fx_r_type == BFD_RELOC_MN10300_ALIGN))
- return TRUE;
+ return true;
return generic_force_reloc (fixp);
}