projects
/
deliverable
/
binutils-gdb.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Updated Serbian translation for the binutils sub-directory, and Swedish translation...
[deliverable/binutils-gdb.git]
/
opcodes
/
cr16-dis.c
diff --git
a/opcodes/cr16-dis.c
b/opcodes/cr16-dis.c
index b19eed0df3c75083d7bc64771c24f31990eba8e3..1be67b21181d98fb882027b1b099075f2a76949c 100644
(file)
--- a/
opcodes/cr16-dis.c
+++ b/
opcodes/cr16-dis.c
@@
-1,5
+1,5
@@
/* Disassembler code for CR16.
/* Disassembler code for CR16.
- Copyright (C) 2007-20
18
Free Software Foundation, Inc.
+ Copyright (C) 2007-20
20
Free Software Foundation, Inc.
Contributed by M R Swami Reddy (MR.Swami.Reddy@nsc.com).
This file is part of GAS, GDB and the GNU binutils.
Contributed by M R Swami Reddy (MR.Swami.Reddy@nsc.com).
This file is part of GAS, GDB and the GNU binutils.
@@
-30,11
+30,11
@@
/* Extract 'n_bits' from 'a' starting from offset 'offs'. */
#define EXTRACT(a, offs, n_bits) \
/* Extract 'n_bits' from 'a' starting from offset 'offs'. */
#define EXTRACT(a, offs, n_bits) \
- (n_bits == 32 ? (((a) >> (offs)) & 0xffffffffL) \
- : (((a) >> (offs)) & ((1 << (n_bits)) -1)))
+ (((a) >> (offs)) & ((1ul << ((n_bits) - 1) << 1) - 1))
-/* Set Bit Mask - a mask to set all bits starting from offset 'offs'. */
-#define SBM(offs) ((((1 << (32 - offs)) -1) << (offs)))
+/* Set Bit Mask - a mask to set all bits in a 32-bit word starting
+ from offset 'offs'. */
+#define SBM(offs) ((1ul << 31 << 1) - (1ul << (offs)))
typedef struct
{
typedef struct
{
@@
-319,8
+319,7
@@
cr16_match_opcode (void)
{
unsigned long mask;
/* The instruction 'constant' opcode doesn't exceed 32 bits. */
{
unsigned long mask;
/* The instruction 'constant' opcode doesn't exceed 32 bits. */
- unsigned long doubleWord = (cr16_words[1]
- + (cr16_words[0] << 16)) & 0xffffffff;
+ unsigned long doubleWord = cr16_words[1] + ((unsigned) cr16_words[0] << 16);
/* Start searching from end of instruction table. */
instruction = &cr16_instruction[NUMOPCODES - 2];
/* Start searching from end of instruction table. */
instruction = &cr16_instruction[NUMOPCODES - 2];
@@
-329,9
+328,6
@@
cr16_match_opcode (void)
while (instruction >= cr16_instruction)
{
mask = build_mask ();
while (instruction >= cr16_instruction)
{
mask = build_mask ();
- /* Adjust mask for bcond with 32-bit size instruction */
- if ((IS_INSN_MNEMONIC("b") && instruction->size == 2))
- mask = 0xff0f0000;
if ((doubleWord & mask) == BIN (instruction->match,
instruction->match_bits))
if ((doubleWord & mask) == BIN (instruction->match,
instruction->match_bits))
This page took
0.02812 seconds
and
4
git commands to generate.