PR26503 UBSAN: tc-v850.c:1447 left shift cannot be represented
authorAlan Modra <amodra@gmail.com>
Mon, 31 Aug 2020 07:51:06 +0000 (17:21 +0930)
committerAlan Modra <amodra@gmail.com>
Mon, 31 Aug 2020 10:58:13 +0000 (20:28 +0930)
PR 26503
* config/tc-v850.c (parse_register_list): Shift 1u left.

gas/ChangeLog
gas/config/tc-v850.c

index 1976c1098958e1aa14f94b5be01e71a50355210f..8642101aea9cdafc8cca7701aaa2ee424c07371d 100644 (file)
@@ -1,3 +1,8 @@
+2020-08-31  Alan Modra  <amodra@gmail.com>
+
+       PR 26503
+       * config/tc-v850.c (parse_register_list): Shift 1u left.
+
 2020-08-31  Alan Modra  <amodra@gmail.com>
 
        PR 26502
index 865d45cc4436f7474f13c87ee771365a7ae0f424..0ac5682935f550fb919ae841b8ce9abedcbf7ce4 100644 (file)
@@ -1444,7 +1444,7 @@ parse_register_list (unsigned long *insn,
            {
              if (regs[i] == exp.X_add_number)
                {
-                 *insn |= (1 << i);
+                 *insn |= 1u << i;
                  break;
                }
            }