]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blobdiff - opcodes/nfp-dis.c
Update year range in copyright notice of binutils files
[thirdparty/binutils-gdb.git] / opcodes / nfp-dis.c
index 9dda34b173a0d8b24bc373835450531fc709b27b..69bc198b9073e03bf75a77c7683fe1627cd17703 100644 (file)
@@ -1,5 +1,5 @@
 /* Print NFP instructions for objdump.
-   Copyright (C) 2017-2018 Free Software Foundation, Inc.
+   Copyright (C) 2017-2020 Free Software Foundation, Inc.
    Contributed by Francois H. Theron <francois.theron@netronome.com>
 
    This file is part of the GNU opcodes library.
@@ -34,7 +34,6 @@
 #include "elf-bfd.h"
 #include "bfd.h"
 #include "bfd_stdint.h"
-#include "libbfd.h"
 
 #define _NFP_ERR_STOP -1
 #define _NFP_ERR_CONT -8
@@ -1326,8 +1325,8 @@ nfp_me27_28_print_alu (uint64_t instr, unsigned int pred_cc,
     case 18:   
       do_close_bracket = 0;
       dinfo->fprintf_func (dinfo->stream, "crc_%s[",
-                          _BTST (instr, 3) ? "le" : "be");
-      if (!nfp_me27_28_crc_op[_BF (instr, 7, 5)])
+                          _BTST (srcA, 3) ? "le" : "be");
+      if (!nfp_me27_28_crc_op[_BF (srcA, 7, 5)])
        {
          dinfo->fprintf_func (dinfo->stream, _(", <invalid CRC operator>, "));
          err = TRUE;
@@ -1335,7 +1334,7 @@ nfp_me27_28_print_alu (uint64_t instr, unsigned int pred_cc,
       else
        {
          dinfo->fprintf_func (dinfo->stream, "%s, ",
-                              nfp_me27_28_crc_op[_BF (instr, 7, 5)]);
+                              nfp_me27_28_crc_op[_BF (srcA, 7, 5)]);
        }
 
       /* Dest operand.  */
@@ -1352,10 +1351,10 @@ nfp_me27_28_print_alu (uint64_t instr, unsigned int pred_cc,
                                         num_ctx, src_lmext, dinfo);
 
       dinfo->fprintf_func (dinfo->stream, "]");
-      if (_BF (instr, 2, 0))
+      if (_BF (srcA, 2, 0))
        dinfo->fprintf_func (dinfo->stream, ", %s",
-                            nfp_me27_28_crc_bytes[_BF (instr, 2, 0)]);
-      if (_BTST (instr, 4))
+                            nfp_me27_28_crc_bytes[_BF (srcA, 2, 0)]);
+      if (_BTST (srcA, 4))
        dinfo->fprintf_func (dinfo->stream, ", bit_swap");
       break;
 
@@ -2573,9 +2572,8 @@ init_nfp3200_priv (nfp_priv_data * priv, struct disassemble_info *dinfo)
 
       mecfg = &priv->mecfgs[isl][menum][1];
 
-      if (!_bfd_generic_get_section_contents (dinfo->section->owner,
-                                             sec->bfd_section, buffer,
-                                             roff, sizeof (buffer)))
+      if (!bfd_get_section_contents (dinfo->section->owner, sec->bfd_section,
+                                    buffer, roff, sizeof (buffer)))
        return FALSE;
 
       mecfg_ent.ctx_enables = bfd_getl32 (buffer + offsetof (Elf_Nfp_MeConfig,
@@ -2622,9 +2620,8 @@ init_nfp6000_mecsr_sec (nfp_priv_data * priv, Elf_Internal_Shdr * sec,
       uint32_t csr_off;
       nfp_priv_mecfg *mecfg;
 
-      if (!_bfd_generic_get_section_contents (dinfo->section->owner,
-                                             sec->bfd_section, buffer,
-                                             ireg_off, sizeof (buffer)))
+      if (!bfd_get_section_contents (dinfo->section->owner, sec->bfd_section,
+                                    buffer, ireg_off, sizeof (buffer)))
        return FALSE;
 
       ireg.cpp_offset_lo = bfd_getl32 (buffer
@@ -2979,7 +2976,7 @@ with the -M switch (multiple options should be separated by commas):\n"));
   fprintf (stream, _("\n\
   no-pc                    Don't print program counter prefix.\n\
   ctx4             Force disassembly using 4-context mode.\n\
-  ctx8             Force 8-context mode, takes presedence.\""));
+  ctx8             Force 8-context mode, takes precedence."));
 
   fprintf (stream, _("\n"));
 }