diff options
author | Francois H. Theron <francois.theron@netronome.com> | 2018-05-15 13:28:06 +0100 |
---|---|---|
committer | Nick Clifton <nickc@redhat.com> | 2018-05-15 13:28:06 +0100 |
commit | 1678bd35a35a3bace2d4aee39b64d96c638651f0 (patch) | |
tree | 020a655f6d696b6d97015042aa513839af577fa1 /include | |
parent | Add a new Portuguese translation for the bfd sub-directory. (diff) | |
download | binutils-gdb-1678bd35a35a3bace2d4aee39b64d96c638651f0.tar.gz binutils-gdb-1678bd35a35a3bace2d4aee39b64d96c638651f0.tar.bz2 binutils-gdb-1678bd35a35a3bace2d4aee39b64d96c638651f0.zip |
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.
Diffstat (limited to 'include')
-rw-r--r-- | include/ChangeLog | 4 | ||||
-rw-r--r-- | include/opcode/nfp.h | 105 |
2 files changed, 54 insertions, 55 deletions
diff --git a/include/ChangeLog b/include/ChangeLog index fde5031ddca..92c80fdfbda 100644 --- a/include/ChangeLog +++ b/include/ChangeLog @@ -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. diff --git a/include/opcode/nfp.h b/include/opcode/nfp.h index 6d9efaf6666..d11846237d6 100644 --- a/include/opcode/nfp.h +++ b/include/opcode/nfp.h @@ -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) |