-/* Save a particular register into the floating point state of the
- process using the contents from regcache. */
-
-static void
-store_fpregister (const struct regcache *regcache, int regno)
-{
- int ret, tid;
- gdb_byte fp[ARM_LINUX_SIZEOF_NWFPE];
-
- /* Get the thread id for the ptrace call. */
- tid = GET_THREAD_ID (inferior_ptid);
-
- /* Read the floating point state. */
- ret = ptrace (PT_GETFPREGS, tid, 0, fp);
- if (ret < 0)
- {
- warning (_("Unable to fetch the floating point registers."));
- return;
- }
-
- /* Store fpsr. */
- if (ARM_FPS_REGNUM == regno
- && REG_VALID == regcache_register_status (regcache, ARM_FPS_REGNUM))
- regcache_raw_collect (regcache, ARM_FPS_REGNUM, fp + NWFPE_FPSR_OFFSET);
-
- /* Store the floating point register. */
- if (regno >= ARM_F0_REGNUM && regno <= ARM_F7_REGNUM)
- collect_nwfpe_register (regcache, regno, fp);
-
- ret = ptrace (PTRACE_SETFPREGS, tid, 0, fp);
- if (ret < 0)
- {
- warning (_("Unable to store floating point register."));
- return;
- }
-}
-