aboutsummaryrefslogtreecommitdiff
path: root/gdb/aix-thread.c
diff options
context:
space:
mode:
authorJim Blandy <jimb@codesourcery.com>2004-05-10 18:58:44 +0000
committerJim Blandy <jimb@codesourcery.com>2004-05-10 18:58:44 +0000
commit7bcda025ec2abe0f8a8583a11083ee06e6b46d86 (patch)
tree7a1e525f38b21b59a15c914efab7c369e0b95201 /gdb/aix-thread.c
parentcca0d3b0302614184413157e253136ebf3aa5295 (diff)
downloadgdb-7bcda025ec2abe0f8a8583a11083ee06e6b46d86.zip
gdb-7bcda025ec2abe0f8a8583a11083ee06e6b46d86.tar.gz
gdb-7bcda025ec2abe0f8a8583a11083ee06e6b46d86.tar.bz2
Back out change. The NetBSD changes need Jason Thorpe's approval, but
he hasn't reviewed it yet.
Diffstat (limited to 'gdb/aix-thread.c')
-rw-r--r--gdb/aix-thread.c42
1 files changed, 13 insertions, 29 deletions
diff --git a/gdb/aix-thread.c b/gdb/aix-thread.c
index dcaa3fb..2f79071 100644
--- a/gdb/aix-thread.c
+++ b/gdb/aix-thread.c
@@ -1023,10 +1023,6 @@ supply_fprs (double *vals)
struct gdbarch_tdep *tdep = gdbarch_tdep (current_gdbarch);
int regno;
- /* This function should never be called on architectures without
- floating-point registers. */
- gdb_assert (ppc_floating_point_p (current_gdbarch));
-
for (regno = 0; regno < 32; regno++)
supply_register (regno + tdep->ppc_fp0_regnum, (char *) (vals + regno));
}
@@ -1043,7 +1039,7 @@ special_register_p (int regno)
|| regno == tdep->ppc_lr_regnum
|| regno == tdep->ppc_ctr_regnum
|| regno == tdep->ppc_xer_regnum
- || (tdep->ppc_fpscr_regnum >= 0 && regno == tdep->ppc_fpscr_regnum)
+ || regno == tdep->ppc_fpscr_regnum
|| (tdep->ppc_mq_regnum >= 0 && regno == tdep->ppc_mq_regnum);
}
@@ -1064,8 +1060,7 @@ supply_sprs64 (uint64_t iar, uint64_t msr, uint32_t cr,
supply_register (tdep->ppc_lr_regnum, (char *) &lr);
supply_register (tdep->ppc_ctr_regnum, (char *) &ctr);
supply_register (tdep->ppc_xer_regnum, (char *) &xer);
- if (tdep->ppc_fpscr_regnum >= 0)
- supply_register (tdep->ppc_fpscr_regnum, (char *) &fpscr);
+ supply_register (tdep->ppc_fpscr_regnum, (char *) &fpscr);
}
/* Record that the special registers contain the specified 32-bit
@@ -1084,8 +1079,7 @@ supply_sprs32 (uint32_t iar, uint32_t msr, uint32_t cr,
supply_register (tdep->ppc_lr_regnum, (char *) &lr);
supply_register (tdep->ppc_ctr_regnum, (char *) &ctr);
supply_register (tdep->ppc_xer_regnum, (char *) &xer);
- if (tdep->ppc_fpscr_regnum >= 0)
- supply_register (tdep->ppc_fpscr_regnum, (char *) &fpscr);
+ supply_register (tdep->ppc_fpscr_regnum, (char *) &fpscr);
}
/* Fetch all registers from pthread PDTID, which doesn't have a kernel
@@ -1119,8 +1113,7 @@ fetch_regs_user_thread (pthdb_pthread_t pdtid)
/* Floating-point registers. */
- if (ppc_floating_point_p (current_gdbarch))
- supply_fprs (ctx.fpr);
+ supply_fprs (ctx.fpr);
/* Special registers. */
@@ -1186,10 +1179,9 @@ fetch_regs_kernel_thread (int regno, pthdb_tid_t tid)
/* Floating-point registers. */
- if (ppc_floating_point_unit_p (current_gdbarch)
- && (regno == -1
- || (regno >= tdep->ppc_fp0_regnum
- && regno < tdep->ppc_fp0_regnum + ppc_num_fprs)))
+ if (regno == -1
+ || (regno >= tdep->ppc_fp0_regnum
+ && regno < tdep->ppc_fp0_regnum + ppc_num_fprs))
{
if (!ptrace32 (PTT_READ_FPRS, tid, (int *) fprs, 0, NULL))
memset (fprs, 0, sizeof (fprs));
@@ -1279,10 +1271,6 @@ fill_fprs (double *vals)
struct gdbarch_tdep *tdep = gdbarch_tdep (current_gdbarch);
int regno;
- /* This function should never be called on architectures without
- floating-point registers. */
- gdb_assert (ppc_floating_point_p (current_gdbarch));
-
for (regno = tdep->ppc_fp0_regnum;
regno < tdep->ppc_fp0_regnum + ppc_num_fprs;
regno++)
@@ -1319,8 +1307,7 @@ fill_sprs64 (uint64_t *iar, uint64_t *msr, uint32_t *cr,
regcache_collect (tdep->ppc_ctr_regnum, ctr);
if (register_cached (tdep->ppc_xer_regnum))
regcache_collect (tdep->ppc_xer_regnum, xer);
- if (tdep->ppc_fpscr_regnum >= 0
- && register_cached (tdep->ppc_fpscr_regnum))
+ if (register_cached (tdep->ppc_fpscr_regnum))
regcache_collect (tdep->ppc_fpscr_regnum, fpscr);
}
@@ -1355,8 +1342,7 @@ fill_sprs32 (unsigned long *iar, unsigned long *msr, unsigned long *cr,
regcache_collect (tdep->ppc_ctr_regnum, ctr);
if (register_cached (tdep->ppc_xer_regnum))
regcache_collect (tdep->ppc_xer_regnum, xer);
- if (tdep->ppc_fpscr_regnum >= 0
- && register_cached (tdep->ppc_fpscr_regnum))
+ if (register_cached (tdep->ppc_fpscr_regnum))
regcache_collect (tdep->ppc_fpscr_regnum, fpscr);
}
@@ -1404,8 +1390,7 @@ store_regs_user_thread (pthdb_pthread_t pdtid)
}
/* Collect floating-point register values from the regcache. */
- if (ppc_floating_point_p (current_gdbarch))
- fill_fprs (ctx.fpr);
+ fill_fprs (ctx.fpr);
/* Special registers (always kept in ctx as 64 bits). */
if (arch64)
@@ -1495,10 +1480,9 @@ store_regs_kernel_thread (int regno, pthdb_tid_t tid)
/* Floating-point registers. */
- if (ppc_floating_point_unit_p (current_gdbarch)
- && (regno == -1
- || (regno >= tdep->ppc_fp0_regnum
- && regno < tdep->ppc_fp0_regnum + ppc_num_fprs)))
+ if (regno == -1
+ || (regno >= tdep->ppc_fp0_regnum
+ && regno < tdep->ppc_fp0_regnum + ppc_num_fprs))
{
/* Pre-fetch: some regs may not be in the cache. */
ptrace32 (PTT_READ_FPRS, tid, (int *) fprs, 0, NULL);