* alldeps.mak, configure.in, i860-break.h, i860-opcode.h,

i860-pinsn.c, i860-tdep.c, config/i860/*:  Remove incomplete i860
	support that can't be integrated anyway due to lack of clear
	authorship.
This commit is contained in:
Fred Fish 1993-03-25 23:08:24 +00:00
parent ccf1e898d7
commit f747d2596a
7 changed files with 4 additions and 3109 deletions

View File

@ -241,6 +241,10 @@ xcoffsolib.c
xcoffsolib.h
z8k-tdep.c
# Things which are explicitly *not* kept, for now.
# state.c - Not used at the moment, keep for reference (fnf)
# state.h - Not used at the moment, keep for reference (fnf)
Do-last:
echo Thawing away the \"chill\"...

View File

@ -36,8 +36,6 @@ i386mach-nat.c\
i386v-nat.c\
i386v4-nat.c\
i387-tdep.c\
i860-pinsn.c\
i860-tdep.c\
i960-pinsn.c\
i960-tdep.c\
infptrace.c\
@ -139,8 +137,6 @@ ALLPARAM=\
./config/i386/xm-linux.h\
./config/i386/xm-sun386.h\
./config/i386/xm-symmetry.h\
./config/i860/tm-stratus.h\
./config/i860/xm-stratus.h\
./config/i960/tm-nindy960.h\
./config/i960/tm-vx960.h\
./config/m68k/nm-apollo68b.h\
@ -266,8 +262,6 @@ ALLCONFIG=\
./config/i386/sun386.mt\
./config/i386/symmetry.mh\
./config/i386/symmetry.mt\
./config/i860/stratus.mh\
./config/i860/stratus.mt\
./config/i960/nindy960.mt\
./config/i960/vxworks960.mt\
./config/m68k/3b1.mh\

View File

@ -47,8 +47,6 @@ i[34]86-*-sysv32) gdb_host=i386v32 ;;
i[34]86-*-sysv4*) gdb_host=i386v4 ;;
i[34]86-*-sysv*) gdb_host=i386v ;;
i860-*-*) gdb_host=stratus ;;
m680[01]0-sun-sunos3*) gdb_host=sun2os3 ;;
m680[01]0-sun-sunos4*) gdb_host=sun2os4 ;;
m68030-sony-*) gdb_host=news1000 ;;
@ -169,8 +167,6 @@ i[34]86-*-sco*) gdb_target=i386v ;;
i[34]86-*-sysv*) gdb_target=i386v ;;
i[34]86-*-linux) gdb_target=linux ;;
i860-*-*) gdb_target=stratus ;;
i960-*-bout) gdb_target=vxworks960 ;;
i960-*-coff) gdb_target=nindy960 ;;
i960-*-elf) gdb_target=nindy960 ;;

View File

@ -1,83 +0,0 @@
/* I860 -specific breakpoint stuff.
Copyright (C) 1986, 1987 Free Software Foundation, Inc.
GDB is distributed in the hope that it will be useful, but WITHOUT ANY
WARRANTY. No author or distributor accepts responsibility to anyone
for the consequences of using it or for whether it serves any
particular purpose or works at all, unless he says so in writing.
Refer to the GDB General Public License for full details.
Everyone is granted permission to copy, modify and redistribute GDB,
but only under the conditions described in the GDB General Public
License. A copy of this license is supposed to have been given to you
along with GDB so you can know your rights and responsibilities. It
should be in a file named COPYING. Among other things, the copyright
notice and this notice must be preserved on all copies.
In other words, go ahead and share GDB, but don't try to stop
anyone else from sharing it farther. Help stamp out software hoarding!
*/
/* #define BREAKPOINT_DEBUG 1 */
#include "tm.h"
#ifdef i860
void i860_insert_breakpoints();
void i860_dbrk_breakpoints();
#define BREAKPOINT_HERE(b,pc) ((b->act_addr[0] == pc) || (b->act_addr[1] == pc) ||(b->act_addr[2] == pc) || (b->act_addr[2] == pc))
/* This is the sequence of bytes we insert for a breakpoint. */
static char break_insn[] = BREAKPOINT;
static char float_insn[] = BREAKFLOAT;
#endif
#define FOPMSK 0x4C000000
#define DOPMSK 0x4C000200
#define FOP860 0x48000000
#define DOP860 0x48000200
#define ALN32(a) ((( (int)(a) & 0x0007) == 0x04) )
#define ALN64(a) ((( (int)(a) & 0x0007) == 0x00) )
/*
#define ISFOP(a) ((((adj_read_memory_integer(a)) & FOPMSK)==FOP860 ))
#define ISCOR(a) ((!(((adj_read_memory_integer(a)) & FOPMSK)==FOP860 )))
#define ISDOP(a) ((((adj_read_memory_integer(a)) & DOPMSK)==DOP860 ))
*/
#define ISFOP(a) ((((adj_read_memory_integer(a)) & FOPMSK)==FOP860 ))
#define ISCOR(a) ((!(((adj_read_memory_integer(a)) & FOPMSK)==FOP860 )))
#define ISDOP(a) ((((adj_read_memory_integer(a)) & DOPMSK)==DOP860 ))
#define ISDIM(a) (\
( ISDOP(a) && ALN64(a) && ISCOR(a+4)) || \
((ISFOP(a) && ALN64(a) && ISCOR(a+4)) && (ISDOP(a-8) || ISDOP(a-0x10))) || \
( ISCOR(a) && ALN32(a) && ISDOP(a-4)) || \
((ISCOR(a) && ALN32(a) && ISFOP(a+4)) && (ISDOP(a-4) || ISDOP(a-0x0C))) \
)
/*
#define ISDIM(a) (\
( ISDOP(a) && ALN64(a) && ISCOR(a+4)) || \
((ISFOP(a) && ALN64(a) && ISCOR(a+4)) && (ISDOP(a-8) || ISDOP(a-16))) || \
( ISCOR(a) && ALN32(a) && ISDOP(a-4)) || \
((ISCOR(a) && ALN32(a) && ISFOP(a+4)) && (ISDOP(a-4) || ISDOP(a-12))) \
)
*/
#define FOPADR(a) ( ((int)(a) & 0xFFFFFFF8) )
#define CORADR(a) ((((int)(a) & 0xFFFFFFFC ) | 0x04) )
#define DMNEXT(a) ( ISDIM(a)?(ISDIM(a+1)?(a+2):(a+1)):(a+1) )
#define STDIM (((*(int *)&(registers[REGISTER_BYTE(PS_REGNUM)])) & 0x6000) == 0x2000 )
#define INDIM (((*(int *)&(registers[REGISTER_BYTE(PS_REGNUM)])) & 0x6000) == 0x4000 )
#define ENDIM (((*(int *)&(registers[REGISTER_BYTE(PS_REGNUM)])) & 0x6000) == 0x6000 )
#define DIM 8
#define RIM 0x8004
#define SIM 4
#define ADDR_INC(a) (((int)(a) & 0x0FFF))
#define SINGLE_STEP_MODE 1
#define BREAK_MODE 0

View File

@ -1,134 +0,0 @@
/* Intel I860 opcde list for GDB, the GNU debugger.
Copyright (C) 1986, 1987 Free Software Foundation, Inc.
GDB is distributed in the hope that it will be useful, but WITHOUT ANY
WARRANTY. No author or distributor accepts responsibility to anyone
for the consequences of using it or for whether it serves any
particular purpose or works at all, unless he says so in writing.
Refer to the GDB General Public License for full details.
Everyone is granted permission to copy, modify and redistribute GDB,
but only under the conditions described in the GDB General Public
License. A copy of this license is supposed to have been given to you
along with GDB so you can know your rights and responsibilities. It
should be in a file named COPYING. Among other things, the copyright
notice and this notice must be preserved on all copies.
In other words, go ahead and share GDB, but don't try to stop
anyone else from sharing it farther. Help stamp out software hoarding!
*/
#ifdef BIG_ENDIAN
struct gen_fmt
{
unsigned op1 : 6;
unsigned src2 : 5;
unsigned dest : 5;
unsigned src1 : 5;
unsigned offset : 11;
};
struct geni_fmt
{
unsigned op1 : 6;
unsigned src2 : 5;
unsigned dest : 5;
unsigned offset : 16;
};
struct esc_fmt
{
unsigned op1 : 6;
unsigned res1 : 10;
unsigned src1 : 5;
unsigned res2 : 6;
unsigned op2 : 5;
};
struct ctrl_fmt
{
unsigned op1 : 6;
unsigned int offset : 26;
};
struct fp_fmt
{
unsigned op1 : 6;
unsigned src2 : 5;
unsigned dest : 5;
unsigned src1 : 5;
unsigned p : 1;
unsigned d : 1;
unsigned s : 1;
unsigned r : 1;
unsigned op2 : 7;
};
union insn_fmt
{
struct gen_fmt gen;
struct geni_fmt geni;
struct esc_fmt esc;
struct ctrl_fmt ctrl;
struct fp_fmt fp;
long int_val;
};
#else
struct gen_fmt
{
unsigned offset : 11;
unsigned src1 : 5;
unsigned dest : 5;
unsigned src2 : 5;
unsigned op1 : 6;
};
struct geni_fmt
{
unsigned offset : 16;
unsigned dest : 5;
unsigned src2 : 5;
unsigned op1 : 6;
};
struct esc_fmt
{
unsigned op2 : 5;
unsigned res2 : 6;
unsigned src1 : 5;
unsigned res1 : 10;
unsigned op1 : 6;
};
struct ctrl_fmt
{
unsigned int offset : 26;
unsigned op1 : 6;
};
struct fp_fmt
{
unsigned op2 : 7;
unsigned r : 1;
unsigned s : 1;
unsigned d : 1;
unsigned p : 1;
unsigned src1 : 5;
unsigned dest : 5;
unsigned src2 : 5;
unsigned op1 : 6;
};
union insn_fmt
{
struct gen_fmt gen;
struct geni_fmt geni;
struct esc_fmt esc;
struct ctrl_fmt ctrl;
struct fp_fmt fp;
long int_val;
};
#endif
typedef enum
{
Error, not_branch, uncond, uncond_d, cond, cond_d
} branch_type;

View File

@ -1,658 +0,0 @@
/* Print i860 instructions for GDB, the GNU debugger.
Copyright (C) 1986, 1987 Free Software Foundation, Inc.
Contributed by Michael Tiemann (tiemann@mcc.com)
GDB is distributed in the hope that it will be useful, but WITHOUT ANY
WARRANTY. No author or distributor accepts responsibility to anyone
for the consequences of using it or for whether it serves any
particular purpose or works at all, unless he says so in writing.
Refer to the GDB General Public License for full details.
Everyone is granted permission to copy, modify and redistribute GDB,
but only under the conditions described in the GDB General Public
License. A copy of this license is supposed to have been given to you
along with GDB so you can know your rights and responsibilities. It
should be in a file named COPYING. Among other things, the copyright
notice and this notice must be preserved on all copies.
In other words, go ahead and share GDB, but don't try to stop
anyone else from sharing it farther. Help stamp out software hoarding!
*/
#include <stdio.h>
#include "defs.h"
#include "i860/tm-i860.h"
#include "i860-opcode.h"
/* i860 instructions are never longer than this many bytes. */
#define MAXLEN 4
static int fp_instr();
static void fld_offset();
static void gen_rrr();
static void gen_irr();
static void ctrl_a();
/*
* integer registers names
*/
static char *ireg[32] =
{
"r0", "r1", "sp", "fp", "r4", "r5", "r6", "r7",
"r8", "r9", "r10", "r11", "r12", "r13", "r14", "r15",
"r16", "r17", "r18", "r19", "r20", "r21", "r22", "r23",
"r24", "r25", "r26", "r27", "r28", "r29", "r30", "r31",
};
/*
* Control registers of the ld.c and st.c instructions
*/
static char *ctlreg[32] =
{
"fir", "psr", "dirbase", "db", "fsr", "?", "?", "?",
"?", "?", "?", "?", "?", "?", "?", "?",
"?", "?", "?", "?", "?", "?", "?", "?",
"?", "?", "?", "?", "?", "?", "?", "?"
};
/***********************************************************************
* Print the i860 instruction at address MEMADDR in debugged memory,
* on STREAM. Returns length of the instruction, in bytes, which
* is always 4.
*/
int
print_insn (memaddr, stream)
CORE_ADDR memaddr; /* address of the instruction */
FILE *stream; /* stream on which to write result */
{
union insn_fmt insn; /* the instruction we're decoding */
long offset; /* the (decoded) offset from the instruction */
long split_offset; /* the value of a ld/st-style split offset */
int ai; /* autoincrement flag */
char suffix; /* length suffix */
adj_read_memory (memaddr, &insn, MAXLEN);
/* These offsets used in ld, st, bte, etc. instructions and are formed by
* combining 2 separate fields within the instruction and sign-extending
* the result
*/
split_offset = (insn.gen.dest << 11) | insn.gen.offset;
split_offset = SIGN_EXT(16, split_offset);
switch (insn.gen.op1)
{
case 000:
fprintf (stream, "ld.b %s(%s),%s", ireg[insn.gen.src1],
ireg[insn.gen.src2], ireg[insn.gen.dest]);
break;
case 001:
offset = SIGN_EXT(16, insn.geni.offset);
fprintf (stream, "ld.b 0x%x(%s),%s", offset,
ireg[insn.geni.src2], ireg[insn.geni.dest]);
break;
case 002:
fprintf (stream, "ixfr %s,f%d", ireg[insn.gen.src1], insn.gen.dest);
break;
case 003:
fprintf (stream, "st.b %s,0x%x(%s)", ireg[insn.gen.src1], split_offset,
ireg[insn.geni.src2]);
break;
case 004:
fprintf (stream, "ld.%c %s(%s),%s", (insn.gen.offset & 1) ? 'l' : 's',
ireg[insn.gen.src1], ireg[insn.gen.src2], ireg[insn.gen.dest]);
break;
case 005:
offset = SIGN_EXT(16, insn.geni.offset);
fprintf (stream, "ld.%c 0x%x(%s),%s", (insn.geni.offset & 1) ? 'l' : 's',
(offset & ~1), ireg[insn.geni.src2], ireg[insn.geni.dest]);
break;
case 007:
fprintf (stream, "st.%c %s,0x%x(%s)", (insn.geni.offset & 1) ? 'l' : 's',
ireg[insn.gen.src1], (split_offset & ~1), ireg[insn.geni.src2]);
break;
case 010:
offset = insn.gen.offset;
fld_offset(&offset, &suffix, &ai);
fprintf (stream, "fld.%c %s(%s)%s,f%d", suffix,
ireg[insn.gen.src1], ireg[insn.gen.src2], ai ? "++" : "",
insn.gen.dest);
break;
case 011:
offset = SIGN_EXT(16, insn.geni.offset);
fld_offset(&offset, &suffix, &ai);
fprintf (stream, "fld.%c 0x%x(%s)%s,f%d", suffix,
offset, ireg[insn.gen.src2], ai ? "++" : "", insn.gen.dest);
break;
case 012:
offset = insn.gen.offset;
fld_offset(&offset, &suffix, &ai);
fprintf (stream, "fst.%c f%d,%s(%s)%s", suffix,
insn.gen.dest, ireg[insn.gen.src1], ireg[insn.gen.src2],
ai ? "++" : "");
break;
case 013:
offset = SIGN_EXT(16, insn.geni.offset);
fld_offset(&offset, &suffix, &ai);
fprintf (stream, "fst.%c f%d,0x%x(%s)%s", suffix,
insn.gen.dest, offset, ireg[insn.gen.src2], ai ? "++" : "");
break;
case 014:
fprintf (stream, "ld.c %s,%s", ctlreg[insn.gen.src2],
ireg[insn.gen.dest]);
break;
case 015:
offset = SIGN_EXT(16, insn.geni.offset);
fld_offset(&offset, &suffix, &ai);
fprintf (stream, "flush 0x%x(%s)%s", offset, ireg[insn.gen.src2],
ai ? "++" : "");
break;
case 016:
fprintf (stream, "st.c %s,%s", ireg[insn.gen.src1],
ctlreg[insn.gen.src2]);
break;
case 017:
offset = SIGN_EXT(16, insn.geni.offset);
fld_offset(&offset, &suffix, &ai);
fprintf (stream, "pst.d f%d,0x%x(%s)%s", insn.gen.dest,
offset, ireg[insn.gen.src2], ai ? "++" : "");
break;
case 020:
fprintf (stream, "bri %s", ireg[insn.gen.src1]);
break;
case 021:
gen_rrr("trap", insn, stream);
break;
case 022:
/*
* Floating-point Opcodes
*/
if (!fp_instr(insn.fp, stream))
fprintf (stream, "0x%08x (invalid instruction)", insn.int_val);
break;
case 023:
/*
* Core Escape Opcodes
*/
switch (insn.esc.op2)
{
case 1:
fprintf (stream, "lock");
break;
case 2:
fprintf (stream, "calli %s", ireg[insn.esc.src1]);
break;
case 4:
fprintf (stream, "intovr");
break;
case 7:
fprintf (stream, "unlock");
break;
default:
fprintf (stream, "0x%08x (invalid instruction)", insn.int_val);
break;
}
break;
case 024:
fprintf (stream, "btne %s,%s,", ireg[insn.gen.src1],
ireg[insn.gen.src2]);
offset = split_offset << 2;
print_address ((CORE_ADDR) (memaddr + 4 + offset), stream);
break;
case 025:
fprintf (stream, "btne 0x%x,%s,", insn.gen.src1, ireg[insn.gen.src2]);
offset = split_offset << 2;
print_address ((CORE_ADDR) (memaddr + 4 + offset), stream);
break;
case 026:
fprintf (stream, "bte %s,%s,", ireg[insn.gen.src1],
ireg[insn.gen.src2]);
offset = split_offset << 2;
print_address ((CORE_ADDR) (memaddr + 4 + offset), stream);
break;
case 027:
fprintf (stream, "bte 0x%x,%s,", insn.gen.src1, ireg[insn.gen.src2]);
offset = split_offset << 2;
print_address ((CORE_ADDR) (memaddr + 4 + offset), stream);
break;
case 030:
offset = insn.gen.offset;
fld_offset(&offset, &suffix, &ai);
fprintf (stream, "pfld.%c %s(%s)%s,f%d", suffix,
ireg[insn.gen.src1], ireg[insn.gen.src2], ai ? "++" : "",
insn.gen.dest);
break;
case 031:
offset = SIGN_EXT(16, insn.geni.offset);
fld_offset(&offset, &suffix, &ai);
fprintf (stream, "pfld.%c 0x%x(%s)%s,f%d", suffix,
offset, ireg[insn.gen.src2], ai ? "++" : "", insn.gen.dest);
break;
case 032:
ctrl_a("br", insn, memaddr, stream);
break;
case 033:
ctrl_a("call", insn, memaddr, stream);
break;
case 034:
ctrl_a("bc", insn, memaddr, stream);
break;
case 035:
ctrl_a("bc.t", insn, memaddr, stream);
break;
case 036:
ctrl_a("bnc", insn, memaddr, stream);
break;
case 037:
ctrl_a("bnc.t", insn, memaddr, stream);
break;
case 040:
gen_rrr("addu", insn, stream);
break;
case 041:
gen_irr("addu", insn, SIGN_EXT(16, insn.geni.offset), stream);
break;
case 042:
gen_rrr("subu", insn, stream);
break;
case 043:
gen_irr("subu", insn, SIGN_EXT(16, insn.geni.offset), stream);
break;
case 044:
gen_rrr("adds", insn, stream);
break;
case 045:
gen_irr("adds", insn, SIGN_EXT(16, insn.geni.offset), stream);
break;
case 046:
gen_rrr("subs", insn, stream);
break;
case 047:
gen_irr("subs", insn, SIGN_EXT(16, insn.geni.offset), stream);
break;
case 050:
if (insn.gen.src1 == 0)
{
if (insn.gen.src2 == 0 && insn.gen.dest == 0)
fprintf (stream, "nop");
else
fprintf (stream, "mov %s,%s", ireg[insn.gen.src2],
ireg[insn.gen.dest]);
}
else
gen_rrr("shl", insn, stream);
break;
case 051:
gen_irr("shl", insn, insn.geni.offset, stream);
break;
case 052:
gen_rrr("shr", insn, stream);
break;
case 053:
gen_irr("shr", insn, insn.geni.offset, stream);
break;
case 054:
if (insn.gen.src1 == 0 && insn.gen.src2 == 0 && insn.gen.dest == 0)
{
if ((insn.int_val & (1 << 9)) != 0)
fprintf (stream, "d.");
fprintf (stream, "fnop");
}
else
gen_rrr("shrd", insn, stream);
break;
case 055:
fprintf (stream, "bla %s,%s,", ireg[insn.gen.src1],
ireg[insn.gen.src2]);
offset = split_offset << 2;
print_address ((CORE_ADDR) (memaddr + 4 + offset), stream);
break;
case 056:
gen_rrr("shra", insn, stream);
break;
case 057:
gen_irr("shra", insn, insn.geni.offset, stream);
break;
case 060:
gen_rrr("and", insn, stream);
break;
case 061:
gen_irr("and", insn, insn.geni.offset, stream);
break;
case 063:
gen_irr("andh", insn, insn.geni.offset, stream);
break;
case 064:
gen_rrr("andnot", insn, stream);
break;
case 065:
gen_irr("andnot", insn, insn.geni.offset, stream);
break;
case 067:
gen_irr("andnoth", insn, insn.geni.offset, stream);
break;
case 070:
gen_rrr("or", insn, stream);
break;
case 071:
gen_irr("or", insn, insn.geni.offset, stream);
break;
case 073:
gen_irr("orh", insn, insn.geni.offset, stream);
break;
case 074:
gen_rrr("xor", insn, stream);
break;
case 075:
gen_irr("xor", insn, insn.geni.offset, stream);
break;
case 077:
gen_irr("xorh", insn, insn.geni.offset, stream);
break;
default:
fprintf (stream, "0x%08x (invalid instruction)", insn.int_val);
break;
}
return(4);
}
/* A full list of floating point opcodes - if the entry is NULL, there is
* no corresponding instruction
*/
static char *fp_ops[] =
{
"r2p1", "r2pt", "r2ap1", "r2apt",
"i2p1", "i2pt", "i2ap1", "i2apt",
"rat1p2", "m12apm", "ra1p2", "m12ttpa",
"iat1p2", "m12tpm", "ia1p2", "m12tpa",
"r2s1", "r2st", "r2as1", "r2ast",
"i2s1", "i2st", "i2as1", "i2ast",
"rat1s2", "m12asm", "ra1s2", "m12ttsa",
"iat1s2", "m12tsm", "ia1s2", "m12tsa",
"fmul", "fmlow", "frcp", "frsqr",
"fmul3", NULL, NULL, NULL,
NULL, NULL, NULL, NULL,
NULL, NULL, NULL, NULL,
"fadd", "fsub", "fix", "famov",
"fgt", "feq", NULL, NULL,
NULL, NULL, "ftrunc", NULL,
NULL, NULL, NULL, NULL,
"fxfr", NULL, NULL, NULL,
NULL, NULL, NULL, NULL,
NULL, "fiadd", NULL, NULL,
NULL, "fisub", NULL, NULL,
"faddp", "faddz", NULL, NULL,
NULL, NULL, NULL, "fzchkl",
NULL, NULL, "form", NULL,
NULL, NULL, NULL, "fzchks",
};
/* Alternate list of floating point opcodes for PFMAM/PFMSM instructions
*/
static char *alt_fp_ops[] =
{
"mr2p1", "mr2pt", "mr2mp1", "mr2mpt",
"mi2p1", "mi2pt", "mi2mp1", "mi2mpt",
"mrmt1p2", "mm12mpm", "mrm1p2", "mm12ttpm",
"mimt1p2", "mm12tpm", "mim1p2", "mm12tpm",
"mr2s1", "mr2st", "mr2ms1", "mr2mst",
"mi2s1", "mi2st", "mi2ms1", "mi2mst",
"mrmt1s2", "mm12msm", "mrm1s2", "mm12ttsm",
"mimt1s2", "mm12tsm", "mim1s2", "mm12tsm",
};
/* Floating point precision suffix values - indexed by s and r bits of
* instructions.
*/
static char precision[2] =
{
's', 'd',
};
/***********************************************************************
* Print floating-point instruction 'insn' on the indicated stream
* Returns 1 if successful, 0 on failure (invalid instruction)
*/
static int
fp_instr(insn, stream)
struct fp_fmt insn; /* instruction to decode */
FILE *stream; /* stream to print on */
{
char *name; /* the opcode name */
name = fp_ops[insn.op2];
if (name && insn.d)
fprintf(stream, "d.");
if (insn.op2 < 0x20)
{
/*
* DPC Ops
*/
if (insn.p == 0) /* use PFMAM/PFMSM ops if p=0 */
name = alt_fp_ops[insn.op2];
fprintf (stream, "%s.%c%c f%d,f%d,f%d", name,
precision[insn.s], precision[insn.r],
insn.src1, insn.src2, insn.dest);
}
else
{
switch (insn.op2)
{
case 0x21: /* fmlow (no pipeline allowed) */
fprintf (stream, "%s.%c%c f%d,f%d,f%d", name,
precision[insn.s], precision[insn.r],
insn.src1, insn.src2, insn.dest);
break;
case 0x22: /* frcp */
case 0x23: /* fsqrt */
fprintf (stream, "%s.%c%c f%d,f%d", name,
precision[insn.s], precision[insn.r],
insn.src2, insn.dest);
break;
case 0x24: /* pfmul3 */
fprintf (stream, "pfmul3.dd f%d,f%d,f%d",
insn.src1, insn.src2, insn.dest);
break;
case 0x30: /* fadd */
case 0x49: /* fiadd */
if (insn.src2 == 0)
{
/*
* Really fmov
*/
fprintf (stream, "%sfmov.%c%c f%d,f%d", insn.p ? "p" : "",
precision[insn.s], precision[insn.r],
insn.src1, insn.dest);
}
else
{
fprintf (stream, "%s%s.%c%c f%d,f%d,f%d", insn.p ? "p" : "", name,
precision[insn.s], precision[insn.r],
insn.src1, insn.src2, insn.dest);
}
break;
case 0x32: /* fix */
case 0x3A: /* ftrunc */
fprintf (stream, "%s%s.%c%c f%d,f%d", insn.p ? "p" : "", name,
precision[insn.s], precision[insn.r],
insn.src1, insn.dest);
break;
case 0x34: /* pfgt/pfle */
if (insn.r)
name = "fle";
fprintf (stream, "p%s.%c%c f%d,f%d,f%d", name,
precision[insn.s], precision[insn.s],
insn.src1, insn.src2, insn.dest);
break;
case 0x35: /* pfeq */
fprintf (stream, "pfeq.%c%c f%d,f%d,f%d",
precision[insn.s], precision[insn.r],
insn.src1, insn.src2, insn.dest);
break;
case 0x40: /* fxfr */
fprintf (stream, "fxfr f%d,%s", insn.src1, ireg[insn.dest]);
break;
case 0x50: /* faddp */
case 0x51: /* faddz */
case 0x57: /* fzchkl */
case 0x5F: /* fzchks */
/*
* Graphics ops with no precision
*/
fprintf (stream, "%s%s f%d,f%d,f%d", insn.p ? "p" : "", name,
insn.src1, insn.src2, insn.dest);
break;
case 0x5A: /* form */
fprintf (stream, "%sform f%d,f%d", insn.p ? "p" : "",
insn.src1, insn.dest);
break;
default:
/*
* All the rest are uniform 3-address, optionally pipelined, etc
*/
if (name)
fprintf (stream, "%s%s.%c%c f%d,f%d,f%d", insn.p ? "p" : "", name,
precision[insn.s], precision[insn.r],
insn.src1, insn.src2, insn.dest);
else
return (0);
break;
}
}
return (1);
}
/***********************************************************************
* Decode fld/fst-style offset encodings into actual offset, precision suffix,
* and autoincrement flag
*/
static void
fld_offset(offset, suffix, autoincrement)
long *offset; /* original and returned offset */
char *suffix; /* returned suffix character */
int *autoincrement; /* autoincrement flag (1 if ai) */
{
long off = *offset; /* working copy of *offset */
*autoincrement = ((off & 1) != 0);
if (off & 2)
{
*suffix = 'l';
*offset = (off & ~3);
}
else if (off & 4)
{
*suffix = 'q';
*offset = (off & ~7);
}
else
{
*suffix = 'd';
*offset = (off & ~7);
}
}
/***********************************************************************
* Print a general format instruction of the three register form:
* op rx,ry,rz
*/
static void
gen_rrr(name, insn, stream)
char *name;
union insn_fmt insn;
FILE *stream;
{
fprintf (stream, "%s %s,%s,%s", name, ireg[insn.gen.src1],
ireg[insn.gen.src2], ireg[insn.gen.dest]);
}
/***********************************************************************
* Print a general format instruction of the immed + two register form:
* op i,ry,rz
*/
static void
gen_irr(name, insn, immed, stream)
char *name;
union insn_fmt insn;
long immed;
FILE *stream;
{
fprintf (stream, "%s 0x%x,%s,%s", name, immed,
ireg[insn.gen.src2], ireg[insn.gen.dest]);
}
/***********************************************************************
* Print a ctrl format instruction with a 26-bit displacement:
* op addr
*/
static void
ctrl_a(name, insn, memaddr, stream)
char *name;
union insn_fmt insn;
CORE_ADDR memaddr;
FILE *stream;
{
long offset;
fprintf (stream, "%s ", name);
offset = SIGN_EXT(28, insn.ctrl.offset << 2);
print_address ((CORE_ADDR) (memaddr + 4 + offset), stream);
}

File diff suppressed because it is too large Load Diff