This is the mail archive of the gdb-patches@sources.redhat.com mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

RFA: check for floating-point registers


2004-05-06  Jim Blandy  <jimb@redhat.com>

	* ppc-sysv-tdep.c (ppc64_sysv_abi_return_value): Assert that
	the given architecture has floating-point registers. 

Index: gdb/ppc-sysv-tdep.c
===================================================================
RCS file: /cvs/src/src/gdb/ppc-sysv-tdep.c,v
retrieving revision 1.22
diff -c -p -r1.22 ppc-sysv-tdep.c
*** gdb/ppc-sysv-tdep.c	5 May 2004 01:46:55 -0000	1.22
--- gdb/ppc-sysv-tdep.c	6 May 2004 19:05:44 -0000
*************** ppc64_sysv_abi_return_value (struct gdba
*** 850,855 ****
--- 850,861 ----
  			     const void *writebuf)
  {
    struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
+ 
+   /* This function exists to support a calling convention that
+      requires floating-point registers.  It shouldn't be used on
+      processors that lack them.  */
+   gdb_assert (ppc_floating_point_unit_p (gdbarch));
+ 
    /* Floats and doubles in F1.  */
    if (TYPE_CODE (valtype) == TYPE_CODE_FLT && TYPE_LENGTH (valtype) <= 8)
      {


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]