source: trunk/src/binutils/opcodes/pj-dis.c@ 167

Last change on this file since 167 was 10, checked in by bird, 23 years ago

Initial revision

  • Property cvs2svn:cvs-rev set to 1.1
  • Property svn:eol-style set to native
  • Property svn:executable set to *
File size: 4.3 KB
Line 
1/* pj-dis.c -- Disassemble picoJava instructions.
2 Copyright 1999, 2000 Free Software Foundation, Inc.
3 Contributed by Steve Chamberlain, of Transmeta ([email protected]).
4
5This program is free software; you can redistribute it and/or modify
6it under the terms of the GNU General Public License as published by
7the Free Software Foundation; either version 2 of the License, or
8(at your option) any later version.
9
10This program is distributed in the hope that it will be useful,
11but WITHOUT ANY WARRANTY; without even the implied warranty of
12MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13GNU General Public License for more details.
14
15You should have received a copy of the GNU General Public License
16along with this program; if not, write to the Free Software
17Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
18
19
20#include <stdio.h>
21#include "sysdep.h"
22#include "opcode/pj.h"
23#include "dis-asm.h"
24
25extern const pj_opc_info_t pj_opc_info[512];
26
27static int get_int (memaddr, iptr, info)
28 bfd_vma memaddr;
29 int *iptr;
30 struct disassemble_info *info;
31{
32 unsigned char ival[4];
33
34 int status = info->read_memory_func (memaddr, ival, 4, info);
35
36 *iptr = (ival[0] << 24)
37 | (ival[1] << 16)
38 | (ival[2] << 8)
39 | (ival[3] << 0) ;
40
41 return status;
42}
43
44int
45print_insn_pj (addr, info)
46 bfd_vma addr;