| OLD | NEW |
| 1 /* pj-dis.c -- Disassemble picoJava instructions. | 1 /* pj-dis.c -- Disassemble picoJava instructions. |
| 2 Copyright 1999, 2000, 2001, 2002, 2005, 2007 Free Software Foundation, Inc. | 2 Copyright 1999, 2000, 2001, 2002, 2005, 2007, 2012 |
| 3 Free Software Foundation, Inc. |
| 3 Contributed by Steve Chamberlain, of Transmeta (sac@pobox.com). | 4 Contributed by Steve Chamberlain, of Transmeta (sac@pobox.com). |
| 4 | 5 |
| 5 This file is part of the GNU opcodes library. | 6 This file is part of the GNU opcodes library. |
| 6 | 7 |
| 7 This library is free software; you can redistribute it and/or modify | 8 This library is free software; you can redistribute it and/or modify |
| 8 it under the terms of the GNU General Public License as published by | 9 it under the terms of the GNU General Public License as published by |
| 9 the Free Software Foundation; either version 3, or (at your option) | 10 the Free Software Foundation; either version 3, or (at your option) |
| 10 any later version. | 11 any later version. |
| 11 | 12 |
| 12 It is distributed in the hope that it will be useful, but WITHOUT | 13 It is distributed in the hope that it will be useful, but WITHOUT |
| 13 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY | 14 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY |
| 14 or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public | 15 or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public |
| 15 License for more details. | 16 License for more details. |
| 16 | 17 |
| 17 You should have received a copy of the GNU General Public License | 18 You should have received a copy of the GNU General Public License |
| 18 along with this program; if not, write to the Free Software | 19 along with this program; if not, write to the Free Software |
| 19 Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, | 20 Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, |
| 20 MA 02110-1301, USA. */ | 21 MA 02110-1301, USA. */ |
| 21 | 22 |
| 23 #include "sysdep.h" |
| 22 #include <stdio.h> | 24 #include <stdio.h> |
| 23 #include "sysdep.h" | |
| 24 #include "opcode/pj.h" | 25 #include "opcode/pj.h" |
| 25 #include "dis-asm.h" | 26 #include "dis-asm.h" |
| 26 | 27 |
| 27 extern const pj_opc_info_t pj_opc_info[512]; | 28 extern const pj_opc_info_t pj_opc_info[512]; |
| 28 | 29 |
| 29 static int | 30 static int |
| 30 get_int (bfd_vma memaddr, int *iptr, struct disassemble_info *info) | 31 get_int (bfd_vma memaddr, int *iptr, struct disassemble_info *info) |
| 31 { | 32 { |
| 32 unsigned char ival[4]; | 33 unsigned char ival[4]; |
| 33 int status = info->read_memory_func (memaddr, ival, 4, info); | 34 int status = info->read_memory_func (memaddr, ival, 4, info); |
| (...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 168 sep = ","; | 169 sep = ","; |
| 169 addr += size; | 170 addr += size; |
| 170 } | 171 } |
| 171 return op->len; | 172 return op->len; |
| 172 } | 173 } |
| 173 | 174 |
| 174 fail: | 175 fail: |
| 175 info->memory_error_func (status, addr, info); | 176 info->memory_error_func (status, addr, info); |
| 176 return -1; | 177 return -1; |
| 177 } | 178 } |
| OLD | NEW |