diff options
author | Alan Modra <amodra@gmail.com> | 2020-08-31 09:07:03 +0930 |
---|---|---|
committer | Alan Modra <amodra@gmail.com> | 2020-08-31 20:28:09 +0930 |
commit | 880fc278cadb4c057bc85ef27b199cac12f8c095 (patch) | |
tree | 0875024ec19c0956599bcd83eea0cbe687653121 /gas/expr.c | |
parent | c1f138f9557a14678f6f988975cba441f56e6137 (diff) | |
download | gdb-880fc278cadb4c057bc85ef27b199cac12f8c095.zip gdb-880fc278cadb4c057bc85ef27b199cac12f8c095.tar.gz gdb-880fc278cadb4c057bc85ef27b199cac12f8c095.tar.bz2 |
crx: ubsan: cannot be represented
* config/tc-crx.c: Formatting.
(CRX_PRINT): Wrap params in parentheses. Remove parens from uses
throughout file.
(reset_vars, get_register, get_copregister, get_optype, get_opbits),
(get_opflags, get_number_of_operands, parse_operand, gettrap),
(handle_LoadStor, getconstant, check_range, getreg_image),
(parse_operands, parse_insn, print_operand, print_constant),
(exponent2scale, mask_reg, process_label_constant, set_operand),
(assemble_insn, print_insn): Delete unnecessary forward declaration.
(print_insn): Make static.
(print_constant): Make "constant" unsigned.
(assemble_insn): Tidy REVERSE_MATCH index calc.
* expr.c (generic_bignum_to_int32): Cast elements to valueT.
Diffstat (limited to 'gas/expr.c')
-rw-r--r-- | gas/expr.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -224,8 +224,8 @@ static valueT generic_bignum_to_int32 (void) { valueT number = - ((generic_bignum[1] & LITTLENUM_MASK) << LITTLENUM_NUMBER_OF_BITS) - | (generic_bignum[0] & LITTLENUM_MASK); + ((((valueT) generic_bignum[1] & LITTLENUM_MASK) << LITTLENUM_NUMBER_OF_BITS) + | ((valueT) generic_bignum[0] & LITTLENUM_MASK)); number &= 0xffffffff; return number; } |