aboutsummaryrefslogtreecommitdiff
path: root/sim/mips/interp.c
diff options
context:
space:
mode:
authorRon Unrau <runrau@cygnus>1998-06-16 20:30:20 +0000
committerRon Unrau <runrau@cygnus>1998-06-16 20:30:20 +0000
commit2905d173c50c7371d7158fda09fbb6ede04acfb0 (patch)
treed65da397c772d1349496df63c37b0c87369231ec /sim/mips/interp.c
parentd80e0c96ef6be8349b9adbd7fe4e18874eb70d7c (diff)
downloadgdb-2905d173c50c7371d7158fda09fbb6ede04acfb0.zip
gdb-2905d173c50c7371d7158fda09fbb6ede04acfb0.tar.gz
gdb-2905d173c50c7371d7158fda09fbb6ede04acfb0.tar.bz2
* sky-pke.c(read_pke_pc): return source address of current pc
* sky-pke.c(read_pke_pcx): return index of current pc * sky-pke.h: export read_pke_pcx * interp.c(sim_fetch_registers): read pke pc/pcx * sky-libvpe.c: track name change from GDB * sim-main.h: add vif memory based pc - extend gdb comm area for fifo breakpoints - define SIM_ENGINE_RESTART_HOOK * sky-gdb.c: add support for VIF breakpoints
Diffstat (limited to 'sim/mips/interp.c')
-rw-r--r--sim/mips/interp.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/sim/mips/interp.c b/sim/mips/interp.c
index 113a136..8b10b1f 100644
--- a/sim/mips/interp.c
+++ b/sim/mips/interp.c
@@ -1045,20 +1045,24 @@ sim_fetch_register (sd,rn,memory,length)
if (rn < NUM_VIF_REGS)
{
- if (rn < NUM_VIF_REGS-1)
+ if (rn < NUM_VIF_REGS-2)
return read_pke_reg (&pke0_device, rn, memory);
- else
+ else if (rn == NUM_VIF_REGS-2)
return read_pke_pc (&pke0_device, memory);
+ else
+ return read_pke_pcx (&pke0_device, memory);
}
rn -= NUM_VIF_REGS; /* VIF1 registers are last */
if (rn < NUM_VIF_REGS)
{
- if (rn < NUM_VIF_REGS-1)
+ if (rn < NUM_VIF_REGS-2)
return read_pke_reg (&pke1_device, rn, memory);
- else
+ else if (rn == NUM_VIF_REGS-2)
return read_pke_pc (&pke1_device, memory);
+ else
+ return read_pke_pcx (&pke1_device, memory);
}
sim_io_eprintf( sd, "Invalid VU register (register fetch ignored)\n" );