summaryrefslogtreecommitdiff
path: root/gas
diff options
context:
space:
mode:
authorJohn Darrington <john@darrington.wattle.id.au>2019-04-12 18:39:01 +0200
committerJohn Darrington <john@darrington.wattle.id.au>2019-04-12 18:39:01 +0200
commitd04ebfb8178e56bdcbf925ec0ed55cf14488e3fb (patch)
tree3826a2a52ad86dc73124f8c546fde5a0f6663ef3 /gas
parent51196bbc5618a3741bd7bbed01ac76b25a2e6f9c (diff)
downloadbinutils-gdb-d04ebfb8178e56bdcbf925ec0ed55cf14488e3fb.tar.gz
GAS: tc-s12z.c: int -> bfd_boolean
Use bfd_boolean where appropriate.
Diffstat (limited to 'gas')
-rw-r--r--gas/ChangeLog4
-rw-r--r--gas/config/tc-s12z.c412
2 files changed, 210 insertions, 206 deletions
diff --git a/gas/ChangeLog b/gas/ChangeLog
index 12350c7eac4..54229d78abc 100644
--- a/gas/ChangeLog
+++ b/gas/ChangeLog
@@ -1,3 +1,7 @@
+2019-04-01 John Darrington <john@darrington.wattle.id.au>
+
+ config/tc-s12z.c: Use bfd_boolean where appropriate.
+
2019-04-11 Max Filippov <jcmvbkbc@gmail.com>
* testsuite/gas/xtensa/loop-relax-2.d: New test definition.
diff --git a/gas/config/tc-s12z.c b/gas/config/tc-s12z.c
index bc1bb5c3827..b9c247671d6 100644
--- a/gas/config/tc-s12z.c
+++ b/gas/config/tc-s12z.c
@@ -164,9 +164,9 @@ s12z_new_insn (int size)
-static int lex_reg_name (uint16_t which, int *reg);
+static bfd_boolean lex_reg_name (uint16_t which, int *reg);
-static int
+static bfd_boolean
lex_constant (long *v)
{
char *end = NULL;
@@ -178,7 +178,7 @@ lex_constant (long *v)
if (lex_reg_name (~0, &dummy))
{
input_line_pointer = p;
- return 0;
+ return false;
}
errno = 0;
@@ -186,25 +186,25 @@ lex_constant (long *v)
if (errno == 0 && end != p)
{
input_line_pointer = end;
- return 1;
+ return true;
}
- return 0;
+ return false;
}
-static int
+static bfd_boolean
lex_match (char x)
{
char *p = input_line_pointer;
if (*p != x)
- return 0;
+ return false;
input_line_pointer++;
- return 1;
+ return true;
}
-static int
+static bfd_boolean
lex_expression (expressionS *exp)
{
char *ilp = input_line_pointer;
@@ -219,19 +219,19 @@ lex_expression (expressionS *exp)
expression (exp);
if (exp->X_op != O_absent)
- return 1;
+ return true;
fail:
fail_line_pointer = input_line_pointer;
input_line_pointer = ilp;
- return 0;
+ return false;
}
/* Immediate operand.
If EXP_O is non-null, then a symbolic expression is permitted,
in which case, EXP_O will be populated with the parsed expression.
*/
-static int
+static bfd_boolean
lex_imm (long *v, expressionS *exp_o)
{
char *ilp = input_line_pointer;
@@ -253,16 +253,16 @@ lex_imm (long *v, expressionS *exp_o)
}
*v = exp.X_add_number;
- return 1;
+ return true;
fail:
fail_line_pointer = input_line_pointer;
input_line_pointer = ilp;
- return 0;
+ return false;
}
/* Short mmediate operand */
-static int
+static bfd_boolean
lex_imm_e4 (long *val)
{
char *ilp = input_line_pointer;
@@ -270,15 +270,15 @@ lex_imm_e4 (long *val)
{
if ((*val == -1) || (*val > 0 && *val <= 15))
{
- return 1;
+ return true;
}
}
fail_line_pointer = input_line_pointer;
input_line_pointer = ilp;
- return 0;
+ return false;
}
-static int
+static bfd_boolean
lex_match_string (const char *s)
{
char *p = input_line_pointer;
@@ -289,15 +289,15 @@ lex_match_string (const char *s)
size_t len = p - input_line_pointer;
if (len != strlen (s))
- return 0;
+ return false;
if (0 == strncasecmp (s, input_line_pointer, len))
{
input_line_pointer = p;
- return 1;
+ return true;
}
- return 0;
+ return false;
}
/* Parse a register name.
@@ -306,7 +306,7 @@ lex_match_string (const char *s)
On success, REG will be filled with the index of the register which
was successfully scanned.
*/
-static int
+static bfd_boolean
lex_reg_name (uint16_t which, int *reg)
{
char *p = input_line_pointer;
@@ -319,7 +319,7 @@ lex_reg_name (uint16_t which, int *reg)
size_t len = p - input_line_pointer;
if (len <= 0)
- return 0;
+ return false;
int i;
for (i = 0; i < S12Z_N_REGISTERS; ++i)
@@ -333,12 +333,12 @@ lex_reg_name (uint16_t which, int *reg)
{
input_line_pointer = p;
*reg = i;
- return 1;
+ return true;
}
}
}
- return 0;
+ return false;
}
static int
@@ -348,14 +348,14 @@ lex_force_match (char x)
if (*p != x)
{
as_bad (_("Expecting '%c'"), x);
- return 0;
+ return false;
}
input_line_pointer++;
- return 1;
+ return true;
}
-static int
+static bfd_boolean
lex_opr (uint8_t *buffer, int *n_bytes, expressionS *exp,
bool immediate_ok)
{
@@ -371,7 +371,7 @@ lex_opr (uint8_t *buffer, int *n_bytes, expressionS *exp,
if (!immediate_ok)
{
as_bad (_("An immediate value in a source operand is inappropriate"));
- return 0;
+ return false;
}
if (imm > 0)
*xb = imm;
@@ -379,14 +379,14 @@ lex_opr (uint8_t *buffer, int *n_bytes, expressionS *exp,
*xb = 0;
*xb |= 0x70;
*n_bytes = 1;
- return 1;
+ return true;
}
else if (lex_reg_name (REG_BIT_Dn, &reg))
{
*xb = reg;
*xb |= 0xb8;
*n_bytes = 1;
- return 1;
+ return true;
}
else if (lex_match ('['))
{
@@ -457,7 +457,7 @@ lex_opr (uint8_t *buffer, int *n_bytes, expressionS *exp,
}
if (!lex_force_match (']'))
goto fail;
- return 1;
+ return true;
}
else if (lex_match ('('))
{
@@ -618,7 +618,7 @@ lex_opr (uint8_t *buffer, int *n_bytes, expressionS *exp,
if (! lex_match (')'))
goto fail;
- return 1;
+ return true;
}
else if (lex_expression (exp))
{
@@ -658,26 +658,26 @@ lex_opr (uint8_t *buffer, int *n_bytes, expressionS *exp,
buffer[3] = value;
}
}
- return 1;
+ return true;
}
fail:
fail_line_pointer = input_line_pointer;
input_line_pointer = ilp;
- return 0;
+ return false;
}
-static int
+static bfd_boolean
lex_offset (long *val)
{
char *end = NULL;
char *p = input_line_pointer;
if (*p++ != '*')
- return 0;
+ return false;
if (*p != '+' && *p != '-')
- return 0;
+ return false;
bool negative = (*p == '-');
p++;
@@ -689,10 +689,10 @@ lex_offset (long *val)
if (negative)
*val *= -1;
input_line_pointer = end;
- return 1;
+ return true;
}
- return 0;
+ return false;
}
@@ -727,7 +727,7 @@ no_operands (const struct instruction *insn)
if (*input_line_pointer != '\0')
{
as_bad (_("Garbage at end of instruction"));
- return 0;
+ return false;
}
char *f = s12z_new_insn (insn->page);
@@ -736,7 +736,7 @@ no_operands (const struct instruction *insn)
number_to_chars_bigendian (f++, insn->opc, 1);
- return 1;
+ return true;
}
@@ -783,7 +783,7 @@ emit_ext24 (char *f, long v)
return f + 3;
}
-static int
+static bfd_boolean
opr (const struct instruction *insn)
{
uint8_t buffer[4];
@@ -813,16 +813,16 @@ opr (const struct instruction *insn)
emit_opr (f, buffer, n_bytes, &exp);
}
- return 1;
+ return true;
}
- return 0;
+ return false;
}
/* Parse a 15 bit offset, as an expression.
LONG_DISPLACEMENT will be set to true if the offset is wider than 7 bits.
*/
-static int
+static bfd_boolean
lex_15_bit_offset (bool *long_displacement, expressionS *exp)
{
char *ilp = input_line_pointer;
@@ -844,7 +844,7 @@ lex_15_bit_offset (bool *long_displacement, expressionS *exp)
/* If a symbol was parsed we don't know the displacement.
We have to assume it is long, and relax it later if possible. */
*long_displacement = true;
- return 1;
+ return true;
}
}
else
@@ -856,17 +856,17 @@ lex_15_bit_offset (bool *long_displacement, expressionS *exp)
if (val > 0x3FFF || val < -0x4000)
{
as_fatal (_("Offset is outside of 15 bit range"));
- return 0;
+ return false;
}
*long_displacement = (val > 63 || val < -64);
- return 1;
+ return true;
fail:
fail_line_pointer = input_line_pointer;
input_line_pointer = ilp;
- return 0;
+ return false;
}
static void
@@ -897,22 +897,22 @@ emit_15_bit_offset (char *f, int where, expressionS *exp)
}
}
-static int
+static bfd_boolean
rel (const struct instruction *insn)
{
bool long_displacement;
expressionS exp;
if (! lex_15_bit_offset (&long_displacement, &exp))
- return 0;
+ return false;
char *f = s12z_new_insn (long_displacement ? 3 : 2);
number_to_chars_bigendian (f++, insn->opc, 1);
emit_15_bit_offset (f, 3, &exp);
- return 1;
+ return true;
}
-static int
+static bfd_boolean
reg_inh (const struct instruction *insn)
{
int reg;
@@ -923,15 +923,15 @@ reg_inh (const struct instruction *insn)
number_to_chars_bigendian (f++, PAGE2_PREBYTE, 1);
number_to_chars_bigendian (f++, insn->opc + reg, 1);
- return 1;
+ return true;
}
- return 0;
+ return false;
}
/* Special case for CLR X and CLR Y */
-static int
+static bfd_boolean
clr_xy (const struct instruction *insn ATTRIBUTE_UNUSED)
{
int reg;
@@ -939,15 +939,15 @@ clr_xy (const struct instruction *insn ATTRIBUTE_UNUSED)
{
char *f = s12z_new_insn (1);
number_to_chars_bigendian (f, 0x9a + reg - REG_X, 1);
- return 1;
+ return true;
}
- return 0;
+ return false;
}
/* Some instructions have a suffix like ".l", ".b", ".w" etc
which indicates the size of the operands. */
-static int
+static bfd_boolean
size_from_suffix (const struct instruction *insn, int idx)
{
const char *dot = strchr (insn->name, '.');
@@ -977,7 +977,7 @@ size_from_suffix (const struct instruction *insn, int idx)
return size;
}
-static int
+static bfd_boolean
mul_reg_reg_reg (const struct instruction *insn)
{
char *ilp = input_line_pointer;
@@ -1025,16 +1025,16 @@ mul_reg_reg_reg (const struct instruction *insn)
number_to_chars_bigendian (f++, mb, 1);
- return 1;
+ return true;
fail:
fail_line_pointer = input_line_pointer;
input_line_pointer = ilp;
- return 0;
+ return false;
}
-static int
+static bfd_boolean
mul_reg_reg_imm (const struct instruction *insn)
{
char *ilp = input_line_pointer;
@@ -1086,16 +1086,16 @@ mul_reg_reg_imm (const struct instruction *insn)
number_to_chars_bigendian (f++, mb, 1);
number_to_chars_bigendian (f++, imm, size);
- return 1;
+ return true;
fail:
fail_line_pointer = input_line_pointer;
input_line_pointer = ilp;
- return 0;
+ return false;
}
-static int
+static bfd_boolean
mul_reg_reg_opr (const struct instruction *insn)
{
char *ilp = input_line_pointer;
@@ -1149,15 +1149,15 @@ mul_reg_reg_opr (const struct instruction *insn)
emit_opr (f, buffer, n_bytes, &exp);
- return 1;
+ return true;
fail:
fail_line_pointer = input_line_pointer;
input_line_pointer = ilp;
- return 0;
+ return false;
}
-static int
+static bfd_boolean
mul_reg_opr_opr (const struct instruction *insn)
{
char *ilp = input_line_pointer;
@@ -1214,12 +1214,12 @@ mul_reg_opr_opr (const struct instruction *insn)
f = emit_opr (f, buffer1, n_bytes1, &exp1);
f = emit_opr (f, buffer2, n_bytes2, &exp2);
- return 1;
+ return true;
fail:
fail_line_pointer = input_line_pointer;
input_line_pointer = ilp;
- return 0;
+ return false;
}
@@ -1265,16 +1265,16 @@ lex_reg_list (uint16_t grp, uint16_t *reg_bits)
{
int reg;
if (!lex_reg_name (grp, &reg))
- return 0;
+ return false;
*reg_bits |= 0x1u << reg;
lex_reg_list (grp, reg_bits);
}
/* Empty list */
- return 1;
+ return true;
}
-static int
+static bfd_boolean
psh_pull (const struct instruction *insn)
{
uint8_t pb =
@@ -1318,15 +1318,15 @@ psh_pull (const struct instruction *insn)
char *f = s12z_new_insn (2);
number_to_chars_bigendian (f++, insn->opc, 1);
number_to_chars_bigendian (f++, pb, 1);
- return 1;
+ return true;
fail:
fail_line_pointer = input_line_pointer;
- return 0;
+ return false;
}
-static int
+static bfd_boolean
tfr (const struct instruction *insn)
{
int reg1;
@@ -1355,19 +1355,19 @@ tfr (const struct instruction *insn)
number_to_chars_bigendian (f++, insn->opc, 1);
number_to_chars_bigendian (f++, reg1 << 4 | reg2, 1);
- return 1;
+ return true;
fail:
fail_line_pointer = input_line_pointer;
- return 0;
+ return false;
}
-static int
+static bfd_boolean
imm8 (const struct instruction *insn)
{
long imm;
if (! lex_imm (&imm, NULL))
- return 0;
+ return false;
if (imm > 127 || imm < -128)
{
as_bad (_("Immediate value %ld is out of range for instruction %s"),
@@ -1378,10 +1378,10 @@ imm8 (const struct instruction *insn)
number_to_chars_bigendian (f++, insn->opc, 1);
number_to_chars_bigendian (f++, imm, 1);
- return 1;
+ return true;
}
-static int
+static bfd_boolean
reg_imm (const struct instruction *insn, int allowed_reg)
{
char *ilp = input_line_pointer;
@@ -1401,36 +1401,36 @@ reg_imm (const struct instruction *insn, int allowed_reg)
number_to_chars_bigendian (f++, insn->opc + reg, 1);
number_to_chars_bigendian (f++, imm, size);
- return 1;
+ return true;
}
fail:
fail_line_pointer = input_line_pointer;
input_line_pointer = ilp;
- return 0;
+ return false;
}
-static int
+static bfd_boolean
regd_imm (const struct instruction *insn)
{
return reg_imm (insn, REG_BIT_Dn);
}
-static int
+static bfd_boolean
regdxy_imm (const struct instruction *insn)
{
return reg_imm (insn, REG_BIT_Dn | REG_BIT_XY);
}
-static int
+static bfd_boolean
regs_imm (const struct instruction *insn)
{
return reg_imm (insn, 0x1U << REG_S);
}
-static int
+static bfd_boolean
trap_imm (const struct instruction *insn ATTRIBUTE_UNUSED)
{
long imm = -1;
@@ -1442,27 +1442,27 @@ trap_imm (const struct instruction *insn ATTRIBUTE_UNUSED)
(imm >= 0xB0 && imm <= 0xB7))
{
as_bad (_("trap value %ld is not valid"), imm);
- return 0;
+ return false;
}
else
{
char *f = s12z_new_insn (2);
number_to_chars_bigendian (f++, PAGE2_PREBYTE, 1);
number_to_chars_bigendian (f++, imm & 0xFF, 1);
- return 1;
+ return true;
}
- return 1;
+ return true;
fail:
fail_line_pointer = input_line_pointer;
- return 0;
+ return false;
}
/* Special one byte instruction CMP X, Y */
-static int
+static bfd_boolean
regx_regy (const struct instruction *insn)
{
int reg;
@@ -1474,15 +1474,15 @@ regx_regy (const struct instruction *insn)
{
char *f = s12z_new_insn (1);
number_to_chars_bigendian (f, insn->opc, 1);
- return 1;
+ return true;
}
}
}
- return 0;
+ return false;
}
/* Special one byte instruction SUB D6, X, Y */
-static int
+static bfd_boolean
regd6_regx_regy (const struct instruction *insn)
{
char *ilp = input_line_pointer;
@@ -1504,16 +1504,16 @@ regd6_regx_regy (const struct instruction *insn)
char *f = s12z_new_insn (1);
number_to_chars_bigendian (f, insn->opc, 1);
- return 1;
+ return true;
fail:
fail_line_pointer = input_line_pointer;
input_line_pointer = ilp;
- return 0;
+ return false;
}
/* Special one byte instruction SUB D6, Y, X */
-static int
+static bfd_boolean
regd6_regy_regx (const struct instruction *insn)
{
char *ilp = input_line_pointer;
@@ -1535,15 +1535,15 @@ regd6_regy_regx (const struct instruction *insn)
char *f = s12z_new_insn (1);
number_to_chars_bigendian (f, insn->opc, 1);
- return 1;
+ return true;
fail:
fail_line_pointer = input_line_pointer;
input_line_pointer = ilp;
- return 0;
+ return false;
}
-static int
+static bfd_boolean
reg_opr (const struct instruction *insn, int allowed_regs,
bool immediate_ok)
{
@@ -1586,31 +1586,31 @@ reg_opr (const struct instruction *insn, int allowed_regs,
emit_opr (f, buffer, n_bytes, &exp);
}
- return 1;
+ return true;
}
}
fail:
fail_line_pointer = input_line_pointer;
input_line_pointer = ilp;
- return 0;
+ return false;
}
-static int
+static bfd_boolean
regdxy_opr_dest (const struct instruction *insn)
{
return reg_opr (insn, REG_BIT_Dn | REG_BIT_XY, false);
}
-static int
+static bfd_boolean
regdxy_opr_src (const struct instruction *insn)
{
return reg_opr (insn, REG_BIT_Dn | REG_BIT_XY, true);
}
-static int
+static bfd_boolean
regd_opr (const struct instruction *insn)
{
return reg_opr (insn, REG_BIT_Dn, true);
@@ -1618,20 +1618,20 @@ regd_opr (const struct instruction *insn)
/* OP0: S; OP1: destination OPR */
-static int
+static bfd_boolean
regs_opr_dest (const struct instruction *insn)
{
return reg_opr (insn, 0x1U << REG_S, false);
}
/* OP0: S; OP1: source OPR */
-static int
+static bfd_boolean
regs_opr_src (const struct instruction *insn)
{
return reg_opr (insn, 0x1U << REG_S, true);
}
-static int
+static bfd_boolean
imm_opr (const struct instruction *insn)
{
char *ilp = input_line_pointer;
@@ -1671,15 +1671,15 @@ imm_opr (const struct instruction *insn)
emit_opr (f, buffer, n_bytes, &exp1);
- return 1;
+ return true;
fail:
fail_line_pointer = input_line_pointer;
input_line_pointer = ilp;
- return 0;
+ return false;
}
-static int
+static bfd_boolean
opr_opr (const struct instruction *insn)
{
char *ilp = input_line_pointer;
@@ -1706,38 +1706,38 @@ opr_opr (const struct instruction *insn)
f = emit_opr (f, buffer1, n_bytes1, &exp1);
f = emit_opr (f, buffer2, n_bytes2, &exp2);
- return 1;
+ return true;
fail:
fail_line_pointer = input_line_pointer;
input_line_pointer = ilp;
- return 0;
+ return false;
}
-static int
+static bfd_boolean
reg67sxy_opr (const struct instruction *insn)
{
int reg;
if (!lex_reg_name (REG_BIT_XYS | (0x1U << REG_D6) | (0x1U << REG_D7), &reg))
- return 0;
+ return false;
if (!lex_match (','))
- return 0;
+ return false;
uint8_t buffer[4];
int n_bytes;
expressionS exp;
if (!lex_opr (buffer, &n_bytes, &exp, false))
- return 0;
+ return false;
char *f = s12z_new_insn (1 + n_bytes);
number_to_chars_bigendian (f++, insn->opc + reg - REG_D6, 1);
emit_opr (f, buffer, n_bytes, &exp);
- return 1;
+ return true;
}
-static int
+static bfd_boolean
rotate (const struct instruction *insn, short dir)
{
uint8_t buffer[4];
@@ -1757,19 +1757,19 @@ rotate (const struct instruction *insn, short dir)
number_to_chars_bigendian (f++, sb, 1);
emit_opr (f, buffer, n_bytes, &exp);
- return 1;
+ return true;
}
- return 0;
+ return false;
}
-static int
+static bfd_boolean
rol (const struct instruction *insn)
{
return rotate (insn, 1);
}
-static int
+static bfd_boolean
ror (const struct instruction *insn)
{
return rotate (insn, 0);
@@ -1780,7 +1780,7 @@ ror (const struct instruction *insn)
left = 1; right = 0;
logical = 0; arithmetic = 1;
*/
-static int
+static bfd_boolean
lex_shift_reg_imm1 (const struct instruction *insn, short type, short dir)
{
/*
@@ -1830,18 +1830,18 @@ lex_shift_reg_imm1 (const struct instruction *insn, short type, short dir)
number_to_chars_bigendian (f++, sb, 1);
emit_opr (f, buffer, n_bytes, &exp);
- return 1;
+ return true;
fail:
fail_line_pointer = input_line_pointer;
input_line_pointer = ilp;
- return 0;
+ return false;
}
/* Shift instruction with a register operand.
left = 1; right = 0;
logical = 0; arithmetic = 1; */
-static int
+static bfd_boolean
lex_shift_reg (const struct instruction *insn, short type, short dir)
{
int Dd, Ds, Dn;
@@ -1875,7 +1875,7 @@ lex_shift_reg (const struct instruction *insn, short type, short dir)
xb |= Dn;
number_to_chars_bigendian (f++, xb, 1);
- return 1;
+ return true;
}
else if (lex_imm (&imm, NULL))
{
@@ -1906,12 +1906,12 @@ lex_shift_reg (const struct instruction *insn, short type, short dir)
number_to_chars_bigendian (f++, xb, 1);
}
- return 1;
+ return true;
}
fail:
fail_line_pointer = input_line_pointer;
- return 0;
+ return false;
}
static void
@@ -1947,7 +1947,7 @@ impute_shift_dir_and_type (const struct instruction *insn, short *type, short *d
}
/* Shift instruction with a OPR operand */
-static int
+static bfd_boolean
shift_two_operand (const struct instruction *insn)
{
uint8_t sb = 0x34;
@@ -1986,16 +1986,16 @@ shift_two_operand (const struct instruction *insn)
number_to_chars_bigendian (f++, sb, 1);
emit_opr (f, buffer, n_opr_bytes, &exp);
- return 1;
+ return true;
fail:
fail_line_pointer = input_line_pointer;
input_line_pointer = ilp;
- return 0;
+ return false;
}
/* Shift instruction with a OPR operand */
-static int
+static bfd_boolean
shift_opr_imm (const struct instruction *insn)
{
char *ilp = input_line_pointer;
@@ -2083,16 +2083,16 @@ shift_opr_imm (const struct instruction *insn)
f = emit_opr (f, buffer2, n_opr_bytes2, &exp2);
}
- return 1;
+ return true;
fail:
fail_line_pointer = input_line_pointer;
input_line_pointer = ilp;
- return 0;
+ return false;
}
/* Shift instruction with a register operand */
-static int
+static bfd_boolean
shift_reg (const struct instruction *insn)
{
short dir = -1;
@@ -2100,12 +2100,12 @@ shift_reg (const struct instruction *insn)
impute_shift_dir_and_type (insn, &type, &dir);
if (lex_shift_reg_imm1 (insn, type, dir))
- return 1;
+ return true;
return lex_shift_reg (insn, type, dir);
}
-static int
+static bfd_boolean
bm_regd_imm (const struct instruction *insn)
{
char *ilp = input_line_pointer;
@@ -2128,15 +2128,15 @@ bm_regd_imm (const struct instruction *insn)
number_to_chars_bigendian (f++, insn->opc, 1);
number_to_chars_bigendian (f++, bm, 1);
- return 1;
+ return true;
fail:
fail_line_pointer = input_line_pointer;
input_line_pointer = ilp;
- return 0;
+ return false;
}
-static int
+static bfd_boolean
bm_opr_reg (const struct instruction *insn)
{
char *ilp = input_line_pointer;
@@ -2166,16 +2166,16 @@ bm_opr_reg (const struct instruction *insn)
emit_opr (f, buffer, n_opr_bytes, &exp);
- return 1;
+ return true;
fail:
fail_line_pointer = input_line_pointer;
input_line_pointer = ilp;
- return 0;
+ return false;
}
-static int
+static bfd_boolean
bm_opr_imm (const struct instruction *insn)
{
char *ilp = input_line_pointer;
@@ -2217,16 +2217,16 @@ bm_opr_imm (const struct instruction *insn)
number_to_chars_bigendian (f++, bm, 1);
emit_opr (f, buffer, n_opr_bytes, &exp);
- return 1;
+ return true;
fail:
fail_line_pointer = input_line_pointer;
input_line_pointer = ilp;
- return 0;
+ return false;
}
-static int
+static bfd_boolean
bm_regd_reg (const struct instruction *insn)
{
char *ilp = input_line_pointer;
@@ -2251,19 +2251,19 @@ bm_regd_reg (const struct instruction *insn)
number_to_chars_bigendian (f++, bm, 1);
number_to_chars_bigendian (f++, xb, 1);
- return 1;
+ return true;
fail:
fail_line_pointer = input_line_pointer;
input_line_pointer = ilp;
- return 0;
+ return false;
}
-static int
+static bfd_boolean
bf_reg_opr_imm (const struct instruction *insn, short ie)
{
char *ilp = input_line_pointer;
@@ -2324,16 +2324,16 @@ bf_reg_opr_imm (const struct instruction *insn, short ie)
emit_opr (f, buffer, n_bytes, &exp);
- return 1;
+ return true;
fail:
fail_line_pointer = input_line_pointer;
input_line_pointer = ilp;
- return 0;
+ return false;
}
-static int
+static bfd_boolean
bf_opr_reg_imm (const struct instruction *insn, short ie)
{
char *ilp = input_line_pointer;
@@ -2393,17 +2393,17 @@ bf_opr_reg_imm (const struct instruction *insn, short ie)
emit_opr (f, buffer, n_bytes, &exp);
- return 1;
+ return true;
fail:
fail_line_pointer = input_line_pointer;
input_line_pointer = ilp;
- return 0;
+ return false;
}
-static int
+static bfd_boolean
bf_reg_reg_imm (const struct instruction *insn, short ie)
{
char *ilp = input_line_pointer;
@@ -2458,15 +2458,15 @@ bf_reg_reg_imm (const struct instruction *insn, short ie)
number_to_chars_bigendian (f++, bb, 1);
number_to_chars_bigendian (f++, i1, 1);
- return 1;
+ return true;
fail:
fail_line_pointer = input_line_pointer;
input_line_pointer = ilp;
- return 0;
+ return false;
}
-static int
+static bfd_boolean
bf_reg_reg_reg (const struct instruction *insn ATTRIBUTE_UNUSED, short ie)
{
char *ilp = input_line_pointer;
@@ -2501,15 +2501,15 @@ bf_reg_reg_reg (const struct instruction *insn ATTRIBUTE_UNUSED, short ie)
number_to_chars_bigendian (f++, 0x08 | Dd, 1);
number_to_chars_bigendian (f++, bb , 1);
- return 1;
+ return true;
fail:
fail_line_pointer = input_line_pointer;
input_line_pointer = ilp;
- return 0;
+ return false;
}
-static int
+static bfd_boolean
bf_opr_reg_reg (const struct instruction *insn, short ie)
{
char *ilp = input_line_pointer;
@@ -2553,16 +2553,16 @@ bf_opr_reg_reg (const struct instruction *insn, short ie)
emit_opr (f, buffer, n_bytes, &exp);
- return 1;
+ return true;
fail:
fail_line_pointer = input_line_pointer;
input_line_pointer = ilp;
- return 0;
+ return false;
}
-static int
+static bfd_boolean
bf_reg_opr_reg (const struct instruction *insn, short ie)
{
char *ilp = input_line_pointer;
@@ -2604,85 +2604,85 @@ bf_reg_opr_reg (const struct instruction *insn, short ie)
emit_opr (f, buffer, n_bytes, &exp);
- return 1;
+ return true;
fail:
fail_line_pointer = input_line_pointer;
input_line_pointer = ilp;
- return 0;
+ return false;
}
-static int
+static bfd_boolean
bfe_reg_reg_reg (const struct instruction *insn)
{
return bf_reg_reg_reg (insn, 0);
}
-static int
+static bfd_boolean
bfi_reg_reg_reg (const struct instruction *insn)
{
return bf_reg_reg_reg (insn, 1);
}
-static int
+static bfd_boolean
bfe_reg_reg_imm (const struct instruction *insn)
{
return bf_reg_reg_imm (insn, 0);
}
-static int
+static bfd_boolean
bfi_reg_reg_imm (const struct instruction *insn)
{
return bf_reg_reg_imm (insn, 1);
}
-static int
+static bfd_boolean
bfe_reg_opr_reg (const struct instruction *insn)
{
return bf_reg_opr_reg (insn, 0);
}
-static int
+static bfd_boolean
bfi_reg_opr_reg (const struct instruction *insn)
{
return bf_reg_opr_reg (insn, 1);
}
-static int
+static bfd_boolean
bfe_opr_reg_reg (const struct instruction *insn)
{
return bf_opr_reg_reg (insn, 0);
}
-static int
+static bfd_boolean
bfi_opr_reg_reg (const struct instruction *insn)
{
return bf_opr_reg_reg (insn, 1);
}
-static int
+static bfd_boolean
bfe_reg_opr_imm (const struct instruction *insn)
{
return bf_reg_opr_imm (insn, 0);
}
-static int
+static bfd_boolean
bfi_reg_opr_imm (const struct instruction *insn)
{
return bf_reg_opr_imm (insn, 1);
}
-static int
+static bfd_boolean
bfe_opr_reg_imm (const struct instruction *insn)
{
return bf_opr_reg_imm (insn, 0);
}
-static int
+static bfd_boolean
bfi_opr_reg_imm (const struct instruction *insn)
{
return bf_opr_reg_imm (insn, 1);
@@ -2691,7 +2691,7 @@ bfi_opr_reg_imm (const struct instruction *insn)
-static int
+static bfd_boolean
tb_reg_rel (const struct instruction *insn)
{
char *ilp = input_line_pointer;
@@ -2751,16 +2751,16 @@ tb_reg_rel (const struct instruction *insn)
emit_15_bit_offset (f, 4, &exp);
- return 1;
+ return true;
fail:
fail_line_pointer = input_line_pointer;
input_line_pointer = ilp;
- return 0;
+ return false;
}
-static int
+static bfd_boolean
tb_opr_rel (const struct instruction *insn)
{
char *ilp = input_line_pointer;
@@ -2817,18 +2817,18 @@ tb_opr_rel (const struct instruction *insn)
emit_15_bit_offset (f, n_bytes + 4, &exp2);
- return 1;
+ return true;
fail:
fail_line_pointer = input_line_pointer;
input_line_pointer = ilp;
- return 0;
+ return false;
}
-static int
+static bfd_boolean
test_br_reg_reg_rel (const struct instruction *insn)
{
char *ilp = input_line_pointer;
@@ -2867,15 +2867,15 @@ test_br_reg_reg_rel (const struct instruction *insn)
emit_15_bit_offset (f, 5, &exp);
- return 1;
+ return true;
fail:
fail_line_pointer = input_line_pointer;
input_line_pointer = ilp;
- return 0;
+ return false;
}
-static int
+static bfd_boolean
test_br_opr_reg_rel (const struct instruction *insn)
{
char *ilp = input_line_pointer;
@@ -2915,16 +2915,16 @@ test_br_opr_reg_rel (const struct instruction *insn)
emit_15_bit_offset (f, n, &exp2);
- return 1;
+ return true;
fail:
fail_line_pointer = input_line_pointer;
input_line_pointer = ilp;
- return 0;
+ return false;
}
-static int
+static bfd_boolean
test_br_opr_imm_rel (const struct instruction *insn)
{
char *ilp = input_line_pointer;
@@ -2970,16 +2970,16 @@ test_br_opr_imm_rel (const struct instruction *insn)
emit_15_bit_offset (f, n_bytes + 4, &exp2);
- return 1;
+ return true;
fail:
fail_line_pointer = input_line_pointer;
input_line_pointer = ilp;
- return 0;
+ return false;
}
-static int
+static bfd_boolean
test_br_reg_imm_rel (const struct instruction *insn)
{
char *ilp = input_line_pointer;
@@ -3016,12 +3016,12 @@ test_br_reg_imm_rel (const struct instruction *insn)
emit_15_bit_offset (f, 4, &exp);
- return 1;
+ return true;
fail:
fail_line_pointer = input_line_pointer;
input_line_pointer = ilp;
- return 0;
+ return false;
}
@@ -3782,7 +3782,7 @@ long
s12z_relax_frag (segT seg ATTRIBUTE_UNUSED, fragS *fragP ATTRIBUTE_UNUSED,
long stretch ATTRIBUTE_UNUSED)
{
- return 0;
+ return false;
}
void
@@ -3801,7 +3801,7 @@ md_convert_frag (bfd *abfd ATTRIBUTE_UNUSED, asection *sec ATTRIBUTE_UNUSED,
int
md_estimate_size_before_relax (fragS *fragP ATTRIBUTE_UNUSED, asection *segment ATTRIBUTE_UNUSED)
{
- return 0;
+ return false;
}
@@ -3843,10 +3843,10 @@ tc_s12z_force_relocation (fixS *fixP)
we need to make sure that the linker relaxation is done
correctly, so in some cases we force the original symbol to be
used. */
-int
+bfd_boolean
tc_s12z_fix_adjustable (fixS *fixP ATTRIBUTE_UNUSED)
{
- return 1;
+ return true;
}
void