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]

PATCH: S/390: Extract floating-point return values correctly



2001-11-14  Jim Blandy  <jimb@redhat.com>

	* s390-tdep.c (s390_extract_return_value): Returned `float' values
 	can simply be copied bitwise from the registers into the value
 	object's buffer.

Index: gdb/s390-tdep.c
===================================================================
RCS file: /cvs/cvsfiles/devo/gdb/s390-tdep.c,v
retrieving revision 2.13
diff -c -r2.13 s390-tdep.c
*** gdb/s390-tdep.c	2001/11/14 22:11:08	2.13
--- gdb/s390-tdep.c	2001/11/14 22:22:59
***************
*** 1010,1029 ****
    int len = TYPE_LENGTH (valtype);
  
    if (TYPE_CODE (valtype) == TYPE_CODE_FLT)
!     {
!       if (len > (TARGET_FLOAT_BIT >> 3))
! 	memcpy (valbuf, &regbuf[REGISTER_BYTE (S390_FP0_REGNUM)], len);
!       else
! 	{
! 	  /* float */
! 	  DOUBLEST val;
! 
! 	  floatformat_to_doublest (&floatformat_ieee_double_big,
! 				   &regbuf[REGISTER_BYTE (S390_FP0_REGNUM)],
! 				   &val);
! 	  store_floating (valbuf, len, val);
! 	}
!     }
    else
      {
        int offset = 0;
--- 1010,1016 ----
    int len = TYPE_LENGTH (valtype);
  
    if (TYPE_CODE (valtype) == TYPE_CODE_FLT)
!     memcpy (valbuf, &regbuf[REGISTER_BYTE (S390_FP0_REGNUM)], len);
    else
      {
        int offset = 0;


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