This is the mail archive of the gdb-patches@sourceware.org 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]

[PATCH] S/390: Enable BFP ABI also for DFP


Hello,

the attached patch makes gdb for S/390 to use the bfp ABI also for dfp.

I've run the testsuite on s390 and s390x.
No regressions.

Uli, could you please apply the patch if you think it is ok.  I don't
have GDB write privileges.

Bye,

-Andreas-


2008-01-31  Andreas Krebbel  <krebbel1@de.ibm.com>

	* s390-tdep.c (is_float_singleton, is_float_like,
	alignment_of, s390_return_value): Make checks for
	TYPE_CODE_FLT to match TYPE_CODE_DECFLOAT as well.


Index: gdb/s390-tdep.c
===================================================================
*** gdb/s390-tdep.c.orig	2008-01-17 17:05:41.000000000 +0100
--- gdb/s390-tdep.c	2008-01-29 17:19:12.000000000 +0100
*************** is_float_singleton (struct type *type)
*** 1816,1821 ****
--- 1816,1822 ----
        CHECK_TYPEDEF (singleton_type);
  
        return (TYPE_CODE (singleton_type) == TYPE_CODE_FLT
+ 	      || TYPE_CODE (singleton_type) == TYPE_CODE_DECFLOAT
  	      || is_float_singleton (singleton_type));
      }
  
*************** static int
*** 1854,1859 ****
--- 1855,1861 ----
  is_float_like (struct type *type)
  {
    return (TYPE_CODE (type) == TYPE_CODE_FLT
+ 	  || TYPE_CODE (type) == TYPE_CODE_DECFLOAT
            || is_float_singleton (type));
  }
  
*************** alignment_of (struct type *type)
*** 1930,1936 ****
  
    if (is_integer_like (type)
        || is_pointer_like (type)
!       || TYPE_CODE (type) == TYPE_CODE_FLT)
      alignment = TYPE_LENGTH (type);
    else if (TYPE_CODE (type) == TYPE_CODE_STRUCT
             || TYPE_CODE (type) == TYPE_CODE_UNION)
--- 1932,1939 ----
  
    if (is_integer_like (type)
        || is_pointer_like (type)
!       || TYPE_CODE (type) == TYPE_CODE_FLT
!       || TYPE_CODE (type) == TYPE_CODE_DECFLOAT)
      alignment = TYPE_LENGTH (type);
    else if (TYPE_CODE (type) == TYPE_CODE_STRUCT
             || TYPE_CODE (type) == TYPE_CODE_UNION)
*************** s390_return_value (struct gdbarch *gdbar
*** 2185,2191 ****
        switch (rvc)
  	{
  	case RETURN_VALUE_REGISTER_CONVENTION:
! 	  if (TYPE_CODE (type) == TYPE_CODE_FLT)
  	    {
  	      /* When we store a single-precision value in an FP register,
  		 it occupies the leftmost bits.  */
--- 2188,2195 ----
        switch (rvc)
  	{
  	case RETURN_VALUE_REGISTER_CONVENTION:
! 	  if (TYPE_CODE (type) == TYPE_CODE_FLT
! 	      || TYPE_CODE (type) == TYPE_CODE_DECFLOAT)
  	    {
  	      /* When we store a single-precision value in an FP register,
  		 it occupies the leftmost bits.  */
*************** s390_return_value (struct gdbarch *gdbar
*** 2221,2227 ****
        switch (rvc)
  	{
  	case RETURN_VALUE_REGISTER_CONVENTION:
! 	  if (TYPE_CODE (type) == TYPE_CODE_FLT)
  	    {
  	      /* When we store a single-precision value in an FP register,
  		 it occupies the leftmost bits.  */
--- 2225,2232 ----
        switch (rvc)
  	{
  	case RETURN_VALUE_REGISTER_CONVENTION:
! 	  if (TYPE_CODE (type) == TYPE_CODE_FLT
! 	      || TYPE_CODE (type) == TYPE_CODE_DECFLOAT)
  	    {
  	      /* When we store a single-precision value in an FP register,
  		 it occupies the leftmost bits.  */


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