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: return float values correctly



2001-12-07  Jim Blandy  <jimb@redhat.com>

	* s390-tdep.c (s390_store_return_value): Don't convert float
	values to double format when returning them; just return them in
	the first half of the FP register, as the ABI specifies.

Index: gdb/s390-tdep.c
===================================================================
RCS file: /cvs/cvsfiles/devo/gdb/s390-tdep.c,v
retrieving revision 2.28
diff -c -r2.28 s390-tdep.c
*** gdb/s390-tdep.c	2001/12/05 22:20:19	2.28
--- gdb/s390-tdep.c	2001/12/07 22:45:25
***************
*** 1144,1155 ****
  
    if (TYPE_CODE (valtype) == TYPE_CODE_FLT)
      {
!       DOUBLEST tempfloat = extract_floating (valbuf, TYPE_LENGTH (valtype));
! 
!       floatformat_from_doublest (&floatformat_ieee_double_big, &tempfloat,
! 				 reg_buff);
!       write_register_bytes (REGISTER_BYTE (S390_FP0_REGNUM), reg_buff,
! 			    S390_FPR_SIZE);
      }
    else
      {
--- 1144,1156 ----
  
    if (TYPE_CODE (valtype) == TYPE_CODE_FLT)
      {
!       if (TYPE_LENGTH (valtype) == 4
!           || TYPE_LENGTH (valtype) == 8)
!         write_register_bytes (REGISTER_BYTE (S390_FP0_REGNUM), valbuf,
!                               TYPE_LENGTH (valtype));
!       else
!         error ("GDB is unable to return `long double' values "
!                "on this architecture.");
      }
    else
      {


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