diff options
Diffstat (limited to 'gas/config/tc-msp430.c')
-rw-r--r-- | gas/config/tc-msp430.c | 276 |
1 files changed, 138 insertions, 138 deletions
diff --git a/gas/config/tc-msp430.c b/gas/config/tc-msp430.c index d33a18d..d834c00 100644 --- a/gas/config/tc-msp430.c +++ b/gas/config/tc-msp430.c @@ -263,13 +263,13 @@ typedef enum msp_isa static enum msp_isa selected_isa = MSP_ISA_430Xv2; -static inline bfd_boolean +static inline bool target_is_430x (void) { return selected_isa >= MSP_ISA_430X; } -static inline bfd_boolean +static inline bool target_is_430xv2 (void) { return selected_isa == MSP_ISA_430Xv2; @@ -674,21 +674,21 @@ extract_word (char * from, char * to, int limit) #define OPTION_RELAX 'Q' #define OPTION_POLYMORPHS 'P' #define OPTION_LARGE 'l' -static bfd_boolean large_model = FALSE; +static bool large_model = false; #define OPTION_NO_INTR_NOPS 'N' #define OPTION_INTR_NOPS 'n' -static bfd_boolean gen_interrupt_nops = FALSE; +static bool gen_interrupt_nops = false; #define OPTION_WARN_INTR_NOPS 'y' #define OPTION_NO_WARN_INTR_NOPS 'Y' -static bfd_boolean warn_interrupt_nops = TRUE; +static bool warn_interrupt_nops = true; #define OPTION_UNKNOWN_INTR_NOPS 'u' #define OPTION_NO_UNKNOWN_INTR_NOPS 'U' -static bfd_boolean do_unknown_interrupt_nops = TRUE; +static bool do_unknown_interrupt_nops = true; #define OPTION_MCPU 'c' #define OPTION_DATA_REGION 'r' -static bfd_boolean upper_data_region_in_use = FALSE; +static bool upper_data_region_in_use = false; /* The default is to use the lower region only. */ -static bfd_boolean lower_data_region_only = TRUE; +static bool lower_data_region_only = true; /* Deprecated option, silently ignore it for compatibility with GCC <= 10. */ #define OPTION_MOVE_DATA 'd' @@ -1444,28 +1444,28 @@ md_parse_option (int c, const char * arg) return 1; case OPTION_LARGE: - large_model = TRUE; + large_model = true; return 1; case OPTION_NO_INTR_NOPS: - gen_interrupt_nops = FALSE; + gen_interrupt_nops = false; return 1; case OPTION_INTR_NOPS: - gen_interrupt_nops = TRUE; + gen_interrupt_nops = true; return 1; case OPTION_WARN_INTR_NOPS: - warn_interrupt_nops = TRUE; + warn_interrupt_nops = true; return 1; case OPTION_NO_WARN_INTR_NOPS: - warn_interrupt_nops = FALSE; + warn_interrupt_nops = false; return 1; case OPTION_UNKNOWN_INTR_NOPS: - do_unknown_interrupt_nops = TRUE; + do_unknown_interrupt_nops = true; return 1; case OPTION_NO_UNKNOWN_INTR_NOPS: - do_unknown_interrupt_nops = FALSE; + do_unknown_interrupt_nops = false; return 1; case OPTION_MOVE_DATA: @@ -1475,14 +1475,14 @@ md_parse_option (int c, const char * arg) case OPTION_DATA_REGION: if (strcmp (arg, "upper") == 0 || strcmp (arg, "either") == 0) - upper_data_region_in_use = TRUE; + upper_data_region_in_use = true; if (strcmp (arg, "upper") == 0 || strcmp (arg, "either") == 0 /* With data-region=none, the compiler has generated code assuming data could be in the upper region, but nothing has been explicitly placed there. */ || strcmp (arg, "none") == 0) - lower_data_region_only = FALSE; + lower_data_region_only = false; return 1; } @@ -1826,7 +1826,7 @@ extract_cmd (char * from, char * to, int limit) 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 @@ -1845,7 +1845,7 @@ md_begin (void) linkrelax = 1; } -static inline bfd_boolean +static inline bool is_regname_end (char c) { return (c == 0 || ! ISALNUM (c)); @@ -1895,9 +1895,9 @@ static int msp430_srcoperand (struct msp430_operand_s * op, char * l, int bin, - bfd_boolean * imm_op, - bfd_boolean allow_20bit_values, - bfd_boolean constants_allowed) + bool * imm_op, + bool allow_20bit_values, + bool constants_allowed) { char * end; char *__tl = l; @@ -1918,7 +1918,7 @@ msp430_srcoperand (struct msp430_operand_s * op, hhi(x) - x = (x >> 48) & 0xffff The value _MUST_ be an immediate expression: #hlo(1231231231). */ - *imm_op = TRUE; + *imm_op = true; if (strncasecmp (h, "#llo(", 5) == 0) { @@ -2250,7 +2250,7 @@ msp430_srcoperand (struct msp430_operand_s * op, char *m = strrchr (l, ')'); char *t; - *imm_op = TRUE; + *imm_op = true; if (!h) break; @@ -2374,10 +2374,10 @@ static int msp430_dstoperand (struct msp430_operand_s * op, char * l, int bin, - bfd_boolean allow_20bit_values, - bfd_boolean constants_allowed) + bool allow_20bit_values, + bool constants_allowed) { - bfd_boolean dummy; + bool dummy; int ret = msp430_srcoperand (op, l, bin, & dummy, allow_20bit_values, constants_allowed); @@ -2420,7 +2420,7 @@ msp430_dstoperand (struct msp430_operand_s * op, will be returned if a pointer is provided. */ static int -try_encode_mova (bfd_boolean imm_op, +try_encode_mova (bool imm_op, int bin, struct msp430_operand_s * op1, struct msp430_operand_s * op2, @@ -2458,7 +2458,7 @@ try_encode_mova (bfd_boolean imm_op, else { bfd_putl16 ((bfd_vma) bin, frag); - fix_new_exp (frag_now, where, 4, &(op1->exp), FALSE, + fix_new_exp (frag_now, where, 4, &(op1->exp), false, BFD_RELOC_MSP430X_ABS20_ADR_SRC); bfd_putl16 ((bfd_vma) ZEROS, frag + 2); } @@ -2486,7 +2486,7 @@ try_encode_mova (bfd_boolean imm_op, else { bfd_putl16 ((bfd_vma) ZEROS, frag + 2); - fix_new_exp (frag_now, where + 2, 2, &(op1->exp), FALSE, + fix_new_exp (frag_now, where + 2, 2, &(op1->exp), false, op1->reg == 0 ? BFD_RELOC_MSP430X_PCR16 : BFD_RELOC_MSP430X_ABS16); @@ -2527,7 +2527,7 @@ try_encode_mova (bfd_boolean imm_op, { bfd_putl16 ((bfd_vma) bin, frag); bfd_putl16 ((bfd_vma) ZEROS, frag + 2); - fix_new_exp (frag_now, where, 4, &(op2->exp), FALSE, + fix_new_exp (frag_now, where, 4, &(op2->exp), false, BFD_RELOC_MSP430X_ABS20_ADR_DST); } return 4; @@ -2552,7 +2552,7 @@ try_encode_mova (bfd_boolean imm_op, else { bfd_putl16 ((bfd_vma) ZEROS, frag + 2); - fix_new_exp (frag_now, where + 2, 2, &(op2->exp), FALSE, + fix_new_exp (frag_now, where + 2, 2, &(op2->exp), false, op2->reg == 0 ? BFD_RELOC_MSP430X_PCR16 : BFD_RELOC_MSP430X_ABS16); @@ -2566,7 +2566,7 @@ try_encode_mova (bfd_boolean imm_op, } } - /* imm_op == FALSE. */ + /* imm_op == false. */ if (op1->reg == 2 && op1->am == 1 && op1->mode == OP_EXP) { @@ -2598,7 +2598,7 @@ try_encode_mova (bfd_boolean imm_op, { bfd_putl16 ((bfd_vma) bin, frag); bfd_putl16 ((bfd_vma) ZEROS, frag + 2); - fix_new_exp (frag_now, where, 4, &(op1->exp), FALSE, + fix_new_exp (frag_now, where, 4, &(op1->exp), false, BFD_RELOC_MSP430X_ABS20_ADR_SRC); } return 4; @@ -2720,7 +2720,7 @@ gen_nop (void) /* Insert/inform about adding a NOP if this insn enables interrupts. */ static void -warn_eint_nop (bfd_boolean prev_insn_is_nop, bfd_boolean prev_insn_is_dint) +warn_eint_nop (bool prev_insn_is_nop, bool prev_insn_is_dint) { if (prev_insn_is_nop /* If the last insn was a DINT, we will have already warned that a NOP is @@ -2744,8 +2744,8 @@ warn_eint_nop (bfd_boolean prev_insn_is_nop, bfd_boolean prev_insn_is_dint) to insert/warn about adding a NOP before the current insn. */ static void -warn_unsure_interrupt (bfd_boolean prev_insn_is_nop, - bfd_boolean prev_insn_is_dint) +warn_unsure_interrupt (bool prev_insn_is_nop, + bool prev_insn_is_dint) { if (prev_insn_is_nop /* If the last insn was a DINT, we will have already warned that a NOP is @@ -2780,22 +2780,22 @@ msp430_operands (struct msp430_opcode_s * opcode, char * line) struct msp430_operand_s op1, op2; int res = 0; static short ZEROS = 0; - bfd_boolean byte_op, imm_op; + bool byte_op, imm_op; int op_length = 0; int fmt; int extended = 0x1800; - bfd_boolean extended_op = FALSE; - bfd_boolean addr_op; + bool extended_op = false; + bool addr_op; const char * error_message; static signed int repeat_count = 0; - static bfd_boolean prev_insn_is_nop = FALSE; - static bfd_boolean prev_insn_is_dint = FALSE; - static bfd_boolean prev_insn_is_eint = FALSE; + static bool prev_insn_is_nop = false; + static bool prev_insn_is_dint = false; + static bool prev_insn_is_eint = false; /* We might decide before the end of the function that the current insn is equivalent to DINT/EINT. */ - bfd_boolean this_insn_is_dint = FALSE; - bfd_boolean this_insn_is_eint = FALSE; - bfd_boolean fix_emitted; + bool this_insn_is_dint = false; + bool this_insn_is_eint = false; + bool fix_emitted; /* Opcode is the one from opcodes table line contains something like @@ -2803,11 +2803,11 @@ msp430_operands (struct msp430_opcode_s * opcode, char * line) or .b @r2+, 5(R1). */ - byte_op = FALSE; - addr_op = FALSE; + byte_op = false; + addr_op = false; if (*line == '.') { - bfd_boolean check = FALSE; + bool check = false; ++ line; switch (TOLOWER (* line)) @@ -2815,20 +2815,20 @@ msp430_operands (struct msp430_opcode_s * opcode, char * line) case 'b': /* Byte operation. */ bin |= BYTE_OPERATION; - byte_op = TRUE; - check = TRUE; + byte_op = true; + check = true; break; case 'a': /* "Address" ops work on 20-bit values. */ - addr_op = TRUE; + addr_op = true; bin |= BYTE_OPERATION; - check = TRUE; + check = true; break; case 'w': /* Word operation - this is the default. */ - check = TRUE; + check = true; break; case 0: @@ -2879,7 +2879,7 @@ msp430_operands (struct msp430_opcode_s * opcode, char * line) #if 0 /* Enable for debugging. */ as_warn ("treating %s.a as %s", old_name, real_name); #endif - addr_op = FALSE; + addr_op = false; bin = opcode->bin_opcode; } @@ -2899,7 +2899,7 @@ msp430_operands (struct msp430_opcode_s * opcode, char * line) memset (&op1, 0, sizeof (op1)); memset (&op2, 0, sizeof (op2)); - imm_op = FALSE; + imm_op = false; if ((fmt = opcode->fmt) < 0) { @@ -2911,7 +2911,7 @@ msp430_operands (struct msp430_opcode_s * opcode, char * line) } fmt = (-fmt) - 1; - extended_op = TRUE; + extended_op = true; } if (repeat_count) @@ -3053,7 +3053,7 @@ msp430_operands (struct msp430_opcode_s * opcode, char * line) case 1: /* Something which works with destination operand. */ line = extract_operand (line, l1, sizeof (l1)); - res = msp430_dstoperand (&op1, l1, opcode->bin_opcode, extended_op, TRUE); + res = msp430_dstoperand (&op1, l1, opcode->bin_opcode, extended_op, true); if (res) break; @@ -3111,10 +3111,10 @@ msp430_operands (struct msp430_opcode_s * opcode, char * line) extended |= ((op1.exp.X_add_number >> 16) & 0xf) << 7; else if (op1.reg || op1.am == 3) /* Not PC relative. */ - fix_new_exp (frag_now, where, 6, &(op1.exp), FALSE, + fix_new_exp (frag_now, where, 6, &(op1.exp), false, BFD_RELOC_MSP430X_ABS20_EXT_SRC); else - fix_new_exp (frag_now, where, 6, &(op1.exp), FALSE, + fix_new_exp (frag_now, where, 6, &(op1.exp), false, BFD_RELOC_MSP430X_PCR20_EXT_SRC); } @@ -3142,10 +3142,10 @@ msp430_operands (struct msp430_opcode_s * opcode, char * line) { if (op1.reg) fix_new_exp (frag_now, where, 2, - &(op1.exp), FALSE, CHECK_RELOC_MSP430 (op1)); + &(op1.exp), false, CHECK_RELOC_MSP430 (op1)); else fix_new_exp (frag_now, where, 2, - &(op1.exp), TRUE, CHECK_RELOC_MSP430_PCREL); + &(op1.exp), true, CHECK_RELOC_MSP430_PCREL); } } } @@ -3158,8 +3158,8 @@ msp430_operands (struct msp430_opcode_s * opcode, char * line) line = extract_operand (line, l1, sizeof (l1)); strncpy (l2, l1, sizeof (l2)); l2[sizeof (l2) - 1] = '\0'; - res = msp430_srcoperand (&op1, l1, opcode->bin_opcode, &imm_op, extended_op, TRUE); - res += msp430_dstoperand (&op2, l2, opcode->bin_opcode, extended_op, TRUE); + res = msp430_srcoperand (&op1, l1, opcode->bin_opcode, &imm_op, extended_op, true); + res += msp430_dstoperand (&op2, l2, opcode->bin_opcode, extended_op, true); if (res) break; /* An error occurred. All warnings were done before. */ @@ -3212,10 +3212,10 @@ msp430_operands (struct msp430_opcode_s * opcode, char * line) extended |= ((op1.exp.X_add_number >> 16) & 0xf) << 7; else if (op1.reg || op1.am == 3) /* Not PC relative. */ - fix_new_exp (frag_now, where, 6, &(op1.exp), FALSE, + fix_new_exp (frag_now, where, 6, &(op1.exp), false, BFD_RELOC_MSP430X_ABS20_EXT_SRC); else - fix_new_exp (frag_now, where, 6, &(op1.exp), FALSE, + fix_new_exp (frag_now, where, 6, &(op1.exp), false, BFD_RELOC_MSP430X_PCR20_EXT_SRC); } @@ -3225,11 +3225,11 @@ msp430_operands (struct msp430_opcode_s * opcode, char * line) extended |= (op2.exp.X_add_number >> 16) & 0xf; else if (op1.mode == OP_EXP) - fix_new_exp (frag_now, where, 8, &(op2.exp), FALSE, + fix_new_exp (frag_now, where, 8, &(op2.exp), false, op2.reg ? BFD_RELOC_MSP430X_ABS20_EXT_ODST : BFD_RELOC_MSP430X_PCR20_EXT_ODST); else - fix_new_exp (frag_now, where, 6, &(op2.exp), FALSE, + fix_new_exp (frag_now, where, 6, &(op2.exp), false, op2.reg ? BFD_RELOC_MSP430X_ABS20_EXT_DST : BFD_RELOC_MSP430X_PCR20_EXT_DST); } @@ -3259,10 +3259,10 @@ msp430_operands (struct msp430_opcode_s * opcode, char * line) { if (op1.reg || op1.am == 3) /* Not PC relative. */ fix_new_exp (frag_now, where, 2, - &(op1.exp), FALSE, CHECK_RELOC_MSP430 (op1)); + &(op1.exp), false, CHECK_RELOC_MSP430 (op1)); else fix_new_exp (frag_now, where, 2, - &(op1.exp), TRUE, CHECK_RELOC_MSP430_PCREL); + &(op1.exp), true, CHECK_RELOC_MSP430_PCREL); } } frag += 2; @@ -3283,10 +3283,10 @@ msp430_operands (struct msp430_opcode_s * opcode, char * line) { if (op2.reg) /* Not PC relative. */ fix_new_exp (frag_now, where, 2, - &(op2.exp), FALSE, CHECK_RELOC_MSP430 (op2)); + &(op2.exp), false, CHECK_RELOC_MSP430 (op2)); else fix_new_exp (frag_now, where, 2, - &(op2.exp), TRUE, CHECK_RELOC_MSP430_PCREL); + &(op2.exp), true, CHECK_RELOC_MSP430_PCREL); } } } @@ -3303,12 +3303,12 @@ msp430_operands (struct msp430_opcode_s * opcode, char * line) } line = extract_operand (line, l1, sizeof (l1)); - res = msp430_srcoperand (&op1, l1, opcode->bin_opcode, &imm_op, extended_op, FALSE); + res = msp430_srcoperand (&op1, l1, opcode->bin_opcode, &imm_op, extended_op, false); if (res) break; - byte_op = FALSE; - imm_op = FALSE; + byte_op = false; + imm_op = false; bin |= ((op1.reg << 8) | (op1.am << 4)); op_length = 2 + 2 * op1.ol; frag = frag_more (op_length); @@ -3329,10 +3329,10 @@ msp430_operands (struct msp430_opcode_s * opcode, char * line) if (op1.reg || op1.am == 3) fix_new_exp (frag_now, where, 2, - &(op1.exp), FALSE, CHECK_RELOC_MSP430 (op1)); + &(op1.exp), false, CHECK_RELOC_MSP430 (op1)); else fix_new_exp (frag_now, where, 2, - &(op1.exp), TRUE, CHECK_RELOC_MSP430_PCREL); + &(op1.exp), true, CHECK_RELOC_MSP430_PCREL); } } @@ -3341,17 +3341,17 @@ msp430_operands (struct msp430_opcode_s * opcode, char * line) case 4: /* CALLA instructions. */ - fix_emitted = FALSE; + fix_emitted = false; line = extract_operand (line, l1, sizeof (l1)); - imm_op = FALSE; + imm_op = false; res = msp430_srcoperand (&op1, l1, opcode->bin_opcode, &imm_op, - extended_op, FALSE); + extended_op, false); if (res) break; - byte_op = FALSE; + byte_op = false; op_length = 2 + 2 * op1.ol; frag = frag_more (op_length); @@ -3363,9 +3363,9 @@ msp430_operands (struct msp430_opcode_s * opcode, char * line) { bin |= 0xb0; - fix_new_exp (frag_now, where, 4, &(op1.exp), FALSE, + fix_new_exp (frag_now, where, 4, &(op1.exp), false, BFD_RELOC_MSP430X_ABS20_ADR_DST); - fix_emitted = TRUE; + fix_emitted = true; } else if (op1.am == 1) { @@ -3373,9 +3373,9 @@ msp430_operands (struct msp430_opcode_s * opcode, char * line) { bin |= 0x90; - fix_new_exp (frag_now, where, 4, &(op1.exp), FALSE, + fix_new_exp (frag_now, where, 4, &(op1.exp), false, BFD_RELOC_MSP430X_PCR20_CALL); - fix_emitted = TRUE; + fix_emitted = true; } else bin |= 0x50 | op1.reg; @@ -3387,9 +3387,9 @@ msp430_operands (struct msp430_opcode_s * opcode, char * line) { bin |= 0x80; - fix_new_exp (frag_now, where, 4, &(op1.exp), FALSE, + fix_new_exp (frag_now, where, 4, &(op1.exp), false, BFD_RELOC_MSP430X_ABS20_ADR_DST); - fix_emitted = TRUE; + fix_emitted = true; } else if (op1.am == 2) bin |= 0x60 | op1.reg; @@ -3410,7 +3410,7 @@ msp430_operands (struct msp430_opcode_s * opcode, char * line) if (! fix_emitted) fix_new_exp (frag_now, where + 2, 2, - &(op1.exp), FALSE, BFD_RELOC_16); + &(op1.exp), false, BFD_RELOC_16); } dwarf2_emit_insn (insn_length + op_length); @@ -3556,7 +3556,7 @@ msp430_operands (struct msp430_opcode_s * opcode, char * line) case 8: { - bfd_boolean need_reloc = FALSE; + bool need_reloc = false; int n; int reg; @@ -3596,7 +3596,7 @@ msp430_operands (struct msp430_opcode_s * opcode, char * line) else { n = 0; - need_reloc = TRUE; + need_reloc = true; } op_length = 4; @@ -3625,7 +3625,7 @@ msp430_operands (struct msp430_opcode_s * opcode, char * line) where = frag - frag_now->fr_literal; bin |= reg; if (need_reloc) - fix_new_exp (frag_now, where, 4, &(op1.exp), FALSE, + fix_new_exp (frag_now, where, 4, &(op1.exp), false, BFD_RELOC_MSP430X_ABS20_ADR_SRC); bfd_putl16 ((bfd_vma) bin, frag); @@ -3636,7 +3636,7 @@ msp430_operands (struct msp430_opcode_s * opcode, char * line) } case 9: /* MOVA, BRA, RETA. */ - imm_op = FALSE; + imm_op = false; bin = opcode->bin_opcode; if (is_opcode ("reta")) @@ -3655,7 +3655,7 @@ msp430_operands (struct msp430_opcode_s * opcode, char * line) { line = extract_operand (line, l1, sizeof (l1)); res = msp430_srcoperand (&op1, l1, opcode->bin_opcode, - &imm_op, extended_op, FALSE); + &imm_op, extended_op, false); if (is_opcode ("bra")) { @@ -3668,7 +3668,7 @@ msp430_operands (struct msp430_opcode_s * opcode, char * line) { line = extract_operand (line, l2, sizeof (l2)); res += msp430_dstoperand (&op2, l2, opcode->bin_opcode, - extended_op, TRUE); + extended_op, true); } if (res) @@ -3747,8 +3747,8 @@ msp430_operands (struct msp430_opcode_s * opcode, char * line) case 1: /* Format 1, double operand. */ line = extract_operand (line, l1, sizeof (l1)); line = extract_operand (line, l2, sizeof (l2)); - res = msp430_srcoperand (&op1, l1, opcode->bin_opcode, &imm_op, extended_op, TRUE); - res += msp430_dstoperand (&op2, l2, opcode->bin_opcode, extended_op, TRUE); + res = msp430_srcoperand (&op1, l1, opcode->bin_opcode, &imm_op, extended_op, true); + res += msp430_dstoperand (&op2, l2, opcode->bin_opcode, extended_op, true); if (res) break; /* Error occurred. All warnings were done before. */ @@ -3819,11 +3819,11 @@ msp430_operands (struct msp430_opcode_s * opcode, char * line) { /* The GIE bit is being set. */ warn_eint_nop (prev_insn_is_nop, prev_insn_is_dint); - this_insn_is_eint = TRUE; + this_insn_is_eint = true; } else /* The GIE bit is being cleared. */ - this_insn_is_dint = TRUE; + this_insn_is_dint = true; } /* If an immediate value which is covered by the constant generator is the src, then op1 will have been changed to either R2 or R3 by @@ -3837,13 +3837,13 @@ msp430_operands (struct msp430_opcode_s * opcode, char * line) && (bin & 0x30) == 0x30) { warn_eint_nop (prev_insn_is_nop, prev_insn_is_dint); - this_insn_is_eint = TRUE; + this_insn_is_eint = true; } /* Any other use of the constant generator with destination R2, will disable interrupts. */ else if (op1.mode == OP_REG && (op1.reg == 2 || op1.reg == 3)) - this_insn_is_dint = TRUE; + this_insn_is_dint = true; else if (do_unknown_interrupt_nops) { /* FIXME: Couldn't work out whether the insn is enabling or @@ -3891,10 +3891,10 @@ msp430_operands (struct msp430_opcode_s * opcode, char * line) extended |= ((op1.exp.X_add_number >> 16) & 0xf) << 7; else if (op1.reg || op1.am == 3) /* Not PC relative. */ - fix_new_exp (frag_now, where, 6, &(op1.exp), FALSE, + fix_new_exp (frag_now, where, 6, &(op1.exp), false, BFD_RELOC_MSP430X_ABS20_EXT_SRC); else - fix_new_exp (frag_now, where, 6, &(op1.exp), FALSE, + fix_new_exp (frag_now, where, 6, &(op1.exp), false, BFD_RELOC_MSP430X_PCR20_EXT_SRC); } @@ -3904,12 +3904,12 @@ msp430_operands (struct msp430_opcode_s * opcode, char * line) extended |= (op2.exp.X_add_number >> 16) & 0xf; else if (op1.mode == OP_EXP) - fix_new_exp (frag_now, where, 8, &(op2.exp), FALSE, + fix_new_exp (frag_now, where, 8, &(op2.exp), false, op2.reg ? BFD_RELOC_MSP430X_ABS20_EXT_ODST : BFD_RELOC_MSP430X_PCR20_EXT_ODST); else - fix_new_exp (frag_now, where, 6, &(op2.exp), FALSE, + fix_new_exp (frag_now, where, 6, &(op2.exp), false, op2.reg ? BFD_RELOC_MSP430X_ABS20_EXT_DST : BFD_RELOC_MSP430X_PCR20_EXT_DST); } @@ -3938,10 +3938,10 @@ msp430_operands (struct msp430_opcode_s * opcode, char * line) { if (op1.reg || op1.am == 3) /* Not PC relative. */ fix_new_exp (frag_now, where, 2, - &(op1.exp), FALSE, CHECK_RELOC_MSP430 (op1)); + &(op1.exp), false, CHECK_RELOC_MSP430 (op1)); else fix_new_exp (frag_now, where, 2, - &(op1.exp), TRUE, CHECK_RELOC_MSP430_PCREL); + &(op1.exp), true, CHECK_RELOC_MSP430_PCREL); } } @@ -3963,10 +3963,10 @@ msp430_operands (struct msp430_opcode_s * opcode, char * line) { if (op2.reg) /* Not PC relative. */ fix_new_exp (frag_now, where, 2, - &(op2.exp), FALSE, CHECK_RELOC_MSP430 (op2)); + &(op2.exp), false, CHECK_RELOC_MSP430 (op2)); else fix_new_exp (frag_now, where, 2, - &(op2.exp), TRUE, CHECK_RELOC_MSP430_PCREL); + &(op2.exp), true, CHECK_RELOC_MSP430_PCREL); } } } @@ -3993,7 +3993,7 @@ msp430_operands (struct msp430_opcode_s * opcode, char * line) line = extract_operand (line, l1, sizeof (l1)); res = msp430_srcoperand (&op1, l1, opcode->bin_opcode, - &imm_op, extended_op, TRUE); + &imm_op, extended_op, true); if (res) break; /* Error in operand. */ @@ -4059,10 +4059,10 @@ msp430_operands (struct msp430_opcode_s * opcode, char * line) extended |= ((op1.exp.X_add_number >> 16) & 0xf) << 7; else if (op1.reg || op1.am == 3) /* Not PC relative. */ - fix_new_exp (frag_now, where, 6, &(op1.exp), FALSE, + fix_new_exp (frag_now, where, 6, &(op1.exp), false, BFD_RELOC_MSP430X_ABS20_EXT_SRC); else - fix_new_exp (frag_now, where, 6, &(op1.exp), FALSE, + fix_new_exp (frag_now, where, 6, &(op1.exp), false, BFD_RELOC_MSP430X_PCR20_EXT_SRC); } @@ -4091,10 +4091,10 @@ msp430_operands (struct msp430_opcode_s * opcode, char * line) { if (op1.reg || op1.am == 3) /* Not PC relative. */ fix_new_exp (frag_now, where, 2, - &(op1.exp), FALSE, CHECK_RELOC_MSP430 (op1)); + &(op1.exp), false, CHECK_RELOC_MSP430 (op1)); else fix_new_exp (frag_now, where, 2, - &(op1.exp), TRUE, CHECK_RELOC_MSP430_PCREL); + &(op1.exp), true, CHECK_RELOC_MSP430_PCREL); } } } @@ -4174,7 +4174,7 @@ msp430_operands (struct msp430_opcode_s * opcode, char * line) frag = frag_more (2); /* Instr size is 1 word. */ where = frag - frag_now->fr_literal; fix_new_exp (frag_now, where, 2, - &exp, TRUE, BFD_RELOC_MSP430_10_PCREL); + &exp, true, BFD_RELOC_MSP430_10_PCREL); bfd_putl16 ((bfd_vma) bin, frag); } @@ -4301,30 +4301,30 @@ msp430_operands (struct msp430_opcode_s * opcode, char * line) if (is_opcode ("nop")) { - prev_insn_is_nop = TRUE; - prev_insn_is_dint = FALSE; - prev_insn_is_eint = FALSE; + prev_insn_is_nop = true; + prev_insn_is_dint = false; + prev_insn_is_eint = false; } else if (this_insn_is_dint || is_dint (opcode->name, bin)) { - prev_insn_is_dint = TRUE; - prev_insn_is_eint = FALSE; - prev_insn_is_nop = FALSE; + prev_insn_is_dint = true; + prev_insn_is_eint = false; + prev_insn_is_nop = false; check_for_nop |= NOP_CHECK_INTERRUPT; } /* NOP is not needed after EINT for 430 ISA. */ else if (target_is_430x () && (this_insn_is_eint || is_eint (opcode->name, bin))) { - prev_insn_is_eint = TRUE; - prev_insn_is_nop = FALSE; - prev_insn_is_dint = FALSE; + prev_insn_is_eint = true; + prev_insn_is_nop = false; + prev_insn_is_dint = false; check_for_nop |= NOP_CHECK_INTERRUPT; } else { - prev_insn_is_nop = FALSE; - prev_insn_is_dint = FALSE; - prev_insn_is_eint = FALSE; + prev_insn_is_nop = false; + prev_insn_is_dint = false; + prev_insn_is_eint = false; } input_line_pointer = line; @@ -4603,14 +4603,14 @@ md_apply_fix (fixS * fixp, valueT * valuep, segT seg) } } -static bfd_boolean +static bool S_IS_GAS_LOCAL (symbolS * s) { const char * name; unsigned int len; if (s == NULL) - return FALSE; + return false; name = S_GET_NAME (s); len = strlen (name) - 1; @@ -4916,7 +4916,7 @@ md_convert_frag (bfd * abfd ATTRIBUTE_UNUSED, another fix will be applied to the next word of insn anyway. */ if (hc->tlab == 2) fix_new (fragP, fragP->fr_fix, 2, fragP->fr_symbol, - fragP->fr_offset, TRUE, rela); + fragP->fr_offset, true, rela); fragP->fr_fix += 2; } @@ -4960,7 +4960,7 @@ md_convert_frag (bfd * abfd ATTRIBUTE_UNUSED, /* Now apply fix. */ fix_new (fragP, fragP->fr_fix, 2, fragP->fr_symbol, - fragP->fr_offset, TRUE, rela); + fragP->fr_offset, true, rela); /* Just fixed 2 bytes. */ fragP->fr_fix += 2; } @@ -5045,15 +5045,15 @@ msp430_relax_frag (segT seg ATTRIBUTE_UNUSED, fragS * fragP, adjusted. We return FALSE here so that linker relaxation will work. */ -bfd_boolean +bool msp430_fix_adjustable (struct fix *fixp ATTRIBUTE_UNUSED) { /* If the symbol is in a non-code section then it should be OK. */ if (fixp->fx_addsy && ((S_GET_SEGMENT (fixp->fx_addsy)->flags & SEC_CODE) == 0)) - return TRUE; + return true; - return FALSE; + return false; } /* Scan uleb128 subtraction expressions and insert fixups for them. @@ -5152,23 +5152,23 @@ msp430_md_end (void) subtraction of two same-section symbols cannot be computed by the assembler. */ -bfd_boolean +bool msp430_allow_local_subtract (expressionS * left, expressionS * right, segT section) { /* If the symbols are not in a code section then they are OK. */ if ((section->flags & SEC_CODE) == 0) - return TRUE; + return true; if (S_IS_GAS_LOCAL (left->X_add_symbol) || S_IS_GAS_LOCAL (right->X_add_symbol)) - return TRUE; + return true; if (left->X_add_symbol == right->X_add_symbol) - return TRUE; + return true; /* We have to assume that there may be instructions between the two symbols and that relaxation may increase the distance between them. */ - return FALSE; + return false; } |