Line 1... |
Line 1... |
/* Disassembly routines for TMS320C30 architecture
|
/* Disassembly routines for TMS320C30 architecture
|
Copyright 1998, 1999, 2000, 2002, 2005, 2007 Free Software Foundation, Inc.
|
Copyright 1998, 1999, 2000, 2002, 2005, 2007, 2009
|
|
Free Software Foundation, Inc.
|
Contributed by Steven Haworth (steve@pm.cse.rmit.edu.au)
|
Contributed by Steven Haworth (steve@pm.cse.rmit.edu.au)
|
|
|
This file is part of the GNU opcodes library.
|
This file is part of the GNU opcodes library.
|
|
|
This library is free software; you can redistribute it and/or modify
|
This library is free software; you can redistribute it and/or modify
|
Line 62... |
Line 63... |
static unsigned int _pc;
|
static unsigned int _pc;
|
|
|
struct instruction
|
struct instruction
|
{
|
{
|
int type;
|
int type;
|
template *tm;
|
insn_template *tm;
|
partemplate *ptm;
|
partemplate *ptm;
|
};
|
};
|
|
|
static int
|
static int
|
get_tic30_instruction (unsigned long insn_word, struct instruction *insn)
|
get_tic30_instruction (unsigned long insn_word, struct instruction *insn)
|
Line 76... |
Line 77... |
case TWO_OPERAND_1:
|
case TWO_OPERAND_1:
|
case TWO_OPERAND_2:
|
case TWO_OPERAND_2:
|
case THREE_OPERAND:
|
case THREE_OPERAND:
|
insn->type = NORMAL_INSN;
|
insn->type = NORMAL_INSN;
|
{
|
{
|
template *current_optab = (template *) tic30_optab;
|
insn_template *current_optab = (insn_template *) tic30_optab;
|
|
|
for (; current_optab < tic30_optab_end; current_optab++)
|
for (; current_optab < tic30_optab_end; current_optab++)
|
{
|
{
|
if (GET_TYPE (current_optab->base_opcode) == GET_TYPE (insn_word))
|
if (GET_TYPE (current_optab->base_opcode) == GET_TYPE (insn_word))
|
{
|
{
|
Line 143... |
Line 144... |
break;
|
break;
|
|
|
case BRANCHES:
|
case BRANCHES:
|
insn->type = NORMAL_INSN;
|
insn->type = NORMAL_INSN;
|
{
|
{
|
template *current_optab = (template *) tic30_optab;
|
insn_template *current_optab = (insn_template *) tic30_optab;
|
|
|
for (; current_optab < tic30_optab_end; current_optab++)
|
for (; current_optab < tic30_optab_end; current_optab++)
|
{
|
{
|
if (GET_TYPE (current_optab->base_opcode) == GET_TYPE (insn_word))
|
if (GET_TYPE (current_optab->base_opcode) == GET_TYPE (insn_word))
|
{
|
{
|