1 /* Disassemble V850 instructions.
2 Copyright (C) 1996 Free Software Foundation, Inc.
4 This program is free software; you can redistribute it and/or modify
5 it under the terms of the GNU General Public License as published by
6 the Free Software Foundation; either version 2 of the License, or
7 (at your option) any later version.
9 This program is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 GNU General Public License for more details.
14 You should have received a copy of the GNU General Public License
15 along with this program; if not, write to the Free Software
16 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
22 #include "opcode/v850.h"
26 print_insn_v850 (memaddr
, info
)
28 struct disassemble_info
*info
;
34 status
= (*info
->read_memory_func
) (memaddr
, buffer
, 4, info
);
37 (*info
->memory_error_func
) (status
, memaddr
, info
);
40 insn
= bfd_getl32 (buffer
);
42 disassemble (insn
, info
);
43 if ((insn
& 0x0600) == 0x0600)
49 disassemble (insn
, info
)
51 struct disassemble_info
*info
;
53 struct v850_opcode
*op
= (struct v850_opcode
*)v850_opcodes
;
55 /* If this is a two byte insn, then mask off the high bits. */
56 if ((insn
& 0x0600) != 0x0600)
59 /* Find the opcode. */
62 if ((op
->mask
& insn
) == op
->opcode
)
65 (*info
->fprintf_func
) (info
->stream
, "%s\t", op
->name
);
73 if ((insn
& 0x0600) != 0x0600)
74 (*info
->fprintf_func
) (info
->stream
, ".short\t0x%04x", insn
);
76 (*info
->fprintf_func
) (info
->stream
, ".long\t0x%08x", insn
);
This page took 0.031454 seconds and 5 git commands to generate.