gdb/testsuite/tui: Introduce check_box_contents
[deliverable/binutils-gdb.git] / opcodes / arm-dis.c
index 12eae61bb5957e67375b52b32d10de927289a08c..55ec321bedf6a2e3beb6ff7b08cf93213f1b9d50 100644 (file)
@@ -1,5 +1,5 @@
 /* Instruction printing code for the ARM
-   Copyright (C) 1994-2019 Free Software Foundation, Inc.
+   Copyright (C) 1994-2020 Free Software Foundation, Inc.
    Contributed by Richard Earnshaw (rwe@pegasus.esprit.ec.org)
    Modification by James G. Smith (jsmith@cygnus.co.uk)
 
@@ -9927,12 +9927,12 @@ print_insn_arm (bfd_vma pc, struct disassemble_info *info, long given)
                          unsigned int immed = (given & 0xff);
                          unsigned int a, i;
 
-                         a = (((immed << (32 - rotate))
-                               | (immed >> rotate)) & 0xffffffff);
+                         a = (immed << ((32 - rotate) & 31)
+                              | immed >> rotate) & 0xffffffff;
                          /* If there is another encoding with smaller rotate,
                             the rotate should be specified directly.  */
                          for (i = 0; i < 32; i += 2)
-                           if ((a << i | a >> (32 - i)) <= 0xff)
+                           if ((a << i | a >> ((32 - i) & 31)) <= 0xff)
                              break;
 
                          if (i != rotate)
This page took 0.025484 seconds and 4 git commands to generate.