projects
/
deliverable
/
binutils-gdb.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Don't define _FORTIFY_SOURCE on MinGW
[deliverable/binutils-gdb.git]
/
opcodes
/
z8k-dis.c
diff --git
a/opcodes/z8k-dis.c
b/opcodes/z8k-dis.c
index 5e5f0edafe717c3fea9eebfd61c76b6a052a0411..cb871decfaba7033f601b5b347171db068940135 100644
(file)
--- a/
opcodes/z8k-dis.c
+++ b/
opcodes/z8k-dis.c
@@
-1,26
+1,26
@@
/* Disassemble z8000 code.
/* Disassemble z8000 code.
- Copyright 1992, 1993, 1998, 2000, 2001, 2002, 2003
- Free Software Foundation, Inc.
+ Copyright (C) 1992-2020 Free Software Foundation, Inc.
- This file is part of
GNU Binutils
.
+ This file is part of
the GNU opcodes library
.
- This
program
is free software; you can redistribute it and/or modify
+ 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
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.
+ the Free Software Foundation; either version
3, or (at your option)
+ any later version.
- 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.
+ 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
You should have received a copy of the GNU General Public License
- along with this
program; if not, write to the Free Softwar
e
- F
oundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301
,
- USA. */
+ along with this
file; see the file COPYING. If not, write to th
e
+ F
ree Software Foundation, 51 Franklin Street - Fifth Floor, Boston
,
+
MA 02110-1301,
USA. */
#include "sysdep.h"
#include "sysdep.h"
-#include "dis-asm.h"
+#include "disassemble.h"
+#include "libiberty.h"
#define DEFINE_TABLE
#include "z8k-opc.h"
#define DEFINE_TABLE
#include "z8k-opc.h"
@@
-36,9
+36,9
@@
typedef struct
unsigned short words[24];
/* Nibble number of first word not yet fetched. */
unsigned short words[24];
/* Nibble number of first word not yet fetched. */
- int max_fetched;
+
unsigned
int max_fetched;
bfd_vma insn_start;
bfd_vma insn_start;
-
jmp_buf
bailout;
+
OPCODES_SIGJMP_BUF
bailout;
int tabl_index;
char instr_asmsrc[80];
int tabl_index;
char instr_asmsrc[80];
@@
-77,7
+77,7
@@
fetch_data (struct disassemble_info *info, int nibble)
if (status != 0)
{
(*info->memory_error_func) (status, priv->insn_start, info);
if (status != 0)
{
(*info->memory_error_func) (status, priv->insn_start, info);
-
longjmp
(priv->bailout, 1);
+
OPCODES_SIGLONGJMP
(priv->bailout, 1);
}
{
}
{
@@
-150,7
+150,7
@@
print_insn_z8k (bfd_vma addr, disassemble_info *info, int is_segmented)
info->private_data = (PTR) &instr_data;
instr_data.max_fetched = 0;
instr_data.insn_start = addr;
info->private_data = (PTR) &instr_data;
instr_data.max_fetched = 0;
instr_data.insn_start = addr;
- if (
setjmp
(instr_data.bailout) != 0)
+ if (
OPCODES_SIGSETJMP
(instr_data.bailout) != 0)
/* Error return. */
return -1;
/* Error return. */
return -1;
@@
-190,7
+190,7
@@
print_insn_z8002 (bfd_vma addr, disassemble_info *info)
int
z8k_lookup_instr (unsigned char *nibbles, disassemble_info *info)
{
int
z8k_lookup_instr (unsigned char *nibbles, disassemble_info *info)
{
- int nibl_index, tabl_index;
+
unsigned
int nibl_index, tabl_index;
int nibl_matched;
int need_fetch = 0;
unsigned short instr_nibl;
int nibl_matched;
int need_fetch = 0;
unsigned short instr_nibl;
@@
-203,7
+203,9
@@
z8k_lookup_instr (unsigned char *nibbles, disassemble_info *info)
{
nibl_matched = 1;
for (nibl_index = 0;
{
nibl_matched = 1;
for (nibl_index = 0;
- nibl_index < z8k_table[tabl_index].length * 2 && nibl_matched;
+ nibl_matched
+ && nibl_index < ARRAY_SIZE (z8k_table[0].byte_info)
+ && nibl_index < z8k_table[tabl_index].length * 2;
nibl_index++)
{
if ((nibl_index % 4) == 0)
nibl_index++)
{
if ((nibl_index % 4) == 0)
@@
-282,7
+284,7
@@
output_instr (instr_data_s *instr_data,
unsigned long addr ATTRIBUTE_UNUSED,
disassemble_info *info)
{
unsigned long addr ATTRIBUTE_UNUSED,
disassemble_info *info)
{
- int num_bytes;
+
unsigned
int num_bytes;
char out_str[100];
out_str[0] = 0;
char out_str[100];
out_str[0] = 0;
@@
-298,7
+300,7
@@
output_instr (instr_data_s *instr_data,
static void
unpack_instr (instr_data_s *instr_data, int is_segmented, disassemble_info *info)
{
static void
unpack_instr (instr_data_s *instr_data, int is_segmented, disassemble_info *info)
{
- int nibl_count, loop;
+
unsigned
int nibl_count, loop;
unsigned short instr_nibl, instr_byte, instr_word;
long instr_long;
unsigned int tabl_datum, datum_class;
unsigned short instr_nibl, instr_byte, instr_word;
long instr_long;
unsigned int tabl_datum, datum_class;
This page took
0.026281 seconds
and
4
git commands to generate.