mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-06-28 23:39:35 +08:00
* spu-low.c (spu_fetch_registers, spu_store_registers): Change
prototype to take a regcache. Adjust.
This commit is contained in:
@ -1,3 +1,8 @@
|
|||||||
|
2010-01-21 Pedro Alves <pedro@codesourcery.com>
|
||||||
|
|
||||||
|
* spu-low.c (spu_fetch_registers, spu_store_registers): Change
|
||||||
|
prototype to take a regcache. Adjust.
|
||||||
|
|
||||||
2010-01-20 Pedro Alves <pedro@codesourcery.com>
|
2010-01-20 Pedro Alves <pedro@codesourcery.com>
|
||||||
|
|
||||||
* regcache.h (struct thread_info): Forward declare.
|
* regcache.h (struct thread_info): Forward declare.
|
||||||
|
@ -477,7 +477,7 @@ spu_wait (ptid_t ptid, struct target_waitstatus *ourstatus, int options)
|
|||||||
|
|
||||||
/* Fetch inferior registers. */
|
/* Fetch inferior registers. */
|
||||||
static void
|
static void
|
||||||
spu_fetch_registers (int regno)
|
spu_fetch_registers (struct regcache *regcache, int regno)
|
||||||
{
|
{
|
||||||
int fd;
|
int fd;
|
||||||
CORE_ADDR addr;
|
CORE_ADDR addr;
|
||||||
@ -488,14 +488,14 @@ spu_fetch_registers (int regno)
|
|||||||
|
|
||||||
/* The ID register holds the spufs file handle. */
|
/* The ID register holds the spufs file handle. */
|
||||||
if (regno == -1 || regno == SPU_ID_REGNUM)
|
if (regno == -1 || regno == SPU_ID_REGNUM)
|
||||||
supply_register (SPU_ID_REGNUM, (char *)&fd);
|
supply_register (regcache, SPU_ID_REGNUM, (char *)&fd);
|
||||||
|
|
||||||
/* The NPC register is found at ADDR. */
|
/* The NPC register is found at ADDR. */
|
||||||
if (regno == -1 || regno == SPU_PC_REGNUM)
|
if (regno == -1 || regno == SPU_PC_REGNUM)
|
||||||
{
|
{
|
||||||
char buf[4];
|
char buf[4];
|
||||||
if (fetch_ppc_memory (addr, buf, 4) == 0)
|
if (fetch_ppc_memory (addr, buf, 4) == 0)
|
||||||
supply_register (SPU_PC_REGNUM, buf);
|
supply_register (regcache, SPU_PC_REGNUM, buf);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* The GPRs are found in the "regs" spufs file. */
|
/* The GPRs are found in the "regs" spufs file. */
|
||||||
@ -508,13 +508,13 @@ spu_fetch_registers (int regno)
|
|||||||
sprintf (annex, "%d/regs", fd);
|
sprintf (annex, "%d/regs", fd);
|
||||||
if (spu_proc_xfer_spu (annex, buf, NULL, 0, sizeof buf) == sizeof buf)
|
if (spu_proc_xfer_spu (annex, buf, NULL, 0, sizeof buf) == sizeof buf)
|
||||||
for (i = 0; i < SPU_NUM_CORE_REGS; i++)
|
for (i = 0; i < SPU_NUM_CORE_REGS; i++)
|
||||||
supply_register (i, buf + i*16);
|
supply_register (regcache, i, buf + i*16);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Store inferior registers. */
|
/* Store inferior registers. */
|
||||||
static void
|
static void
|
||||||
spu_store_registers (int regno)
|
spu_store_registers (struct regcache *regcache, int regno)
|
||||||
{
|
{
|
||||||
int fd;
|
int fd;
|
||||||
CORE_ADDR addr;
|
CORE_ADDR addr;
|
||||||
@ -531,7 +531,7 @@ spu_store_registers (int regno)
|
|||||||
if (regno == -1 || regno == SPU_PC_REGNUM)
|
if (regno == -1 || regno == SPU_PC_REGNUM)
|
||||||
{
|
{
|
||||||
char buf[4];
|
char buf[4];
|
||||||
collect_register (SPU_PC_REGNUM, buf);
|
collect_register (regcache, SPU_PC_REGNUM, buf);
|
||||||
store_ppc_memory (addr, buf, 4);
|
store_ppc_memory (addr, buf, 4);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -543,7 +543,7 @@ spu_store_registers (int regno)
|
|||||||
int i;
|
int i;
|
||||||
|
|
||||||
for (i = 0; i < SPU_NUM_CORE_REGS; i++)
|
for (i = 0; i < SPU_NUM_CORE_REGS; i++)
|
||||||
collect_register (i, buf + i*16);
|
collect_register (regcache, i, buf + i*16);
|
||||||
|
|
||||||
sprintf (annex, "%d/regs", fd);
|
sprintf (annex, "%d/regs", fd);
|
||||||
spu_proc_xfer_spu (annex, NULL, buf, 0, sizeof buf);
|
spu_proc_xfer_spu (annex, NULL, buf, 0, sizeof buf);
|
||||||
|
Reference in New Issue
Block a user