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]

Re: [rfa] Attempt #3: Eliminate HOST_*_FORMAT from arm-*tdep.c


> 
> Sorry for the delay Andrew.
> 
> As per our conversation, this seems to be the correct thing to do.
> We haven't heard of any objection, so lets try it.
> 
> Please check it in.
> 
> Regards,
> Fernando


Thanks!  I've taken the liberty of updating it slightly.  Since there is 
now a floatformat_arm_ext_littlebyte_bigword available, I'm able to 
``FIX'' the fixme.  It now uses floatformat_arm_ext_littlebyte_bigword 
when the target is little endian.

I've attached the relevant bit of the patch.

	Andrew

2001-07-24  Andrew Cagney  <ac131313@redhat.com>

	* arm-tdep.c (convert_from_extended, convert_to_extended): Delete
	assembler version of function.
	(convert_from_extended, convert_to_extended): Rewrite. Use
	floatformat_to_doublest, floatformat_from_doublest,
	floatformat_arm_ext_big, floatformat_arm_ext_littlebyte_bigword.
	(arm_push_arguments): Use extract_floating and store_floating to
	perform floating point conversions.
	(SWAP_TARGET_AND_HOST): Delete macro.
	* arm-linux-tdep.c (arm_linux_push_arguments): Use
	extract_floating and store_floating to perform floating point
	conversions.

    print_fpu_flags (status);
  }
  
! /* NOTE: cagney/2001-08-20: Both convert_from_extended() and
!    convert_to_extended() use floatformat_arm_ext_littlebyte_bigword.
!    It is thought that this is the floating-point register format on
!    little-endian systems.  */
  
  static void
  convert_from_extended (void *ptr, void *dbl)
  {
!   DOUBLEST d;
!   if (TARGET_BYTE_ORDER == BIG_ENDIAN)
!     floatformat_to_doublest (&floatformat_arm_ext_big, ptr, &d);
!   else
!     floatformat_to_doublest (&floatformat_arm_ext_littlebyte_bigword,
! 			     ptr, &d);
!   floatformat_from_doublest (TARGET_DOUBLE_FORMAT, &d, dbl);
  }
  
  void
  convert_to_extended (void *dbl, void *ptr)
  {
!   DOUBLEST d;
!   floatformat_to_doublest (TARGET_DOUBLE_FORMAT, ptr, &d);
!   if (TARGET_BYTE_ORDER == BIG_ENDIAN)
!     floatformat_from_doublest (&floatformat_arm_ext_big, &d, dbl);
!   else
!     floatformat_from_doublest (&floatformat_arm_ext_littlebyte_bigword,
! 			       &d, dbl);
  }
  
  /* Nonzero if register N requires conversion from raw format to
     virtual format.  */

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