summaryrefslogtreecommitdiff
path: root/gas/expr.c
diff options
context:
space:
mode:
authorAlan Modra <amodra@gmail.com>2020-08-31 09:07:03 +0930
committerAlan Modra <amodra@gmail.com>2020-08-31 20:28:09 +0930
commit880fc278cadb4c057bc85ef27b199cac12f8c095 (patch)
tree0875024ec19c0956599bcd83eea0cbe687653121 /gas/expr.c
parentc1f138f9557a14678f6f988975cba441f56e6137 (diff)
downloadbinutils-gdb-880fc278cadb4c057bc85ef27b199cac12f8c095.tar.gz
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.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/gas/expr.c b/gas/expr.c
index 7c002c0d964..da4fbcf8cd6 100644
--- a/gas/expr.c
+++ b/gas/expr.c
@@ -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;
}