version 1.1.1.1, 2016/01/26 17:26:54 |
version 1.1.1.2, 2016/10/26 17:03:37 |
|
|
/* Print instructions for the Motorola 88000, for GDB and GNU Binutils. |
/* Print instructions for the Motorola 88000, for GDB and GNU Binutils. |
Copyright 1986, 1987, 1988, 1989, 1990, 1991, 1993, 1998, 2000, 2001, |
Copyright (C) 1986-2015 Free Software Foundation, Inc. |
2002, 2005, 2007, 2008 Free Software Foundation, Inc. |
|
Contributed by Data General Corporation, November 1989. |
Contributed by Data General Corporation, November 1989. |
Partially derived from an earlier printcmd.c. |
Partially derived from an earlier printcmd.c. |
|
|
Line 523 HASHTAB *hashtable[HASHVAL] = {0}; |
|
Line 522 HASHTAB *hashtable[HASHVAL] = {0}; |
|
|
|
|
|
/* Initialize the disassembler instruction table. |
/* Initialize the disassembler instruction table. |
|
|
Initialize the hash table and instruction table for the |
Initialize the hash table and instruction table for the |
disassembler. This should be called once before the first call to |
disassembler. This should be called once before the first call to |
disasm(). */ |
disasm(). */ |
Line 550 init_disasm (void) |
|
Line 549 init_disasm (void) |
|
hashtable[hashvalue] = &hashentries[i]; |
hashtable[hashvalue] = &hashentries[i]; |
} |
} |
} |
} |
|
|
/* Decode an Operand of an instruction. |
/* Decode an Operand of an instruction. |
|
|
This function formats and writes an operand of an instruction to |
This function formats and writes an operand of an instruction to |
info based on the operand specification. When the `first' flag is |
info based on the operand specification. When the `first' flag is |
set this is the first operand of an instruction. Undefined operand |
set this is the first operand of an instruction. Undefined operand |
types cause a <dis error> message. |
types cause a <dis error> message. |
|
|
Parameters: |
Parameters: |
disassemble_info where the operand may be printed |
disassemble_info where the operand may be printed |
OPSPEC *opptr pointer to an operand specification |
OPSPEC *opptr pointer to an operand specification |
Line 565 init_disasm (void) |
|
Line 564 init_disasm (void) |
|
UINT pc pc of instruction; used for pc-relative disp. |
UINT pc pc of instruction; used for pc-relative disp. |
int first flag which if nonzero indicates the first |
int first flag which if nonzero indicates the first |
operand of an instruction |
operand of an instruction |
|
|
The operand specified is extracted from the instruction and is |
The operand specified is extracted from the instruction and is |
written to buf in the format specified. The operand is preceded by |
written to buf in the format specified. The operand is preceded by |
a comma if it is not the first operand of an instruction and it is |
a comma if it is not the first operand of an instruction and it is |
Line 655 printop (struct disassemble_info *info, |
|
Line 654 printop (struct disassemble_info *info, |
|
else |
else |
(*info->fprintf_func) (info->stream, "%x", extracted_field); |
(*info->fprintf_func) (info->stream, "%x", extracted_field); |
break; |
break; |
|
|
case PCREL: |
case PCREL: |
(*info->print_address_func) |
(*info->print_address_func) |
(pc + (4 * (SEXT (inst, opptr->offset, opptr->width))), |
(pc + (4 * (SEXT (inst, opptr->offset, opptr->width))), |
Line 684 printop (struct disassemble_info *info, |
|
Line 683 printop (struct disassemble_info *info, |
|
`pc' should be the address of this instruction, it will be used to |
`pc' should be the address of this instruction, it will be used to |
print the target address if this is a relative jump or call the |
print the target address if this is a relative jump or call the |
disassembled instruction is written to `info'. |
disassembled instruction is written to `info'. |
|
|
The function returns the length of this instruction in bytes. */ |
The function returns the length of this instruction in bytes. */ |
|
|
static int |
static int |