Fix error messages in the NFP sources when building for 32-bit targets.
bfd * targets.c: Wrap nfp_elf64_vec in BFD64 ifdef. include * opcode/nfp.h: Use uint64_t instead of bfd_vma. opcodes * nfp-dis.c: Use uint64_t for instruction variables, not bfd_vma.
This commit is contained in:
parent
293b4d4fe9
commit
1678bd35a3
|
@ -1,3 +1,7 @@
|
|||
2018-05-15 Francois H. Theron <francois.theron@netronome.com>
|
||||
|
||||
* targets.c: Wrap nfp_elf64_vec in BFD64 ifdef.
|
||||
|
||||
2018-05-15 Nick Clifton <nickc@redhat.com>
|
||||
|
||||
* po/pt.po: New Portuguese translation.
|
||||
|
|
|
@ -1108,7 +1108,9 @@ static const bfd_target * const _bfd_target_vector[] =
|
|||
&nds32_elf32_linux_be_vec,
|
||||
&nds32_elf32_linux_le_vec,
|
||||
|
||||
#ifdef BFD64
|
||||
&nfp_elf64_vec,
|
||||
#endif
|
||||
|
||||
&nios2_elf32_be_vec,
|
||||
&nios2_elf32_le_vec,
|
||||
|
|
|
@ -1,3 +1,7 @@
|
|||
2018-05-15 Francois H. Theron <francois.theron@netronome.com>
|
||||
|
||||
* opcode/nfp.h: Use uint64_t instead of bfd_vma.
|
||||
|
||||
2018-05-10 John Darrington <john@darrington.wattle.id.au>
|
||||
|
||||
* elf/common.h (EM_S12Z): New macro.
|
||||
|
|
|
@ -23,6 +23,7 @@
|
|||
#define _NFP_H_
|
||||
|
||||
#include "bfd.h"
|
||||
#include "bfd_stdint.h"
|
||||
#include "elf/nfp.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
@ -30,135 +31,129 @@ extern "C"
|
|||
{
|
||||
#endif
|
||||
|
||||
/* The bfd_vma type has the description below, so we use that and BFD_VMA_FMT
|
||||
instead of uint64_t or bfd_uint64_t.
|
||||
"Represent a target address. Also used as a generic unsigned type
|
||||
which is guaranteed to be big enough to hold any arithmetic types
|
||||
we need to deal with."
|
||||
|
||||
We use ME versions for most of this rather than NFP family and revision
|
||||
/* We use ME versions for most of this rather than NFP family and revision
|
||||
numbers. The version numbers are currently 2.7 and 2.8 and to avoid long
|
||||
names with many underscores we'll just use 27 and 28 until some feature
|
||||
number makes it necessary to do something different. */
|
||||
|
||||
#define NFP_ME27_INSTR_MASK_CMD ((bfd_vma) 0x008000000000)
|
||||
#define NFP_ME27_INSTR_CMD ((bfd_vma) 0x000000000000)
|
||||
#define NFP_ME27_INSTR_MASK_CMD ((uint64_t) 0x008000000000)
|
||||
#define NFP_ME27_INSTR_CMD ((uint64_t) 0x000000000000)
|
||||
#define NFP_ME27_INSTR_IS_CMD(instr) \
|
||||
((instr & NFP_ME27_INSTR_MASK_CMD) == NFP_ME27_INSTR_CMD)
|
||||
|
||||
#define NFP_ME27_INSTR_MASK_ALU_SHF ((bfd_vma) 0x1ee000000000)
|
||||
#define NFP_ME27_INSTR_ALU_SHF ((bfd_vma) 0x008000000000)
|
||||
#define NFP_ME27_INSTR_MASK_ALU_SHF ((uint64_t) 0x1ee000000000)
|
||||
#define NFP_ME27_INSTR_ALU_SHF ((uint64_t) 0x008000000000)
|
||||
#define NFP_ME27_INSTR_IS_ALU_SHF(instr) \
|
||||
((instr & NFP_ME27_INSTR_MASK_ALU_SHF) == NFP_ME27_INSTR_ALU_SHF)
|
||||
|
||||
#define NFP_ME27_INSTR_MASK_ALU ((bfd_vma) 0x1ee000000000)
|
||||
#define NFP_ME27_INSTR_ALU ((bfd_vma) 0x00a000000000)
|
||||
#define NFP_ME27_INSTR_MASK_ALU ((uint64_t) 0x1ee000000000)
|
||||
#define NFP_ME27_INSTR_ALU ((uint64_t) 0x00a000000000)
|
||||
#define NFP_ME27_INSTR_IS_ALU(instr) \
|
||||
((instr & NFP_ME27_INSTR_MASK_ALU) == NFP_ME27_INSTR_ALU)
|
||||
|
||||
#define NFP_ME27_INSTR_MASK_IMMED ((bfd_vma) 0x1ff900000000)
|
||||
#define NFP_ME27_INSTR_IMMED ((bfd_vma) 0x00f000000000)
|
||||
#define NFP_ME27_INSTR_MASK_IMMED ((uint64_t) 0x1ff900000000)
|
||||
#define NFP_ME27_INSTR_IMMED ((uint64_t) 0x00f000000000)
|
||||
#define NFP_ME27_INSTR_IS_IMMED(instr) \
|
||||
((instr & NFP_ME27_INSTR_MASK_IMMED) == NFP_ME27_INSTR_IMMED)
|
||||
|
||||
#define NFP_ME27_INSTR_MASK_LD_FIELD ((bfd_vma) 0x1ffa00e00000)
|
||||
#define NFP_ME27_INSTR_LD_FIELD ((bfd_vma) 0x00c000000000)
|
||||
#define NFP_ME27_INSTR_MASK_LD_FIELD ((uint64_t) 0x1ffa00e00000)
|
||||
#define NFP_ME27_INSTR_LD_FIELD ((uint64_t) 0x00c000000000)
|
||||
#define NFP_ME27_INSTR_IS_LD_FIELD(instr) \
|
||||
((instr & NFP_ME27_INSTR_MASK_LD_FIELD) == NFP_ME27_INSTR_LD_FIELD)
|
||||
|
||||
#define NFP_ME27_INSTR_MASK_CTX_ARB ((bfd_vma) 0x00f800000000)
|
||||
#define NFP_ME27_INSTR_CTX_ARB ((bfd_vma) 0x00e000000000)
|
||||
#define NFP_ME27_INSTR_MASK_CTX_ARB ((uint64_t) 0x00f800000000)
|
||||
#define NFP_ME27_INSTR_CTX_ARB ((uint64_t) 0x00e000000000)
|
||||
#define NFP_ME27_INSTR_IS_CTX_ARB(instr) \
|
||||
((instr & NFP_ME27_INSTR_MASK_CTX_ARB) == NFP_ME27_INSTR_CTX_ARB)
|
||||
|
||||
#define NFP_ME27_INSTR_MASK_LOCAL_CSR ((bfd_vma) 0x1ffe00100000)
|
||||
#define NFP_ME27_INSTR_LOCAL_CSR ((bfd_vma) 0x00fc00000000)
|
||||
#define NFP_ME27_INSTR_MASK_LOCAL_CSR ((uint64_t) 0x1ffe00100000)
|
||||
#define NFP_ME27_INSTR_LOCAL_CSR ((uint64_t) 0x00fc00000000)
|
||||
#define NFP_ME27_INSTR_IS_LOCAL_CSR(instr) \
|
||||
((instr & NFP_ME27_INSTR_MASK_LOCAL_CSR) == NFP_ME27_INSTR_LOCAL_CSR)
|
||||
|
||||
#define NFP_ME27_INSTR_MASK_BRANCH ((bfd_vma) 0x00f8000c3ce0)
|
||||
#define NFP_ME27_INSTR_BRANCH ((bfd_vma) 0x00d800000020)
|
||||
#define NFP_ME27_INSTR_MASK_BRANCH ((uint64_t) 0x00f8000c3ce0)
|
||||
#define NFP_ME27_INSTR_BRANCH ((uint64_t) 0x00d800000020)
|
||||
#define NFP_ME27_INSTR_IS_BRANCH(instr) \
|
||||
((instr & NFP_ME27_INSTR_MASK_BRANCH) == NFP_ME27_INSTR_BRANCH)
|
||||
|
||||
#define NFP_ME27_INSTR_MASK_BR_BYTE ((bfd_vma) 0x00f800000000)
|
||||
#define NFP_ME27_INSTR_BR_BYTE ((bfd_vma) 0x00c800000000)
|
||||
#define NFP_ME27_INSTR_MASK_BR_BYTE ((uint64_t) 0x00f800000000)
|
||||
#define NFP_ME27_INSTR_BR_BYTE ((uint64_t) 0x00c800000000)
|
||||
#define NFP_ME27_INSTR_IS_BR_BYTE(instr) \
|
||||
((instr & NFP_ME27_INSTR_MASK_BR_BYTE) == NFP_ME27_INSTR_BR_BYTE)
|
||||
|
||||
#define NFP_ME27_INSTR_MASK_BR_BIT ((bfd_vma) 0x00f800080300)
|
||||
#define NFP_ME27_INSTR_BR_BIT ((bfd_vma) 0x00d000000000)
|
||||
#define NFP_ME27_INSTR_MASK_BR_BIT ((uint64_t) 0x00f800080300)
|
||||
#define NFP_ME27_INSTR_BR_BIT ((uint64_t) 0x00d000000000)
|
||||
#define NFP_ME27_INSTR_IS_BR_BIT(instr) \
|
||||
((instr & NFP_ME27_INSTR_MASK_BR_BIT) == NFP_ME27_INSTR_BR_BIT)
|
||||
|
||||
#define NFP_ME27_INSTR_MASK_BR_ALU ((bfd_vma) 0x1fff80000000)
|
||||
#define NFP_ME27_INSTR_BR_ALU ((bfd_vma) 0x00e800000000)
|
||||
#define NFP_ME27_INSTR_MASK_BR_ALU ((uint64_t) 0x1fff80000000)
|
||||
#define NFP_ME27_INSTR_BR_ALU ((uint64_t) 0x00e800000000)
|
||||
#define NFP_ME27_INSTR_IS_BR_ALU(instr) \
|
||||
((instr & NFP_ME27_INSTR_MASK_BR_ALU) == NFP_ME27_INSTR_BR_ALU)
|
||||
|
||||
#define NFP_ME27_INSTR_MASK_MULT ((bfd_vma) 0x1efe3f000000)
|
||||
#define NFP_ME27_INSTR_MULT ((bfd_vma) 0x00f800000000)
|
||||
#define NFP_ME27_INSTR_MASK_MULT ((uint64_t) 0x1efe3f000000)
|
||||
#define NFP_ME27_INSTR_MULT ((uint64_t) 0x00f800000000)
|
||||
#define NFP_ME27_INSTR_IS_MULT(instr) \
|
||||
((instr & NFP_ME27_INSTR_MASK_MULT) == NFP_ME27_INSTR_MULT)
|
||||
|
||||
|
||||
#define NFP_ME28_INSTR_MASK_CMD ((bfd_vma) 0x008000000000)
|
||||
#define NFP_ME28_INSTR_CMD ((bfd_vma) 0x000000000000)
|
||||
#define NFP_ME28_INSTR_MASK_CMD ((uint64_t) 0x008000000000)
|
||||
#define NFP_ME28_INSTR_CMD ((uint64_t) 0x000000000000)
|
||||
#define NFP_ME28_INSTR_IS_CMD(instr) \
|
||||
((instr & NFP_ME28_INSTR_MASK_CMD) == NFP_ME28_INSTR_CMD)
|
||||
|
||||
#define NFP_ME28_INSTR_MASK_ALU_SHF ((bfd_vma) 0x00e000000000)
|
||||
#define NFP_ME28_INSTR_ALU_SHF ((bfd_vma) 0x008000000000)
|
||||
#define NFP_ME28_INSTR_MASK_ALU_SHF ((uint64_t) 0x00e000000000)
|
||||
#define NFP_ME28_INSTR_ALU_SHF ((uint64_t) 0x008000000000)
|
||||
#define NFP_ME28_INSTR_IS_ALU_SHF(instr) \
|
||||
((instr & NFP_ME28_INSTR_MASK_ALU_SHF) == NFP_ME28_INSTR_ALU_SHF)
|
||||
|
||||
#define NFP_ME28_INSTR_MASK_ALU ((bfd_vma) 0x00e000000000)
|
||||
#define NFP_ME28_INSTR_ALU ((bfd_vma) 0x00a000000000)
|
||||
#define NFP_ME28_INSTR_MASK_ALU ((uint64_t) 0x00e000000000)
|
||||
#define NFP_ME28_INSTR_ALU ((uint64_t) 0x00a000000000)
|
||||
#define NFP_ME28_INSTR_IS_ALU(instr) \
|
||||
((instr & NFP_ME28_INSTR_MASK_ALU) == NFP_ME28_INSTR_ALU)
|
||||
|
||||
#define NFP_ME28_INSTR_MASK_IMMED ((bfd_vma) 0x01f900000000)
|
||||
#define NFP_ME28_INSTR_IMMED ((bfd_vma) 0x00f000000000)
|
||||
#define NFP_ME28_INSTR_MASK_IMMED ((uint64_t) 0x01f900000000)
|
||||
#define NFP_ME28_INSTR_IMMED ((uint64_t) 0x00f000000000)
|
||||
#define NFP_ME28_INSTR_IS_IMMED(instr) \
|
||||
((instr & NFP_ME28_INSTR_MASK_IMMED) == NFP_ME28_INSTR_IMMED)
|
||||
|
||||
#define NFP_ME28_INSTR_MASK_LD_FIELD ((bfd_vma) 0x01fa00e00000)
|
||||
#define NFP_ME28_INSTR_LD_FIELD ((bfd_vma) 0x00c000000000)
|
||||
#define NFP_ME28_INSTR_MASK_LD_FIELD ((uint64_t) 0x01fa00e00000)
|
||||
#define NFP_ME28_INSTR_LD_FIELD ((uint64_t) 0x00c000000000)
|
||||
#define NFP_ME28_INSTR_IS_LD_FIELD(instr) \
|
||||
((instr & NFP_ME28_INSTR_MASK_LD_FIELD) == NFP_ME28_INSTR_LD_FIELD)
|
||||
|
||||
#define NFP_ME28_INSTR_MASK_CTX_ARB ((bfd_vma) 0x00f800000000)
|
||||
#define NFP_ME28_INSTR_CTX_ARB ((bfd_vma) 0x00e000000000)
|
||||
#define NFP_ME28_INSTR_MASK_CTX_ARB ((uint64_t) 0x00f800000000)
|
||||
#define NFP_ME28_INSTR_CTX_ARB ((uint64_t) 0x00e000000000)
|
||||
#define NFP_ME28_INSTR_IS_CTX_ARB(instr) \
|
||||
((instr & NFP_ME28_INSTR_MASK_CTX_ARB) == NFP_ME28_INSTR_CTX_ARB)
|
||||
|
||||
#define NFP_ME28_INSTR_MASK_LOCAL_CSR ((bfd_vma) 0x01fe00100000)
|
||||
#define NFP_ME28_INSTR_LOCAL_CSR ((bfd_vma) 0x00fc00000000)
|
||||
#define NFP_ME28_INSTR_MASK_LOCAL_CSR ((uint64_t) 0x01fe00100000)
|
||||
#define NFP_ME28_INSTR_LOCAL_CSR ((uint64_t) 0x00fc00000000)
|
||||
#define NFP_ME28_INSTR_IS_LOCAL_CSR(instr) \
|
||||
((instr & NFP_ME28_INSTR_MASK_LOCAL_CSR) == NFP_ME28_INSTR_LOCAL_CSR)
|
||||
|
||||
#define NFP_ME28_INSTR_MASK_BRANCH ((bfd_vma) 0x00f8000c3ce0)
|
||||
#define NFP_ME28_INSTR_BRANCH ((bfd_vma) 0x00d800000020)
|
||||
#define NFP_ME28_INSTR_MASK_BRANCH ((uint64_t) 0x00f8000c3ce0)
|
||||
#define NFP_ME28_INSTR_BRANCH ((uint64_t) 0x00d800000020)
|
||||
#define NFP_ME28_INSTR_IS_BRANCH(instr) \
|
||||
((instr & NFP_ME28_INSTR_MASK_BRANCH) == NFP_ME28_INSTR_BRANCH)
|
||||
|
||||
#define NFP_ME28_INSTR_MASK_BR_BYTE ((bfd_vma) 0x00f800000000)
|
||||
#define NFP_ME28_INSTR_BR_BYTE ((bfd_vma) 0x00c800000000)
|
||||
#define NFP_ME28_INSTR_MASK_BR_BYTE ((uint64_t) 0x00f800000000)
|
||||
#define NFP_ME28_INSTR_BR_BYTE ((uint64_t) 0x00c800000000)
|
||||
#define NFP_ME28_INSTR_IS_BR_BYTE(instr) \
|
||||
((instr & NFP_ME28_INSTR_MASK_BR_BYTE) == NFP_ME28_INSTR_BR_BYTE)
|
||||
|
||||
#define NFP_ME28_INSTR_MASK_BR_BIT ((bfd_vma) 0x00f800080300)
|
||||
#define NFP_ME28_INSTR_BR_BIT ((bfd_vma) 0x00d000000000)
|
||||
#define NFP_ME28_INSTR_MASK_BR_BIT ((uint64_t) 0x00f800080300)
|
||||
#define NFP_ME28_INSTR_BR_BIT ((uint64_t) 0x00d000000000)
|
||||
#define NFP_ME28_INSTR_IS_BR_BIT(instr) \
|
||||
((instr & NFP_ME28_INSTR_MASK_BR_BIT) == NFP_ME28_INSTR_BR_BIT)
|
||||
|
||||
#define NFP_ME28_INSTR_MASK_BR_ALU ((bfd_vma) 0x00ff80000000)
|
||||
#define NFP_ME28_INSTR_BR_ALU ((bfd_vma) 0x00e800000000)
|
||||
#define NFP_ME28_INSTR_MASK_BR_ALU ((uint64_t) 0x00ff80000000)
|
||||
#define NFP_ME28_INSTR_BR_ALU ((uint64_t) 0x00e800000000)
|
||||
#define NFP_ME28_INSTR_IS_BR_ALU(instr) \
|
||||
((instr & NFP_ME28_INSTR_MASK_BR_ALU) == NFP_ME28_INSTR_BR_ALU)
|
||||
|
||||
#define NFP_ME28_INSTR_MASK_MULT ((bfd_vma) 0x00fe3f000000)
|
||||
#define NFP_ME28_INSTR_MULT ((bfd_vma) 0x00f800000000)
|
||||
#define NFP_ME28_INSTR_MASK_MULT ((uint64_t) 0x00fe3f000000)
|
||||
#define NFP_ME28_INSTR_MULT ((uint64_t) 0x00f800000000)
|
||||
#define NFP_ME28_INSTR_IS_MULT(instr) \
|
||||
((instr & NFP_ME28_INSTR_MASK_MULT) == NFP_ME28_INSTR_MULT)
|
||||
|
||||
|
|
|
@ -1,3 +1,7 @@
|
|||
2018-05-15 Francois H. Theron <francois.theron@netronome.com>
|
||||
|
||||
* nfp-dis.c: Use uint64_t for instruction variables, not bfd_vma.
|
||||
|
||||
2018-05-09 H.J. Lu <hongjiu.lu@intel.com>
|
||||
|
||||
* i386-opc.tbl: Remove Disp<N> from movidir{i,64b}.
|
||||
|
|
|
@ -39,14 +39,9 @@
|
|||
#define _NFP_ERR_STOP -1
|
||||
#define _NFP_ERR_CONT -8
|
||||
|
||||
/* The bfd_vma type has the description below, so we use that and BFD_VMA_FMT
|
||||
instead of uint64_t or bfd_uint64_t.
|
||||
"Represent a target address. Also used as a generic unsigned type
|
||||
which is guaranteed to be big enough to hold any arithmetic types
|
||||
we need to deal with." */
|
||||
|
||||
#define _BTST(v, b) (((v) >> b) & 1)
|
||||
#define _BF(v, msb, lsb) (((v) >> (lsb)) & ((1U << ((msb) - (lsb) + 1)) - 1))
|
||||
#define _BF(v, msb, lsb) (((v) >> (lsb)) & \
|
||||
((1U << ((msb) - (lsb) + 1)) - 1))
|
||||
#define _BFS(v, msb, lsb, lshift) (_BF(v, msb, lsb) << (lshift))
|
||||
|
||||
#define _NFP_ME27_28_CSR_CTX_ENABLES 0x18
|
||||
|
@ -928,10 +923,10 @@ static const nfp_cmd_mnemonic nfp_me28_mnemonics[] =
|
|||
};
|
||||
|
||||
static int
|
||||
nfp_me_print_invalid (bfd_vma instr, struct disassemble_info *dinfo)
|
||||
nfp_me_print_invalid (uint64_t instr, struct disassemble_info *dinfo)
|
||||
{
|
||||
const char * err_msg = N_("<invalid_instruction>:");
|
||||
dinfo->fprintf_func (dinfo->stream, "%s 0x%" BFD_VMA_FMT "x", err_msg, instr);
|
||||
dinfo->fprintf_func (dinfo->stream, "%s 0x%" PRIx64, err_msg, instr);
|
||||
return _NFP_ERR_CONT;
|
||||
}
|
||||
|
||||
|
@ -1101,7 +1096,7 @@ nfp_me_print_opnd8 (unsigned int opnd, char bank, int num_ctx, int lmem_ext,
|
|||
}
|
||||
|
||||
static int
|
||||
nfp_me27_28_print_alu_shf (bfd_vma instr, unsigned int pred_cc,
|
||||
nfp_me27_28_print_alu_shf (uint64_t instr, unsigned int pred_cc,
|
||||
unsigned int dst_lmext, unsigned int src_lmext,
|
||||
unsigned int gpr_wrboth,
|
||||
int num_ctx, struct disassemble_info *dinfo)
|
||||
|
@ -1225,7 +1220,7 @@ nfp_me27_28_print_alu_shf (bfd_vma instr, unsigned int pred_cc,
|
|||
}
|
||||
|
||||
static int
|
||||
nfp_me27_28_print_alu (bfd_vma instr, unsigned int pred_cc,
|
||||
nfp_me27_28_print_alu (uint64_t instr, unsigned int pred_cc,
|
||||
unsigned int dst_lmext, unsigned int src_lmext,
|
||||
unsigned int gpr_wrboth,
|
||||
int num_ctx, struct disassemble_info *dinfo)
|
||||
|
@ -1416,7 +1411,7 @@ nfp_me27_28_print_alu (bfd_vma instr, unsigned int pred_cc,
|
|||
}
|
||||
|
||||
static int
|
||||
nfp_me27_28_print_immed (bfd_vma instr, unsigned int pred_cc,
|
||||
nfp_me27_28_print_immed (uint64_t instr, unsigned int pred_cc,
|
||||
unsigned int dst_lmext,
|
||||
unsigned int gpr_wrboth,
|
||||
int num_ctx, struct disassemble_info *dinfo)
|
||||
|
@ -1486,7 +1481,7 @@ nfp_me27_28_print_immed (bfd_vma instr, unsigned int pred_cc,
|
|||
}
|
||||
|
||||
static int
|
||||
nfp_me27_28_print_ld_field (bfd_vma instr, unsigned int pred_cc,
|
||||
nfp_me27_28_print_ld_field (uint64_t instr, unsigned int pred_cc,
|
||||
unsigned int dst_lmext, unsigned int src_lmext,
|
||||
unsigned int gpr_wrboth,
|
||||
int num_ctx, struct disassemble_info *dinfo)
|
||||
|
@ -1557,7 +1552,7 @@ nfp_me27_28_print_ld_field (bfd_vma instr, unsigned int pred_cc,
|
|||
}
|
||||
|
||||
static int
|
||||
nfp_me27_28_print_ctx_arb (bfd_vma instr, struct disassemble_info *dinfo)
|
||||
nfp_me27_28_print_ctx_arb (uint64_t instr, struct disassemble_info *dinfo)
|
||||
{
|
||||
unsigned int resume_addr = _BFS (instr, 40, 40, 13) | _BF (instr, 34, 22);
|
||||
unsigned int defer = _BF (instr, 21, 20);
|
||||
|
@ -1607,7 +1602,7 @@ nfp_me27_28_print_ctx_arb (bfd_vma instr, struct disassemble_info *dinfo)
|
|||
}
|
||||
|
||||
static int
|
||||
nfp_me27_28_print_local_csr (bfd_vma instr,
|
||||
nfp_me27_28_print_local_csr (uint64_t instr,
|
||||
unsigned int src_lmext,
|
||||
int num_ctx, struct disassemble_info *dinfo)
|
||||
{
|
||||
|
@ -1674,7 +1669,7 @@ nfp_me27_28_print_local_csr (bfd_vma instr,
|
|||
}
|
||||
|
||||
static int
|
||||
nfp_me27_28_print_branch (bfd_vma instr,
|
||||
nfp_me27_28_print_branch (uint64_t instr,
|
||||
const char *br_inpstates[16],
|
||||
struct disassemble_info *dinfo)
|
||||
{
|
||||
|
@ -1723,7 +1718,7 @@ nfp_me27_28_print_branch (bfd_vma instr,
|
|||
}
|
||||
|
||||
static int
|
||||
nfp_me27_28_print_br_byte (bfd_vma instr,
|
||||
nfp_me27_28_print_br_byte (uint64_t instr,
|
||||
unsigned int src_lmext, int num_ctx,
|
||||
struct disassemble_info *dinfo)
|
||||
{
|
||||
|
@ -1768,7 +1763,7 @@ nfp_me27_28_print_br_byte (bfd_vma instr,
|
|||
}
|
||||
|
||||
static int
|
||||
nfp_me27_28_print_br_bit (bfd_vma instr, unsigned int src_lmext,
|
||||
nfp_me27_28_print_br_bit (uint64_t instr, unsigned int src_lmext,
|
||||
int num_ctx, struct disassemble_info *dinfo)
|
||||
{
|
||||
unsigned int srcA = _BF (instr, 7, 0);
|
||||
|
@ -1807,7 +1802,7 @@ nfp_me27_28_print_br_bit (bfd_vma instr, unsigned int src_lmext,
|
|||
}
|
||||
|
||||
static int
|
||||
nfp_me27_28_print_br_alu (bfd_vma instr, unsigned int src_lmext,
|
||||
nfp_me27_28_print_br_alu (uint64_t instr, unsigned int src_lmext,
|
||||
int num_ctx, struct disassemble_info *dinfo)
|
||||
{
|
||||
unsigned int srcA = _BF (instr, 9, 0);
|
||||
|
@ -1845,7 +1840,7 @@ nfp_me27_28_print_br_alu (bfd_vma instr, unsigned int src_lmext,
|
|||
}
|
||||
|
||||
static int
|
||||
nfp_me27_28_print_mult (bfd_vma instr, unsigned int pred_cc,
|
||||
nfp_me27_28_print_mult (uint64_t instr, unsigned int pred_cc,
|
||||
unsigned int dst_lmext, unsigned int src_lmext,
|
||||
unsigned int gpr_wrboth,
|
||||
int num_ctx, struct disassemble_info *dinfo)
|
||||
|
@ -1956,7 +1951,7 @@ nfp_me_find_mnemonic (unsigned int cpp_tgt, unsigned int cpp_act,
|
|||
/* NFP-32xx (ME Version 2.7). */
|
||||
|
||||
static int
|
||||
nfp_me27_print_cmd (bfd_vma instr, int third_party_32bit,
|
||||
nfp_me27_print_cmd (uint64_t instr, int third_party_32bit,
|
||||
int num_ctx, struct disassemble_info *dinfo)
|
||||
{
|
||||
unsigned int srcA = _BF (instr, 7, 0);
|
||||
|
@ -2158,75 +2153,75 @@ nfp_me27_print_cmd (bfd_vma instr, int third_party_32bit,
|
|||
}
|
||||
|
||||
static int
|
||||
nfp_me27_print_alu_shf (bfd_vma instr, int num_ctx,
|
||||
nfp_me27_print_alu_shf (uint64_t instr, int num_ctx,
|
||||
struct disassemble_info *dinfo)
|
||||
{
|
||||
return nfp_me27_28_print_alu_shf (instr, 0, 0, 0, 0, num_ctx, dinfo);
|
||||
}
|
||||
|
||||
static int
|
||||
nfp_me27_print_alu (bfd_vma instr, int num_ctx,
|
||||
nfp_me27_print_alu (uint64_t instr, int num_ctx,
|
||||
struct disassemble_info *dinfo)
|
||||
{
|
||||
return nfp_me27_28_print_alu_shf (instr, 0, 0, 0, 0, num_ctx, dinfo);
|
||||
}
|
||||
|
||||
static int
|
||||
nfp_me27_print_immed (bfd_vma instr, int num_ctx,
|
||||
nfp_me27_print_immed (uint64_t instr, int num_ctx,
|
||||
struct disassemble_info *dinfo)
|
||||
{
|
||||
return nfp_me27_28_print_immed (instr, 0, 0, 0, num_ctx, dinfo);
|
||||
}
|
||||
|
||||
static int
|
||||
nfp_me27_print_ld_field (bfd_vma instr, int num_ctx,
|
||||
nfp_me27_print_ld_field (uint64_t instr, int num_ctx,
|
||||
struct disassemble_info *dinfo)
|
||||
{
|
||||
return nfp_me27_28_print_ld_field (instr, 0, 0, 0, 0, num_ctx, dinfo);
|
||||
}
|
||||
|
||||
static int
|
||||
nfp_me27_print_ctx_arb (bfd_vma instr, struct disassemble_info *dinfo)
|
||||
nfp_me27_print_ctx_arb (uint64_t instr, struct disassemble_info *dinfo)
|
||||
{
|
||||
return nfp_me27_28_print_ctx_arb (instr, dinfo);
|
||||
}
|
||||
|
||||
static int
|
||||
nfp_me27_print_local_csr (bfd_vma instr, int num_ctx,
|
||||
nfp_me27_print_local_csr (uint64_t instr, int num_ctx,
|
||||
struct disassemble_info *dinfo)
|
||||
{
|
||||
return nfp_me27_28_print_local_csr (instr, 0, num_ctx, dinfo);
|
||||
}
|
||||
|
||||
static int
|
||||
nfp_me27_print_branch (bfd_vma instr, struct disassemble_info *dinfo)
|
||||
nfp_me27_print_branch (uint64_t instr, struct disassemble_info *dinfo)
|
||||
{
|
||||
return nfp_me27_28_print_branch (instr, nfp_me27_br_inpstates, dinfo);
|
||||
}
|
||||
|
||||
static int
|
||||
nfp_me27_print_br_byte (bfd_vma instr, int num_ctx,
|
||||
nfp_me27_print_br_byte (uint64_t instr, int num_ctx,
|
||||
struct disassemble_info *dinfo)
|
||||
{
|
||||
return nfp_me27_28_print_br_byte (instr, 0, num_ctx, dinfo);
|
||||
}
|
||||
|
||||
static int
|
||||
nfp_me27_print_br_bit (bfd_vma instr, int num_ctx,
|
||||
nfp_me27_print_br_bit (uint64_t instr, int num_ctx,
|
||||
struct disassemble_info *dinfo)
|
||||
{
|
||||
return nfp_me27_28_print_br_bit (instr, 0, num_ctx, dinfo);
|
||||
}
|
||||
|
||||
static int
|
||||
nfp_me27_print_br_alu (bfd_vma instr, int num_ctx,
|
||||
nfp_me27_print_br_alu (uint64_t instr, int num_ctx,
|
||||
struct disassemble_info *dinfo)
|
||||
{
|
||||
return nfp_me27_28_print_br_alu (instr, 0, num_ctx, dinfo);
|
||||
}
|
||||
|
||||
static int
|
||||
nfp_me27_print_mult (bfd_vma instr, int num_ctx,
|
||||
nfp_me27_print_mult (uint64_t instr, int num_ctx,
|
||||
struct disassemble_info *dinfo)
|
||||
{
|
||||
return nfp_me27_28_print_mult (instr, 0, 0, 0, 0, num_ctx, dinfo);
|
||||
|
@ -2235,7 +2230,7 @@ nfp_me27_print_mult (bfd_vma instr, int num_ctx,
|
|||
/*NFP-6xxx/4xxx (ME Version 2.8). */
|
||||
|
||||
static int
|
||||
nfp_me28_print_cmd (bfd_vma instr, int third_party_32bit,
|
||||
nfp_me28_print_cmd (uint64_t instr, int third_party_32bit,
|
||||
int num_ctx, struct disassemble_info *dinfo)
|
||||
{
|
||||
unsigned int srcA = _BF (instr, 7, 0);
|
||||
|
@ -2421,7 +2416,7 @@ nfp_me28_print_cmd (bfd_vma instr, int third_party_32bit,
|
|||
}
|
||||
|
||||
static int
|
||||
nfp_me28_print_alu_shf (bfd_vma instr, int num_ctx,
|
||||
nfp_me28_print_alu_shf (uint64_t instr, int num_ctx,
|
||||
struct disassemble_info *dinfo)
|
||||
{
|
||||
unsigned int gpr_wrboth = _BTST (instr, 41);
|
||||
|
@ -2434,7 +2429,7 @@ nfp_me28_print_alu_shf (bfd_vma instr, int num_ctx,
|
|||
}
|
||||
|
||||
static int
|
||||
nfp_me28_print_alu (bfd_vma instr, int num_ctx,
|
||||
nfp_me28_print_alu (uint64_t instr, int num_ctx,
|
||||
struct disassemble_info *dinfo)
|
||||
{
|
||||
unsigned int gpr_wrboth = _BTST (instr, 41);
|
||||
|
@ -2447,7 +2442,7 @@ nfp_me28_print_alu (bfd_vma instr, int num_ctx,
|
|||
}
|
||||
|
||||
static int
|
||||
nfp_me28_print_immed (bfd_vma instr, int num_ctx,
|
||||
nfp_me28_print_immed (uint64_t instr, int num_ctx,
|
||||
struct disassemble_info *dinfo)
|
||||
{
|
||||
unsigned int gpr_wrboth = _BTST (instr, 41);
|
||||
|
@ -2459,7 +2454,7 @@ nfp_me28_print_immed (bfd_vma instr, int num_ctx,
|
|||
}
|
||||
|
||||
static int
|
||||
nfp_me28_print_ld_field (bfd_vma instr, int num_ctx,
|
||||
nfp_me28_print_ld_field (uint64_t instr, int num_ctx,
|
||||
struct disassemble_info *dinfo)
|
||||
{
|
||||
unsigned int gpr_wrboth = _BTST (instr, 41);
|
||||
|
@ -2472,13 +2467,13 @@ nfp_me28_print_ld_field (bfd_vma instr, int num_ctx,
|
|||
}
|
||||
|
||||
static int
|
||||
nfp_me28_print_ctx_arb (bfd_vma instr, struct disassemble_info *dinfo)
|
||||
nfp_me28_print_ctx_arb (uint64_t instr, struct disassemble_info *dinfo)
|
||||
{
|
||||
return nfp_me27_28_print_ctx_arb (instr, dinfo);
|
||||
}
|
||||
|
||||
static int
|
||||
nfp_me28_print_local_csr (bfd_vma instr, int num_ctx,
|
||||
nfp_me28_print_local_csr (uint64_t instr, int num_ctx,
|
||||
struct disassemble_info *dinfo)
|
||||
{
|
||||
unsigned int src_lmext = _BTST (instr, 42);
|
||||
|
@ -2487,13 +2482,13 @@ nfp_me28_print_local_csr (bfd_vma instr, int num_ctx,
|
|||
}
|
||||
|
||||
static int
|
||||
nfp_me28_print_branch (bfd_vma instr, struct disassemble_info *dinfo)
|
||||
nfp_me28_print_branch (uint64_t instr, struct disassemble_info *dinfo)
|
||||
{
|
||||
return nfp_me27_28_print_branch (instr, nfp_me28_br_inpstates, dinfo);
|
||||
}
|
||||
|
||||
static int
|
||||
nfp_me28_print_br_byte (bfd_vma instr, int num_ctx,
|
||||
nfp_me28_print_br_byte (uint64_t instr, int num_ctx,
|
||||
struct disassemble_info *dinfo)
|
||||
{
|
||||
unsigned int src_lmext = _BTST (instr, 42);
|
||||
|
@ -2501,7 +2496,7 @@ nfp_me28_print_br_byte (bfd_vma instr, int num_ctx,
|
|||
}
|
||||
|
||||
static int
|
||||
nfp_me28_print_br_bit (bfd_vma instr, int num_ctx,
|
||||
nfp_me28_print_br_bit (uint64_t instr, int num_ctx,
|
||||
struct disassemble_info *dinfo)
|
||||
{
|
||||
unsigned int src_lmext = _BTST (instr, 42);
|
||||
|
@ -2509,7 +2504,7 @@ nfp_me28_print_br_bit (bfd_vma instr, int num_ctx,
|
|||
}
|
||||
|
||||
static int
|
||||
nfp_me28_print_br_alu (bfd_vma instr, int num_ctx,
|
||||
nfp_me28_print_br_alu (uint64_t instr, int num_ctx,
|
||||
struct disassemble_info *dinfo)
|
||||
{
|
||||
unsigned int src_lmext = _BTST (instr, 42);
|
||||
|
@ -2517,7 +2512,7 @@ nfp_me28_print_br_alu (bfd_vma instr, int num_ctx,
|
|||
}
|
||||
|
||||
static int
|
||||
nfp_me28_print_mult (bfd_vma instr, int num_ctx,
|
||||
nfp_me28_print_mult (uint64_t instr, int num_ctx,
|
||||
struct disassemble_info *dinfo)
|
||||
{
|
||||
unsigned int gpr_wrboth = _BTST (instr, 41);
|
||||
|
@ -2803,7 +2798,7 @@ _print_instrs (bfd_vma addr, struct disassemble_info *dinfo, nfp_opts * opts)
|
|||
nfp_priv_data *priv = init_nfp_priv (dinfo);
|
||||
bfd_byte buffer[8];
|
||||
int err;
|
||||
bfd_vma instr = 0;
|
||||
uint64_t instr = 0;
|
||||
size_t island, menum;
|
||||
int num_ctx, scs_cnt, addr_3rdparty32, pc, tmpi, tmpj;
|
||||
int is_text = 1;
|
||||
|
|
Loading…
Reference in New Issue