projects
/
deliverable
/
binutils-gdb.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Allow both signed and unsigned fields in PowerPC cmpli insn
[deliverable/binutils-gdb.git]
/
opcodes
/
i860-dis.c
diff --git
a/opcodes/i860-dis.c
b/opcodes/i860-dis.c
index ba183ab3f70132f723c7653eda95cec116e7dc4c..d97b1dc6005fd2de5769fe60d3e68d1015a3fced 100644
(file)
--- a/
opcodes/i860-dis.c
+++ b/
opcodes/i860-dis.c
@@
-1,22
+1,26
@@
/* Disassembler for the i860.
/* Disassembler for the i860.
- Copyright
2000
Free Software Foundation, Inc.
+ Copyright
(C) 2000-2014
Free Software Foundation, Inc.
Contributed by Jason Eckhardt <jle@cygnus.com>.
Contributed by Jason Eckhardt <jle@cygnus.com>.
-This program is free software; you can redistribute it and/or modify
-it under the terms of the GNU General Public License as published by
-the Free Software Foundation; either version 2 of the License, or
-(at your option) any later version.
+ This file is part of the GNU opcodes library.
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-
GNU General Public License for more details
.
+ This library is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3, or (at your option)
+
any later version
.
-You should have received a copy of the GNU General Public License
-along with this program; if not, write to the Free Software
-Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+ It is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
+ or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public
+ License for more details.
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston,
+ MA 02110-1301, USA. */
+
+#include "sysdep.h"
#include "dis-asm.h"
#include "opcode/i860.h"
#include "dis-asm.h"
#include "opcode/i860.h"
@@
-37,14
+41,12
@@
static const char *const frnames[] =
"f16", "f17", "f18", "f19", "f20", "f21", "f22", "f23",
"f24", "f25", "f26", "f27", "f28", "f29", "f30", "f31"};
"f16", "f17", "f18", "f19", "f20", "f21", "f22", "f23",
"f24", "f25", "f26", "f27", "f28", "f29", "f30", "f31"};
-/* Control/status register names (encoded as 0..5 in the instruction). */
+/* Control/status register names (encoded as 0..11 in the instruction).
+ Registers bear, ccr, p0, p1, p2 and p3 are XP only. */
static const char *const crnames[] =
static const char *const crnames[] =
- {"fir", "psr", "dirbase", "db", "fsr", "epsr", "
", ""};
-
+ {"fir", "psr", "dirbase", "db", "fsr", "epsr", "
bear", "ccr",
+ "p0", "p1", "p2", "p3", "--", "--", "--", "--" };
-/* Prototypes. */
-static int sign_ext PARAMS((unsigned int, int));
-static void print_br_address PARAMS((disassemble_info *, bfd_vma, long));
/* True if opcode is xor, xorh, and, andh, or, orh, andnot, andnoth. */
/* True if opcode is xor, xorh, and, andh, or, orh, andnot, andnoth. */
@@
-58,9
+60,7
@@
static void print_br_address PARAMS((disassemble_info *, bfd_vma, long));
/* Sign extend N-bit number. */
static int
/* Sign extend N-bit number. */
static int
-sign_ext (x, n)
- unsigned int x;
- int n;
+sign_ext (unsigned int x, int n)
{
int t;
t = x >> (n - 1);
{
int t;
t = x >> (n - 1);
@@
-72,15
+72,12
@@
sign_ext (x, n)
/* Print a PC-relative branch offset. VAL is the sign extended value
from the branch instruction. */
static void
/* Print a PC-relative branch offset. VAL is the sign extended value
from the branch instruction. */
static void
-print_br_address (info, memaddr, val)
- disassemble_info *info;
- bfd_vma memaddr;
- long val;
+print_br_address (disassemble_info *info, bfd_vma memaddr, long val)
{
long adj = (long)memaddr + 4 + (val << 2);
{
long adj = (long)memaddr + 4 + (val << 2);
- (*info->fprintf_func) (info->stream, "0x%08x", adj);
+ (*info->fprintf_func) (info->stream, "0x%08
l
x", adj);
/* Attempt to obtain a symbol for the target address. */
/* Attempt to obtain a symbol for the target address. */
@@
-94,9
+91,7
@@
print_br_address (info, memaddr, val)
/* Print one instruction. */
int
/* Print one instruction. */
int
-print_insn_i860 (memaddr, info)
- bfd_vma memaddr;
- disassemble_info *info;
+print_insn_i860 (bfd_vma memaddr, disassemble_info *info)
{
bfd_byte buff[4];
unsigned int insn, i;
{
bfd_byte buff[4];
unsigned int insn, i;
@@
-138,8
+133,11
@@
print_insn_i860 (memaddr, info)
const char *s;
int val;
const char *s;
int val;
- /* If this a flop and its dual bit is set, prefix with 'd.'. */
- if ((insn & 0xfc000000) == 0x48000000 && (insn & 0x200))
+ /* If this a flop (or a shrd) and its dual bit is set,
+ prefix with 'd.'. */
+ if (((insn & 0xfc000000) == 0x48000000
+ || (insn & 0xfc000000) == 0xb0000000)
+ && (insn & 0x200))
(*info->fprintf_func) (info->stream, "d.%s\t", opcode->name);
else
(*info->fprintf_func) (info->stream, "%s\t", opcode->name);
(*info->fprintf_func) (info->stream, "d.%s\t", opcode->name);
else
(*info->fprintf_func) (info->stream, "%s\t", opcode->name);
@@
-187,7
+185,7
@@
print_insn_i860 (memaddr, info)
/* Control register. */
case 'c':
(*info->fprintf_func) (info->stream, "%s%s", I860_REG_PREFIX,
/* Control register. */
case 'c':
(*info->fprintf_func) (info->stream, "%s%s", I860_REG_PREFIX,
- crnames[(insn >> 21) & 0x
7
]);
+ crnames[(insn >> 21) & 0x
f
]);
break;
/* 16-bit immediate (sign extend, except for bitwise ops). */
break;
/* 16-bit immediate (sign extend, except for bitwise ops). */
This page took
0.025075 seconds
and
4
git commands to generate.