/* Print NFP instructions for objdump.
- Copyright (C) 2017-2018 Free Software Foundation, Inc.
+ Copyright (C) 2017-2019 Free Software Foundation, Inc.
Contributed by Francois H. Theron <francois.theron@netronome.com>
This file is part of the GNU opcodes library.
#include "elf-bfd.h"
#include "bfd.h"
#include "bfd_stdint.h"
-#include "libbfd.h"
#define _NFP_ERR_STOP -1
#define _NFP_ERR_CONT -8
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;
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. */
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;
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,
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
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"));
}