Simplify dwarf_expr_context class interface
[binutils-gdb.git] / opcodes / z8k-dis.c
index cb871decfaba7033f601b5b347171db068940135..11786c85e142fee1034a4d58d7792f0bf99c0664 100644 (file)
@@ -1,5 +1,5 @@
 /* Disassemble z8000 code.
-   Copyright (C) 1992-2020 Free Software Foundation, Inc.
+   Copyright (C) 1992-2021 Free Software Foundation, Inc.
 
    This file is part of the GNU opcodes library.
 
@@ -369,8 +369,8 @@ unpack_instr (instr_data_s *instr_data, int is_segmented, disassemble_info *info
              break;
            case ARG_IMM32:
              FETCH_DATA (info, nibl_count + 8);
-             instr_long = (instr_data->words[nibl_count] << 16)
-               | (instr_data->words[nibl_count + 4]);
+             instr_long = ((unsigned) instr_data->words[nibl_count] << 16
+                           | instr_data->words[nibl_count + 4]);
              instr_data->immediate = instr_long;
              nibl_count += 7;
              break;
@@ -402,17 +402,17 @@ unpack_instr (instr_data_s *instr_data, int is_segmented, disassemble_info *info
              if (instr_nibl & 0x8)
                {
                  FETCH_DATA (info, nibl_count + 8);
-                 instr_long = (instr_data->words[nibl_count] << 16)
-                   | (instr_data->words[nibl_count + 4]);
-                 instr_data->address = ((instr_word & 0x7f00) << 16)
-                   + (instr_long & 0xffff);
+                 instr_long = ((unsigned) instr_data->words[nibl_count] << 16
+                               | instr_data->words[nibl_count + 4]);
+                 instr_data->address = ((instr_word & 0x7f00) << 16
+                                        | (instr_long & 0xffff));
                  nibl_count += 7;
                  seg_length = 2;
                }
              else
                {
-                 instr_data->address = ((instr_word & 0x7f00) << 16)
-                   + (instr_word & 0x00ff);
+                 instr_data->address = ((instr_word & 0x7f00) << 16
+                                        | (instr_word & 0x00ff));
                  nibl_count += 3;
                }
            }